Bug 688469

Summary: subscription-manager <module> --help does not work in localized environment.
Product: Red Hat Enterprise Linux 6 Reporter: Kenichi Takemura <ktakemur>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: QE Internationalization Bugs <qe-i18n-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: bkearney, ebaak, jsefler, jzhao
Target Milestone: rcKeywords: i18n
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:40:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 568421    
Attachments:
Description Flags
Comment none

Description Kenichi Takemura 2011-03-17 06:46:25 UTC
Description of problem:

running subscription-manager with 'clean --help' options does not work in localized environment.

Version-Release number of selected component (if applicable):

subscription-manager-0.95.4-1.el6.i686
subscription-manager-gnome-0.95.4-1.el6.i686
subscription-manager-firstboot-0.95.4-1.el6.i686

How reproducible:
100%

Actual Results:

$LANG=en_US.UTF8 sudo subscription-manager clean --help
Usage: subscription-manager clean [OPTIONS]

removes all local consumer data, does not effect the server

Options:
  -h, --help     show this help message and exit
  --debug=DEBUG  debug level
$LANG=ja_JP.UTF8 sudo subscription-manager clean --help
'ascii' codec can't decode byte 0xe5 in position 45: ordinal not in range(128)
$LANG=ko_KR.UTF8 sudo subscription-manager clean --help
'ascii' codec can't decode byte 0xec in position 45: ordinal not in range(128)
$LANG=zh_CN.UTF8 sudo subscription-manager clean --help
'ascii' codec can't decode byte 0xe5 in position 45: ordinal not in range(128)
$LANG=zh_TW.UTF8 sudo subscription-manager clean --help
'ascii' codec can't decode byte 0xe7 in position 45: ordinal not in range(128)
$LANG=pt_BR.UTF8 sudo subscription-manager clean --help
'ascii' codec can't decode byte 0xc3 in position 86: ordinal not in range(128)
$LANG=de_DE.UTF8 sudo subscription-manager clean --help
'ascii' codec can't decode byte 0xc3 in position 55: ordinal not in range(128)

Comment 2 Kenichi Takemura 2011-03-17 07:05:32 UTC
This bug happens with all module supported by subscription-manager command.

Following command does not work in localized environment.

# subscription-manager <module> -help

Comment 3 Bryan Kearney 2011-03-17 20:46:13 UTC
Does this mean that help text should not be localized?

http://bugs.python.org/issue4319

Comment 4 Kenichi Takemura 2011-03-18 00:09:02 UTC
(In reply to comment #3)
> Does this mean that help text should not be localized?
> 
> http://bugs.python.org/issue4319

Well if help text is already localized but it does not come out due to the python issue, is it possible to show English help text until the issue has been resolved?

Comment 5 Kenichi Takemura 2011-03-18 04:29:03 UTC
Hm..this is really troublesome when you run subscription-manager command from a localized terminal. Every time you need to type LANG=en_US.utf8 before the command line.

Comment 6 James Bowes 2011-03-18 13:09:25 UTC
If we tell optparse to not add in the standard help option, then add one in ourselves and handle it manually, we can get the strings to print out without changing too much code. Alternatively we could switch to argparse, though I don't know its status in EL6 or EL5.

Comment 7 James Bowes 2011-03-21 13:51:59 UTC
fix applied to master and EL6 branches. we should now be able to display localized help options

Comment 9 John Sefler 2011-03-21 18:46:43 UTC
Created attachment 915199 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 10 errata-xmlrpc 2011-05-19 13:40:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html