Bug 688469 - subscription-manager <module> --help does not work in localized environment.
Summary: subscription-manager <module> --help does not work in localized environment.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: QE Internationalization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 568421
TreeView+ depends on / blocked
 
Reported: 2011-03-17 06:46 UTC by Kenichi Takemura
Modified: 2014-08-04 22:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:40:26 UTC
Target Upstream Version:


Attachments (Terms of Use)
Comment (221.54 KB, text/plain)
2011-03-21 18:46 UTC, John Sefler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0611 0 normal SHIPPED_LIVE new package: subscription-manager 2011-05-18 17:56:21 UTC

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


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