Hide Forgot
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)
This bug happens with all module supported by subscription-manager command. Following command does not work in localized environment. # subscription-manager <module> -help
Does this mean that help text should not be localized? http://bugs.python.org/issue4319
(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?
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.
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.
fix applied to master and EL6 branches. we should now be able to display localized help options
Created attachment 915199 [details] Comment (This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).
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