Bug 752316

Summary: [ja_JP] [RHSM CLI] repos module --help message_some strings displayed as question mark.
Product: Red Hat Enterprise Linux 5 Reporter: Lijun Li <lijli>
Component: subscription-managerAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: high Docs Contact:
Priority: high    
Version: 5.8CC: alikins, bkearney, fsharath, jsefler, lijli, mkhusid, ndai, noriko, qe-i18n-bugs, smaitra
Target Milestone: rcKeywords: i18n
Target Release: 5.7   
Hardware: Unspecified   
OS: Linux   
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: ---
Bug Depends On: 771751    
Bug Blocks: 807971, 771748, 820040    
Description Flags
RHSM CLI_repos module --help message_strings displayed as question mark_ja_JP none

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):

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
[root@jsefler-onprem-62server ~]# LANG=ja_JP.UTF8 subscription-manager repos --help
使用法: subscription-manager repos [OPTIONS]


  -h, --help  このヘルプメッセージを表示して終了
  --list      このシステム用に権利があるレポジトリの一覧
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

RHEL 5.9

# rpm -qa | grep subscription-manager
[root@fsharath-rhel59server rhn]# rpm -qa | grep python-rhsm

Actual Result:
# LANG=ja_JP.UTF8 subscription-manager repos --help
使用法: subscription-manager repos [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. 

Comment 19 Sharath Dwaral 2012-07-16 13:19:13 EDT

# rpm -qa | egrep "subscription-manager|python-rhsm"

Verification :

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


  -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.