[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] "msgfmt -c" bug
From: |
Paul Franklin |
Subject: |
[bug-gettext] "msgfmt -c" bug |
Date: |
Tue, 22 Mar 2016 19:04:24 +0000 |
I have never sent a message like this before so my apologies
if I get something wrong.
I believe there is a bug in the msgfmt section of gettext.
It happens in a recent (0.19.6) version.
The problem is that a legal (I believe) string in the xx.po
file is being flagged as an error -- but only if it has a
particular comment, and only if the "-c" (check) argument is
given. If the comment is first altered the (same) string
does not get flagged as being in error, with the "-c".
But I believe the correct translation happens, either way.
To trigger this bug, make an xx.po file (with a correct
header) with this stanza in it:
#: ../gramps/gen/datehandler/_datedisplay.py:168
#, python-brace-format
msgid "{long_month} {year}"
msgstr "{long_month.f[D]} {year}"
and when you run run "msgfmt -c -v xx.po" on it, it is
flagged as having an error:
xx.po:21: 'msgstr' is not a valid Python brace format string, unlike
'msgid'. Reason: In the directive number 0, there is an unterminated
format directive.
msgfmt: found 1 fatal error
(although the next line says it was successfully translated
but I forgot to copy it into this message,) whereas if the
comment is first manually changed then no errors are typed
out, with "-c" (and the correct translation still happens):
#: ../gramps/gen/datehandler/_datedisplay.py:168
#, python-format
msgid "{long_month} {year}"
msgstr "{long_month.f[D]} {year}"
So I would appreciate it if you would enter this bug into
your system.
Thank you.
- [bug-gettext] "msgfmt -c" bug,
Paul Franklin <=