Bug 830713 - broken gettext translations
broken gettext translations
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Petr Chalupa
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-06-11 05:50 EDT by Petr Chalupa
Modified: 2015-05-04 21:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-31 15:55:49 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 Petr Chalupa 2012-06-11 05:50:14 EDT
Description of problem:
When gettext (#_) is called like this:

_("Install of Packages '%{p}' scheduled for System Group '%{s}'." % 
    {:s => @group['name'], :p => params[:packages]})

#_ gets as a paramater String with user-data already interpolated into it. Therefore it can't be found and translated properly. Method #% should be always called on already translated String

_("Install of Packages '%{p}' scheduled for System Group '%{s}'.") %
    {'s' => @group['name'], 'p' => params[:packages]}

The difference is subtle, the bug is in placement of the encapsulating ')' for #_.

How reproducible:

Actual results:
Translations (with this mistake) into different languages than en wont get translated.

Expected results:
Translations will work.
Comment 1 Petr Chalupa 2012-06-11 10:35:58 EDT
fixed in 38db814f648b4bc3f9d3d866a1cf5cbf9051f65a
Comment 3 Petr Chalupa 2012-06-13 04:45:54 EDT
There are some broken translations left. Changing to assigned.
Comment 4 Petr Chalupa 2012-06-14 06:37:53 EDT
fixed in 7685490cd4e4a844d76d2d39204fd9c343f9f7e1
Comment 5 Lukas Zapletal 2012-07-31 11:13:56 EDT

your patch does not work with 1.9 therefore I have disabled it for 1.9. Can you please look on it and provide solution?


Comment 6 Petr Chalupa 2012-08-15 03:24:01 EDT
fixed in 31311aa1b541af19afc057a938ce82440262d7b2
Comment 7 Petr Chalupa 2012-08-16 09:42:24 EDT
I set modified by mistake, returning to on_dev
Comment 8 Mike McCune 2012-08-31 15:55:49 EDT
fixed in upstream and not going to get tested by QE so I'm closing this

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