Bug 984206

Summary: def friendly_join(items): in utils.py should not use string " and "
Product: Red Hat Enterprise Linux 5 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.10CC: alikins, bkearney, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 23:13:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 840995    

Description John Sefler 2013-07-13 15:53:49 UTC
Description of problem:

The following line of code in src/subscription_manager/utils.py contains the string " and " which has a white space character for a suffix and prefix.  This is a dangerous string to pass to the translation team.  They will likely strip the white space by accident resulting in a funny translation.

b0049611 (Bryan Kearney  2013-05-07 16:32:16 -0400 390)     return first_string + _(" and ") + last


I believe this would be a more translation friendly way to code this line...
  return first_string + " "+_("and")+" " + last




Version-Release number of selected component (if applicable):
[root@jsefler-5 ~]# rpm -q subscription-manager
subscription-manager-1.8.13-1.el5


Additional info:
[root@jsefler-5 ~]# msgunfmt /usr/share/locale/es_ES/LC_MESSAGES/rhsm.mo | grep "\" and \"" -A1
msgid " and "
msgstr "y"

^^^^^^^^^^^^^ Notice that es_ES has already failed this translation

Comment 1 RHEL Program Management 2013-07-13 15:57:15 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 John Sefler 2013-07-13 16:05:41 UTC
Notice below that seven LANGS [as][es_ES][hi][it][ja][ml][pt_BR] have failed this translation.


[root@jsefler-5 ~]# for i in `rpm -ql subscription-manager | grep rhsm.mo`; do echo $i; msgunfmt $i | grep "\" and \"" -A1; done;
/usr/share/locale/as/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "আৰু"
/usr/share/locale/bn_IN/LC_MESSAGES/rhsm.mo
/usr/share/locale/de_DE/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " und"
/usr/share/locale/es_ES/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "y"
/usr/share/locale/fr/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " et "
/usr/share/locale/gu/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " અને "
/usr/share/locale/hi/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "और"
/usr/share/locale/it/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "e"
/usr/share/locale/ja/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "および"
/usr/share/locale/kn/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " ಮತ್ತು "
/usr/share/locale/ko/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " 및 "
/usr/share/locale/ml/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "കൂടാതെ"
/usr/share/locale/mr/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " अँड "
/usr/share/locale/or/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " ଏବଂ"
/usr/share/locale/pa/LC_MESSAGES/rhsm.mo
/usr/share/locale/pt_BR/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr "e"
/usr/share/locale/ru/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " и "
/usr/share/locale/ta_IN/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " மற்றும் "
/usr/share/locale/te/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " మరియు "
/usr/share/locale/zh_CN/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " 以及 "
/usr/share/locale/zh_TW/LC_MESSAGES/rhsm.mo
msgid " and "
msgstr " 與 "
[root@jsefler-5 ~]#

Comment 3 Cory Scheviak 2013-07-31 15:08:12 UTC
8a4d21b3fb480c41162b1a13d57d34fc01cdd00e

and

8fe95ec94c177eea0ae8bc8808080e1e61219657

subscription-manager.git

Comment 4 Adrian Likins 2013-07-31 17:41:06 UTC
Note that this string is currently untranslated. I'll see if that is something
that can be copied in bulk.

Comment 7 John Sefler 2013-08-12 21:32:06 UTC
Testing Version...
[root@jsefler-5 ~]# rpm -q subscription-manager
subscription-manager-1.8.19-1.el5

[root@jsefler-5 ~]# rpm -ql subscription-manager | grep utils.py
/usr/share/rhsm/subscription_manager/utils.py
/usr/share/rhsm/subscription_manager/utils.pyc
/usr/share/rhsm/subscription_manager/utils.pyo
[root@jsefler-5 ~]# egrep \"and\" /usr/share/rhsm/subscription_manager/utils.py
    return first_string + " %s " % _("and") + last

^ VERIFIED: White space has been stripped off the "and" msgid string in the source


[root@jsefler-5 ~]# for i in `rpm -ql subscription-manager | grep rhsm.mo`; do echo $i; msgunfmt $i | grep "\" and \"" -A1; done;
/usr/share/locale/as/LC_MESSAGES/rhsm.mo
/usr/share/locale/bn_IN/LC_MESSAGES/rhsm.mo
/usr/share/locale/de_DE/LC_MESSAGES/rhsm.mo
/usr/share/locale/es_ES/LC_MESSAGES/rhsm.mo
/usr/share/locale/fr/LC_MESSAGES/rhsm.mo
/usr/share/locale/gu/LC_MESSAGES/rhsm.mo
/usr/share/locale/hi/LC_MESSAGES/rhsm.mo
/usr/share/locale/it/LC_MESSAGES/rhsm.mo
/usr/share/locale/ja/LC_MESSAGES/rhsm.mo
/usr/share/locale/kn/LC_MESSAGES/rhsm.mo
/usr/share/locale/ko/LC_MESSAGES/rhsm.mo
/usr/share/locale/ml/LC_MESSAGES/rhsm.mo
/usr/share/locale/mr/LC_MESSAGES/rhsm.mo
/usr/share/locale/or/LC_MESSAGES/rhsm.mo
/usr/share/locale/pa/LC_MESSAGES/rhsm.mo
/usr/share/locale/pt_BR/LC_MESSAGES/rhsm.mo
/usr/share/locale/ru/LC_MESSAGES/rhsm.mo
/usr/share/locale/ta_IN/LC_MESSAGES/rhsm.mo
/usr/share/locale/te/LC_MESSAGES/rhsm.mo
/usr/share/locale/zh_CN/LC_MESSAGES/rhsm.mo
/usr/share/locale/zh_TW/LC_MESSAGES/rhsm.mo

^ VERIFIED: the " and " msgid is no longer included in the translations.

I do NOT yet see the translations for the new "and" msgstr.
Leaving this bug ON_QA to verify the next build of subscription-manager after strings are pulled again.

Comment 8 John Sefler 2013-08-14 14:23:12 UTC
Verifying new msgid "and" has been translated...

[root@jsefler-5 ~]# rpm -q subscription-manager
subscription-manager-1.8.20-1.el5

[root@jsefler-5 ~]# for i in `rpm -ql subscription-manager | grep rhsm.mo`; do echo $i; msgunfmt $i | grep "\"and\"" -A1; done;
/usr/share/locale/as/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "আৰু"
/usr/share/locale/bn_IN/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "এবং"
/usr/share/locale/de_DE/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "und"
/usr/share/locale/es_ES/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "y"
/usr/share/locale/fr/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "et"
/usr/share/locale/gu/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "અને"
/usr/share/locale/hi/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "और"
/usr/share/locale/it/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "e"
/usr/share/locale/ja/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "および"
/usr/share/locale/kn/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "ಮತ್ತು"
/usr/share/locale/ko/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "및"
/usr/share/locale/ml/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr ","
/usr/share/locale/mr/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "आणि"
/usr/share/locale/or/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "ଏବଂ"
/usr/share/locale/pa/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "ਅਤੇ"
/usr/share/locale/pt_BR/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "e"
/usr/share/locale/ru/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "и"
/usr/share/locale/ta_IN/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "மற்றும்"
/usr/share/locale/te/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "మరియు"
/usr/share/locale/zh_CN/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "和"
/usr/share/locale/zh_TW/LC_MESSAGES/rhsm.mo
msgid "and"
msgstr "且"
[root@jsefler-5 ~]# 


Moving to VERIFIED

Comment 10 errata-xmlrpc 2013-09-30 23:13:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1332.html