Bug 891166 - localization fails for strings with parameters
localization fails for strings with parameters
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Fearn
tools-bugs
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2013-03-12 01:01:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
3.0

How reproducible:
100%

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:

Given:

$ echo $LANG
it_IT.utf8

the output from:

$ publican update_pot
$ publican update_po --langs it-IT

is still:

<revdescription>
					<simplelist>
						<member>Translation files synchronised with XML sources 8-4</member>
					</simplelist>
				</revdescription>
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.

e.g.

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.