Issue 39 in gettext-commons: msgfmt warning output breaks GettextDistTask

4 views
Skip to first unread message

codesite...@google.com

unread,
Mar 24, 2010, 10:19:14 AM3/24/10
to gettext-co...@googlegroups.com
Status: New
Owner: ----

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

codesite...@google.com

unread,
Apr 22, 2010, 10:09:00 PM4/22/10
to gettext-co...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 39 by bergerfx: msgfmt warning output breaks
GettextDistTask
http://code.google.com/p/gettext-commons/issues/detail?id=39

I adapted the parsing code in svn to only look at the last line of output
from "msgfmt --
statistics". This fixes the described problem.

I tested that msgfmt in fact builds po files into message bundles with such
warnings. So for
the time being, it seems to make sense to not fail building the message
bundles because of
warnings.

--
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

--
You received this message because you are subscribed to the Google Groups "Gettext Commons Development Discussion" group.
To post to this group, send email to gettext-co...@googlegroups.com.
To unsubscribe from this group, send email to gettext-commons-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gettext-commons-devel?hl=en.

Reply all
Reply to author
Forward
0 new messages