From 7c3bc78944c4d99cc4a16c9882100e8e8b5d2a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Sun, 17 Nov 2024 00:54:07 +0100 Subject: [PATCH] Fix md2po2md always exiting with code 5 passing `--no-empty-msgstr` (#322) --- docs/pre-commit-hooks.rst | 16 ++++++++-------- pyproject.toml | 2 +- src/mdpo/md2po2md/__main__.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/pre-commit-hooks.rst b/docs/pre-commit-hooks.rst index 7683045..1069916 100644 --- a/docs/pre-commit-hooks.rst +++ b/docs/pre-commit-hooks.rst @@ -19,7 +19,7 @@ so you don't need to specify them. .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: md2po args: @@ -32,7 +32,7 @@ so you don't need to specify them. .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: md2po files: ^README\.md @@ -53,7 +53,7 @@ po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: po2md args: @@ -68,7 +68,7 @@ po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: po2md files: ^README\.md @@ -91,7 +91,7 @@ md2po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: md2po2md args: @@ -107,7 +107,7 @@ md2po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: md2po2md files: ^README\.md @@ -126,7 +126,7 @@ mdpo2html .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: mdpo2html args: @@ -141,7 +141,7 @@ mdpo2html .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v2.1.2 + rev: v2.1.3 hooks: - id: mdpo2html files: ^README\.html diff --git a/pyproject.toml b/pyproject.toml index 4d9ec57..8709473 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mdpo" -version = "2.1.2" +version = "2.1.3" description = "Markdown files translation using PO files." readme = "README.md" license = "BSD-3-Clause" diff --git a/src/mdpo/md2po2md/__main__.py b/src/mdpo/md2po2md/__main__.py index f668e77..72ae6e6 100755 --- a/src/mdpo/md2po2md/__main__.py +++ b/src/mdpo/md2po2md/__main__.py @@ -190,7 +190,7 @@ def run(args=frozenset()): exitcode = 4 - if opts.no_empty_msgstr: + if empties: if len(empties) > 2: # noqa PLR2004 sys.stderr.write( f'Found {len(empties)} empty msgstrs:\n',