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