[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #65858] msgfmt -c doesn't detect broken format specifiers in transl
From: |
Vadim Zeitlin |
Subject: |
[bug #65858] msgfmt -c doesn't detect broken format specifiers in translations |
Date: |
Sun, 9 Jun 2024 07:43:22 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?65858>
Summary: msgfmt -c doesn't detect broken format specifiers in
translations
Group: GNU gettext
Submitter: zeitlin
Submitted: Sun 09 Jun 2024 01:43:22 PM CEST
Category: Translator tools
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 09 Jun 2024 01:43:22 PM CEST By: Vadim Zeitlin <zeitlin>
At least "% s" (which can never work when passed to printf() or similar
function) isn't detected as an error, here is a minimal but realistic
example:
--------------------------------- >8 --------------------------------------
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-06 16:05+0100\n"
"PO-Revision-Date: 2022-07-30 11:10+0200\n"
"Last-Translator: No Body <no.body@some.where>\n"
"Language-Team: \n"
"Language: ka\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../src/common/lzmastream.cpp:196
#, c-format
msgid "LZMA decompression error: %s"
msgstr "LZMA დეკომპრესიის შეცდომა: % s"
--------------------------------- >8 --------------------------------------
After saving this to ka.po the following command doesn't return any errors:
$ msgfmt -v -c -o /dev/null ka.po
1 translated message.
but it really should.
There seem to be other errors not detected by "msgfmt -c" shown by the changes
in https://github.com/wxWidgets/wxWidgets/pull/24592 but at least this one is
easily reproducible and should be easy to fix.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65858>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #65858] msgfmt -c doesn't detect broken format specifiers in translations,
Vadim Zeitlin <=
- [bug #65858] msgfmt -c doesn't detect broken format specifiers in translations, Bruno Haible, 2024/06/09
- [bug #65858] msgfmt -c doesn't detect broken format specifiers in translations, Vadim Zeitlin, 2024/06/09
- [bug #65858] msgfmt -c doesn't detect broken format specifiers in translations, Bruno Haible, 2024/06/09
- [bug #65858] msgfmt -c doesn't detect broken format specifiers in translations, Bruno Haible, 2024/06/09
- [bug #65858] msgfmt -c doesn't detect broken format specifiers in translations, Vadim Zeitlin, 2024/06/10