bug-gettext
[Top][All Lists]
Advanced

[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 17:57:12 -0400 (EDT)

Follow-up Comment #2, bug #65858 (group gettext):

Sorry, I was wrong when I wrote that "% s" could never work with printf().

But the real problem is not whether "% s" is a valid specifier or not, but
rather that it's a different specifier from "%s" present in the original
string and the format specifiers ought to be the same in both of them and it
was my understanding that `msgfmt -c` was supposed to check for this.

There is another similar example in the link above where the original string
contains "foo %d" and the translation is "bar %id". Here, again, "%i" is a
perfectly cromulent format specifier for printf(), but it's different from
"%d" used in the original string and is clearly due to a typo (extra "i"
inserted before "d").

Is `msgfmt -c` really supposed to check whether the format specifiers are
valid instead of checking that they're the same in both strings? The former
doesn't seem nearly as useful as the latter and I always thought that this is
what it did.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65858>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]