Bug 752316 - [ja_JP] [RHSM CLI] repos module --help message_some strings displayed as question mark.
[ja_JP] [RHSM CLI] repos module --help message_some strings displayed as que...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.8
Unspecified Linux
high Severity high
: rc
: 5.7
Assigned To: Adrian Likins
IDM QE LIST
: i18n
Depends On: 771751
Blocks: 807971 771748 820040
  Show dependency treegraph
 
Reported: 2011-11-09 02:10 EST by Lijun Li
Modified: 2013-01-10 05:57 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Improper handling of multi-byte unicode characters in a dependent library. Consequence: Some multi-byte unicode characters were not being rendered properly. Fix: subscription-manager overrode the incorrect handling of multi-byte characters by subclassing the dependent library. Result: All help strings are displayed properly.
Story Points: ---
Clone Of:
: 771751 820040 (view as bug list)
Environment:
Last Closed: 2012-12-10 16:41:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
RHSM CLI_repos module --help message_strings displayed as question mark_ja_JP (37.79 KB, image/png)
2011-11-09 02:15 EST, Lijun Li
no flags Details

  None (edit)
Description Lijun Li 2011-11-09 02:10:37 EST
Description of problem:
sudo subscription-manager repos --help message, some strings displayed as question mark.


Version-Release number of selected component (if applicable):
subscription-manager-0.96.17-1.el6


How reproducible:


Steps to Reproduce:
1.Run subscription-manager CLI in terminal
sudo subscription-manager repos --help
  
Actual results:
sudo subscription-manager repos --help message, some strings displayed as question mark.

Expected results:
All the strings should be displayed correctly.

Additional info:
Comment 2 Lijun Li 2011-11-09 02:15:36 EST
Created attachment 532473 [details]
RHSM CLI_repos module  --help message_strings displayed as question mark_ja_JP
Comment 6 John Sefler 2011-11-09 10:02:56 EST
Reconfirmation of this bug...
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.17-1.el6.x86_64
[root@jsefler-onprem-62server ~]# LANG=ja_JP.UTF8 subscription-manager repos --help
使用法: subscription-manager repos [OPTIONS]

このマシンが使用権利を持つレポジトリの一覧表示

オプション:
  -h, --help  このヘルプメッセージを表示して終了
  --list      このシステム用に権利があるレポジトリの一覧
              ��示
              ^^ OFFENDING CHARACTERS
Comment 8 Adrian Likins 2011-11-09 10:30:24 EST
The root cause of this looks to be a bug in the textwrap module in the main
python package. subscription-manager uses optparse, which uses textwrap to
help format help strings. It seems like textwrap is prone to splitting strings
in the middle of multibyte chars. 

(see https://code.launchpad.net/~songofacandy/bzr/i18n-utextwrap/+merge/59950
and http://mercurial.808500.n3.nabble.com/PATCH-replace-Python-standard-textwrap-by-MBCS-sensitive-one-for-i18n-text-td873814.html for examples of other folks running into this).
Comment 10 Lijun Li 2012-01-12 03:24:37 EST
It's reproduced on subscription-manager-0.98.10-1.el5
Comment 12 Noriko Mizumoto 2012-03-20 20:02:43 EDT
Japanese and some other Asian languages are written in double width. There is nothing to do for translator. Here is the full translation for this string.

"このシステム用に権利があるレポジトリの一覧表示"
Comment 14 RHEL Product and Program Management 2012-04-02 06:49:20 EDT
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 16 Adrian Likins 2012-05-29 09:10:58 EDT
> this commit fixes this bug, and is in master so headed for 5.9. This particular bug id wasn't included, but similar dupes were.

commit 775eda713fee3795b41e0ece1bb359ab9f841582
Author: Adrian Likins <alikins@redhat.com>
Date:   Wed May 9 11:39:29 2012 -0400

    820040,820037,820030: don't break multibyte help blurbs
    
    Add a optparse.HelpFormatter subclass that includes
    a version of format_option that does not try to split
    long words.This behavior is broken for multibyte cases.
    
    This includes code cut&paste from optparse.py in
    the python dist.
Comment 17 Sharath Dwaral 2012-06-20 14:31:24 EDT
Version

RHEL 5.9

# rpm -qa | grep subscription-manager
subscription-manager-migration-1.0.4-1.git.0.0fe81f8.el5
subscription-manager-1.0.4-1.git.0.0fe81f8.el5
subscription-manager-migration-data-1.11.1.1-1.git.2.c7fbafe.el5
subscription-manager-gui-1.0.4-1.git.0.0fe81f8.el5
subscription-manager-firstboot-1.0.4-1.git.0.0fe81f8.el5
[root@fsharath-rhel59server rhn]# rpm -qa | grep python-rhsm
python-rhsm-1.0.2-1.git.1.4659671.el5

Actual Result:
# LANG=ja_JP.UTF8 subscription-manager repos --help
使用法: subscription-manager repos [OPTIONS]

このマシンが使用権利を持つレポジトリの一覧表示

options:
  -h, --help        このヘルプメッセージを表示して終了
  --list            list known repos for this system
  --enable=REPOID   repo to enable
  --disable=REPOID  repo to disable

Expected Result:
All strings to be translated

Comments :

> Waiting for translations to be completed. 

> ON HOLD
Comment 19 Sharath Dwaral 2012-07-16 13:19:13 EDT
Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-gui-1.0.9-1.git.4.59ef2fe.el5
python-rhsm-1.0.3-1.git.2.47dc8f4.el5
subscription-manager-migration-data-1.11.2.2-1.git.0.2eea155.el5
subscription-manager-migration-1.0.9-1.git.4.59ef2fe.el5
subscription-manager-firstboot-1.0.9-1.git.4.59ef2fe.el5
subscription-manager-1.0.9-1.git.4.59ef2fe.el5

Verification :

# LANG=ja_JP.UTF8 subscription-manager repos --help
使用法: 使用法: subscription-manager repos [オプション]

このマシンが使用権利を持つレポジトリの一覧表示

options:
  -h, --help        このヘルプメッセージを表示して終了
  --list            このシステム用の既知のレポジトリを一覧表示
  --enable=REPOID   有効にするレポジトリ
  --disable=REPOID  無効にするレポジトリ

Moving bug to VERIFIED
Comment 21 Bryan Kearney 2012-12-10 16:41:43 EST
Bug Clean Up, these are in the current release.

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