New issue 39 by tobiaskringe: msgfmt warning output breaks GettextDistTask
http://code.google.com/p/gettext-commons/issues/detail?id=39
What steps will reproduce the problem?
1. have a po file which contains a translation with non-matching \n at the
beginning of the string
i.e.:
msgid "\nWarning!\n"
msgstr "Achtung!"
2. using gnuwin32 gettext (0.14.4), gettext-ant-task version 0.9.7 (or
earlier)
3. run the GettextDistTask Ant task
The build will fail with the following message:
...build.xml:360: For input string: "C:\Dokumente"
This issue is caused by the GettextDiskTask's attempt to parse the output
of the command 'msgfmt --statistics path/to/the/pofile.po'
This usually looks like this:
"1244 translated messages, 43 fuzzy translations, 29 untranslated messages."
But in this case, the non-matching newlines generate an additional warning:
"...\lv.po:256: `msgid' and `msgstr' entries do not both begin with '\n'
16 translated messages, 4 fuzzy translations, 1296 untranslated messages."
What is the expected output? What do you see instead?
Ideally the parsing of the msgfmt output should be independent of such
warnings. It would be probably sufficient to parse the string starting at
the end, or taking into account the percentage number's labels.
Another way would be a less restrictive exception handling at this point to
continue the build for other languages.
I understand that the missing \n int the translation is actually a mistake
that should (and will) be fixed by the translators. But when maintaining a
large number of translations at different states of completion it is very
unfortunate that the whole build fails because of a warning produced for
one of the po files.
What version of the product are you using? On what operating system?
GnuWin32 gettext (0.14.4)
gettext-ant-task version 0.9.7
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings