Bug 891166 - localization fails for strings with parameters
localization fails for strings with parameters
Product: Publican
Classification: Community
Component: publican (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Fearn
Depends On:
  Show dependency treegraph
Reported: 2013-01-02 01:02 EST by Ruediger Landmann
Modified: 2013-07-04 00:48 EDT (History)
2 users (show)

See Also:
Fixed In Version: 3.1.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-12 01:01:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ruediger Landmann 2013-01-02 01:02:57 EST
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):

How reproducible:

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 
Actual results:
<lang>/Revision_History.xml contains an entry in the language of the shell locale

Expected results:
<lang>/Revision_History.xml should contain an entry in the target language

Additional info:
Comment 1 Ruediger Landmann 2013-03-06 22:30:20 EST
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

is still:

						<member>Translation files synchronised with XML sources 8-4</member>
Comment 2 Jeff Fearn 2013-03-07 22:26:02 EST
This is actually wider that this example.  ALl strings wich contain parameters are not being translated.


This works:

maketext("this is a simple string");

This fails:

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]'.
Comment 3 Jeff Fearn 2013-03-12 01:01:54 EDT
Hot fix 3.1.4 has been released with a fix for this issue.

Note You need to log in before you can comment on or make changes to this bug.