Bug 1265347

Summary: pofilter startwhitespace tests fail for many language translations in subscription-manager-1.15
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Chris "Ceiu" Rog <crog>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: crog, csnyder
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 11:51:03 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:

Description John Sefler 2015-09-22 17:48:44 UTC
Description of problem:
For many of the language translations in https://translate.zanata.org/zanata/iteration/view/subscription-manager/1.15.X the same whitespace at the start of the translated msgstr has not been maintained.  For example...

# (pofilter) startwhitespace: Different whitespace at the start
msgid "    Available Repositories in %s"
msgstr "%s 中的可用存储库"


Notice that the msgid has leading whitespace, but the msgstr does not.
While this seems trivial, it affects textural formatting that was intentionally programmed by the subscription-manager development team.

 

Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.15.9-11.git.0.ca4dfaa.el7.x86_64


How reproducible:


Steps to Reproduce:
Use the pofilter startwhitespace tool from http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pofilter.html


[root@jsefler-7 ~]# msgunfmt --no-wrap /usr/share/locale/ml/LC_MESSAGES/rhsm.mo >> /usr/share/locale/ml/LC_MESSAGES/rhsm.po
[root@jsefler-7 ~]# pofilter --gnome -t startwhitespace /usr/share/locale/ml/LC_MESSAGES/rhsm.poprocessing 1 files...
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-02 14:20-0400\n"
"PO-Revision-Date: 2014-12-24 02:20-0500\n"
"Last-Translator: anipeter <anipeter>\n"
"Language-Team: Malayalam\n"
"Language: ml\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.7.1\n"

# (pofilter) startwhitespace: Different whitespace at the start
msgid ""
"\n"
"Service level \"%s\" is not available."
msgstr ""
"\n"
" \"%s\" സര്‍വീസ് ലവല്‍ ലഭ്യമല്ല."

# (pofilter) startwhitespace: Different whitespace at the start
msgid "    Available Repositories in %s"
msgstr "  %s-ല്‍ ലഭ്യമായ റിപ്പോസിറ്ററികള്‍"

# (pofilter) startwhitespace: Different whitespace at the start
msgid "Stack of %s and %s others"
msgstr " %s, മറ്റു് %s-ന്റെ സ്റ്റാക്ക്"

# (pofilter) startwhitespace: Different whitespace at the start
msgid "Stack of %s and 1 other"
msgstr " %s, മറ്റൊരണ്ണത്തിന്റേയും സ്റ്റാക്ക്"

# (pofilter) startwhitespace: Different whitespace at the start
msgid ""
"\n"
"Service level \"%s\" is not available."
msgstr ""
"\n"
" \"%s\" സര്‍വീസ് ലവല്‍ ലഭ്യമല്ല."

# (pofilter) startwhitespace: Different whitespace at the start
msgid "    Available Repositories in %s"
msgstr "  %s-ല്‍ ലഭ്യമായ റിപ്പോസിറ്ററികള്‍"

# (pofilter) startwhitespace: Different whitespace at the start
msgid "Stack of %s and %s others"
msgstr " %s, മറ്റു് %s-ന്റെ സ്റ്റാക്ക്"

# (pofilter) startwhitespace: Different whitespace at the start
msgid "Stack of %s and 1 other"
msgstr " %s, മറ്റൊരണ്ണത്തിന്റേയും സ്റ്റാക്ക്"

# (pofilter) startwhitespace: Different whitespace at the start
msgid ""
"\n"
"Service level \"%s\" is not available."
msgstr ""
"\n"
" \"%s\" സര്‍വീസ് ലവല്‍ ലഭ്യമല്ല."

# (pofilter) startwhitespace: Different whitespace at the start
msgid "    Available Repositories in %s"
msgstr "  %s-ല്‍ ലഭ്യമായ റിപ്പോസിറ്ററികള്‍"

# (pofilter) startwhitespace: Different whitespace at the start
msgid "Stack of %s and %s others"
msgstr " %s, മറ്റു് %s-ന്റെ സ്റ്റാക്ക്"

# (pofilter) startwhitespace: Different whitespace at the start
msgid "Stack of %s and 1 other"
msgstr " %s, മറ്റൊരണ്ണത്തിന്റേയും സ്റ്റാക്ക്"
[###########################################] 100%


Actual results:
above you's see several test failures for LANG=ml_IN.utf-8

Comment 2 John Sefler 2015-09-23 18:26:17 UTC
Done... I've made my first pass at manually fixing all the langs in Zanata project subscription-manager/1.15.X for leading whitespace.

Comment 3 Chris "Ceiu" Rog 2015-09-28 14:41:42 UTC
The resolution for this is peculiar. Due to the differences in translation states between our current upstream master and the intended release for RHEL 7.2, this has two different commits:

RHEL 7.2:
commit ca643f7a62599e64eea851d8322812d104195628
Author: Chris Rog <crog>
Date:   Fri Sep 25 10:12:48 2015 -0400

    1265347, 1265371: Updated translations with whitespace corrections


Upstream master:
commit 989ea32a96e64feaa7b7197b9eb136d4c49e55ca
Author: Chris Rog <crog>
Date:   Wed Sep 23 16:10:12 2015 -0400

    1265347, 1265371: Added translation updates and corrections from 1.15.X
    
    - Updated the .po files to inclued the translation updates and corrections
      made in the 1.15.X branch

Comment 7 John Sefler 2015-09-29 19:26:54 UTC
Testing Version...
[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.15.9-12.el7.x86_64

Here's a summary of the LANG (bn_IN zh_TW) translations that are still failing...

[root@jsefler-7 ~]# pofilter -t startwhitespace /usr/share/locale/bn_IN/LC_MESSAGES/rhsm.po | grep -A3 pofilter
processing 1 files...
[###########################################] 100%
# (pofilter) startwhitespace: Different whitespace at the start
msgid "    Available Repositories in %s"
msgstr "        %s-এ উপলব্ধ সংগ্রহস্থল"


[root@jsefler-7 ~]# pofilter -t startwhitespace /usr/share/locale/zh_TW/LC_MESSAGES/rhsm.po | grep -A3 pofilter
processing 1 files...
[###########################################] 100%
# (pofilter) startwhitespace: Different whitespace at the start
msgid "    Available Repositories in %s"
msgstr "%s 中的可用軟體庫"

Comment 8 Chris Snyder 2015-09-30 16:35:35 UTC
Please retest against snap 4

Comment 9 John Sefler 2015-10-01 19:45:53 UTC
Verifying Version...
[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.15.9-13.el7.x86_64

[root@jsefler-7 ~]# for F in $(rpm -ql subscription-manager | grep rhsm.mo); do echo ""; echo $F; msgunfmt --no-wrap $F >> $F.po; pofilter -t startwhitespace $F.po; done;

/usr/share/locale/as/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/bn_IN/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/de_DE/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/es_ES/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/fr/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/gu/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/hi/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/it/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/ja/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/kn/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/ko/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/ml/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/mr/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/or/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/pa/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/pt_BR/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/ru/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/ta_IN/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/te/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/zh_CN/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%

/usr/share/locale/zh_TW/LC_MESSAGES/rhsm.mo
processing 1 files...
[###########################################] 100%


VERIFIED: all translations in all translated LANGs pass the startwhitespace test

Comment 10 errata-xmlrpc 2015-11-19 11:51:03 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.

https://rhn.redhat.com/errata/RHBA-2015-2122.html