diff options
| author | Julian Andres Klode <jak@debian.org> | 2025-05-06 18:11:33 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-05-06 18:11:33 +0200 |
| commit | 9a7e34d491b828a227930654d4f99e4fd2eb93ec (patch) | |
| tree | 3d112655479650c9a75e93cbdf3e3e493fb68051 | |
| parent | 5e06a65141f47b6a66eebda651391963fea610af (diff) | |
Pass --check to msgfmt and fix broken format strings
The check option discovers broken format string translations as
well as other issues like broken headers, enable it.
The Japanese translation was discovered to both use the wrong
ordering for %.*s translations with different positions, and
missing the dot, e.g.
%1$*2$s should have been %2$.*1$s
(the number after % matches the string and the number after
.* the size)
| -rw-r--r-- | CMake/Translations.cmake | 4 | ||||
| -rw-r--r-- | doc/po/apt-doc.pot | 2 | ||||
| -rw-r--r-- | po/apt-all.pot | 2 | ||||
| -rw-r--r-- | po/ja.po | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index a7fe6c95b..d8e5a3698 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -114,7 +114,7 @@ function(apt_add_translation_domain) DEPENDS ${file} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp ) add_custom_command(OUTPUT ${outdir}/${domain}.mo - COMMAND msgfmt --statistics -o ${outdir}/${domain}.mo ${outdir}/${domain}.po + COMMAND msgfmt --check --statistics -o ${outdir}/${domain}.mo ${outdir}/${domain}.po DEPENDS ${outdir}/${domain}.po ) @@ -179,7 +179,7 @@ function(apt_add_po_statistics excluded) add_custom_command( TARGET statistics PRE_BUILD COMMAND printf "%-6s " "${langcode}:" - COMMAND msgfmt --statistics -o /dev/null ${translation} + COMMAND msgfmt --check --statistics -o /dev/null ${translation} VERBATIM ) endforeach() diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index 992fd9663..5801149de 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 3.0.1\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2025-04-25 21:10+0000\n" +"POT-Creation-Date: 2025-05-06 17:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" diff --git a/po/apt-all.pot b/po/apt-all.pot index f520ed66b..6d987ed6c 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 3.0.1\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2025-04-25 21:10+0000\n" +"POT-Creation-Date: 2025-05-06 17:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -3777,7 +3777,7 @@ msgstr " %.*s に override エントリがありません\n" #: ftparchive/writer.cc #, c-format msgid " %.*s maintainer is %.*s not %s\n" -msgstr " %1$*2$s メンテナは %5$s ではなく %3$*4$s です\n" +msgstr " %2$.*1$s メンテナは %5$s ではなく %4$.*3$s です\n" #: ftparchive/writer.cc #, c-format |
