Your message dated Thu, 25 Feb 2010 16:42:01 +0100 (CET) with message-id <[email protected]> has caused the report #516889, regarding gettext: syntax error if comments are reordered to be marked as having been forwarded to the upstream software author(s) [email protected]
(NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 516889: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516889 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Received this from the Debian BTS a lot of time ago. There is a paragraph in the manual about this ("3 The Format of PO Files"), but I'm not sure how conclusive it is in this case, so I'd like to hear the author's opinion. Thanks. ---------- Forwarded message ---------- From: Jens Seidel <[email protected]> To: [email protected] Date: Tue, 24 Feb 2009 11:03:01 +0100 Subject: Bug#516889: gettext: syntax error if comments are reordered Package: gettext Version: 0.17-4 Hi, I noticed that msgmerge is very picky about the order of comments in PO files. $ cat test.po msgid "" msgstr "" "Project-Id-Version: test\n" "PO-Revision-Date: 2009-02-23 23:21+0100\n" "Last-Translator: <j...@localhost>\n" "Language-Team: German <j...@localhost>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #| msgid "File not found :-)" #: test.cc:1 #, c-format msgid "File not found" msgstr "Datei nicht gefunden" $ msgfmt -cv test.po test.po:13:1: syntax error msgfmt: found 1 fatal error Reordering the comments to #: test.cc:1 #, c-format #| msgid "File not found :-)" fixes this problem. You may ask why I used a PO file with such an ordering, right? The reason is that I have also access to gettext version 0.15 (doesn't support --previous option of msgmerge) and with this version I get: $ sed 's/test.cc:1/test.cc:2/' test.po > test-new.po $ msgmerge -U test-new.po test.po Comments look now: # | msgid "File not found :-)" #: test.cc:1 #, c-format I now substituted "# |" by "#|" because I don't want to commit a PO file with unwanted "# |" comments and get an invalid file ... Nevertheless gettext 0.15 doesn't report errors so I committed a bogus file. PS: Just in case you wonder why I call msgmerge to update a file against itself: I found that this improves line breaks (the result of msgmerge and xgettext is very different in this regard!!) and leads to smaller diffs for version control systems. This is probably worth a separate bug report. Jens
--- End Message ---

