Red Hat Bugzilla – Bug 891166
localization fails for strings with parameters
Last modified: 2013-07-04 00:48:42 EDT
Description of problem:
The update_po action adds an entry to the target languages' Revision_History.xml files: "Translation files synchronised with XML sources <revnumber>"
This entry is added in the language set for the shell in which the command was run, not in the target language. When translators are working on a system on which the locale is set to something other than the language in which they work, the Revision_History.xml file is updated with text in a language different from that of the rest of the book.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run publican update_pot on a book
2. run publican update_po --langs and specify a language different from the locale of the shell in which you ran the command
3. look at the contents of <lang>/Revision_History.xml
<lang>/Revision_History.xml contains an entry in the language of the shell locale
<lang>/Revision_History.xml should contain an entry in the target language
Actually, I'm mistaken; the "Translation files synchronised with XML sources <revnumber>" entry appears in English regardless of the terminal language:
$ echo $LANG
the output from:
$ publican update_pot
$ publican update_po --langs it-IT
<member>Translation files synchronised with XML sources 8-4</member>
This is actually wider that this example. ALl strings wich contain parameters are not being translated.
maketext("this is a simple string");
maketext("this is a string with a parameter [_1]", $variable);
Appears to be a bug in perl-Locale-Maketext-Gettext which does not handle the mo file containing strings with gettext style '%1' instead of maketext style '[_1]'.
Hot fix 3.1.4 has been released with a fix for this issue.