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-manager | Assignee: | Adrian Likins <alikins> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | IDM QE LIST <seceng-idm-qe-list> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 5.8 | CC: | alikins, bkearney, fsharath, jsefler, lijli, mkhusid, ndai, noriko, qe-i18n-bugs, smaitra | ||||
Target Milestone: | rc | Keywords: | i18n | ||||
Target Release: | 5.7 | ||||||
Hardware: | Unspecified | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
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 21:41:43 UTC | Type: | --- | ||||
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: | 771751 | ||||||
Bug Blocks: | 771748, 807971, 820040 | ||||||
Attachments: |
|
Description
Lijun Li
2011-11-09 07:10:37 UTC
Created attachment 532473 [details]
RHSM CLI_repos module --help message_strings displayed as question mark_ja_JP
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 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). It's reproduced on subscription-manager-0.98.10-1.el5 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. "このシステム用に権利があるレポジトリの一覧表示" 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. > 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>
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.
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 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 Bug Clean Up, these are in the current release. |