Bug 886901

Summary: [kn_IN] list index out of range
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: alikins, bkearney, svenkate, tlavigne
Target Milestone: rcKeywords: Translation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.1.15-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-26 16:50:52 UTC Type: Bug
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:    
Bug Blocks: 771481    

Description John Sefler 2012-12-13 14:37:35 UTC
Description of problem:
I suspect a bad translation exists in /usr/share/locale/kn/LC_MESSAGES/rhsm.mo


Version-Release number of selected component (if applicable):
[root@rhsm-accept-rhel6 ~]# rpm -q subscription-manager
subscription-manager-1.1.14-1.el6.x86_64

How reproducible:


Steps to Reproduce:
[root@rhsm-accept-rhel6 ~]# LANG=kn_IN.UTF-8 subscription-manager -h register
list index out of range

  
Actual results:


Expected results:


Additional info:
[root@rhsm-accept-rhel6 ~]# tail -f /var/log/rhsm/rhsm.log

2012-12-13 09:14:54,573 [ERROR]  @managercli.py:115 - exception caught in subscription-manager
2012-12-13 09:14:54,574 [ERROR]  @managercli.py:116 - list index out of range
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 88, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 79, in main
    return managercli.ManagerCLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 2085, in main
    return CLI.main(self)
  File "/usr/share/rhsm/subscription_manager/cli.py", line 156, in main
    return cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 321, in main
    (self.options, self.args) = self.parser.parse_args(args)
  File "/usr/lib64/python2.6/optparse.py", line 1394, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1438, in _process_args
    self._process_short_opts(rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1545, in _process_short_opts
    option.process(opt, value, values, self)
  File "/usr/lib64/python2.6/optparse.py", line 788, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib64/python2.6/optparse.py", line 810, in take_action
    parser.print_help()
  File "/usr/share/rhsm/subscription_manager/i18n_optparse.py", line 163, in print_help
    sys.stdout.write(self.format_help())
  File "/usr/lib64/python2.6/optparse.py", line 1644, in format_help
    result.append(self.format_option_help(formatter))
  File "/usr/lib64/python2.6/optparse.py", line 1624, in format_option_help
    result.append(OptionContainer.format_option_help(self, formatter))
  File "/usr/lib64/python2.6/optparse.py", line 1073, in format_option_help
    result.append(formatter.format_option(option))
  File "/usr/share/rhsm/subscription_manager/i18n_optparse.py", line 116, in format_option
    result.append("%*s%s\n" % (indent_first, "", help_lines[0]))
IndexError: list index out of range

Comment 1 Adrian Likins 2012-12-13 15:55:58 UTC
looks like the kn translations translates:

#: ../src/subscription_manager/managercli.py:851
msgid "the type of unit to register, defaults to system"
msgstr " "


Note: not emtpy string ala not translated, but " ", which causes
the help formatter to fail

Both should probably be fixed.

Comment 3 Shankar Prasad 2012-12-14 05:49:10 UTC
That was translated as "space". I had fixed this in the latest subscription-manager-1.1.X

Ref: https://translate.zanata.org/zanata/webtrans/translate?project=subscription-manager&iteration=1.1.X&localeId=kn&locale=en#view:doc;doc:keys;search:the type of unit to register, defaults to system

Shankar

Comment 4 Adrian Likins 2012-12-14 17:49:23 UTC
fixed with latest strings


(There should probably be an accompanied code change to prevent the crash
in this scenario, but it's kind of rare. Something for next release)

Comment 5 John Sefler 2013-01-09 16:02:44 UTC
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.20-1.el6.x86_64


[root@jsefler-6 ~]# msgunfmt --no-wrap /usr/share/locale/kn/LC_MESSAGES/rhsm.mo | grep -A1 "the type of unit"
msgid "the type of unit to register, defaults to system"
msgstr "ನೋಂದಾಯಿಸಬೇಕಿರುವ ಘಟಕದ ಬಗೆ, ವ್ಯವಸ್ಥೆಗೆ ಪೂರ್ವನಿಯೋಜಿತಗೊಳ್ಳುತ್ತದೆ"

VERIFIED: offending msgid is now translated in kn


[root@jsefler-6 ~]# LANG=kn_IN.UTF-8 subscription-manager -h register
ಬಳಕೆ: subscription-manager register [OPTIONS]

ಈ ವ್ಯವಸ್ಥೆಯನ್ನು ಗ್ರಾಹಕ
ಪೋರ್ಟಲ್ ಅಥವ ಬೇರಾವುದೇ ಚಂದಾದಾರ
ವ್ಯವಸ್ಥಾಪನಾ ಸೇವೆಯೊಂದಿಗೆ
ನೋಂದಾಯಿಸಿ

ಆಯ್ಕೆಗಳು:
  -h, --help            ಈ ನೆರವಿನ ಸಂದೇಶವನ್ನು
                        ತೋರಿಸಿ ನಿರ್ಗಮಿಸು
  --proxy=PROXY_URL     proxy_hostname:proxy_port
                        ರೂಪದಲ್ಲಿರುವ
                        ಪ್ರಾಕ್ಸಿ url
  --proxyuser=PROXY_USER
                        ಮೂಲಭೂತ
                        ದೃಢೀಕರಣದೊಂದಿಗಿನ http
                        ಪ್ರಾಕ್ಸಿಗಾಗಿನ
                        ಬಳಕೆದಾರ
  --proxypassword=PROXY_PASSWORD
                        ಮೂಲಭೂತ
                        ದೃಢೀಕರಣದೊಂದಿಗಿನ http
                        ಪ್ರಾಕ್ಸಿಗಾಗಿನ
                        ಬಳಕೆದಾರ
  --username=USERNAME   ಪರಿಚಾರಕದಲ್ಲಿ
                        ದೃಢೀಕರಿಸುವಾಗ
                        ಬಳಸಬೇಕಿರುವ ಬಳಕೆದಾರ
                        ಹೆಸರು
  --password=PASSWORD   ಪರಿಚಾರಕದಲ್ಲಿ
                        ದೃಢೀಕರಿಸುವಾಗ
                        ಬಳಸಬೇಕಿರುವ ಗುಪ್ತಪದ
  --serverurl=SERVER_URL
                        https://hostname:443/prefix
                        ರೂಪದಲ್ಲಿರುವ
                        ಪೂರೈಕೆಗಣಕ url
  --baseurl=BASE_URL    ಕಂಟೆಂಟ್‌ಗಾಗಿ
                        https://hostname:443/prefix
                        ರೂಪದಲ್ಲಿರುವ ಮೂಲ url
  --type=UNITTYPE       ನೋಂದಾಯಿಸಬೇಕಿರುವ
                        ಘಟಕದ ಬಗೆ, ವ್ಯವಸ್ಥೆಗೆ
                        ಪೂರ್ವನಿಯೋಜಿತಗೊಳ್ಳುತ್ತದೆ
  --name=SYSTEMNAME     ನೋಂದಾಯಿಸಬೇಕಿರುವ
                        ವ್ಯವಸ್ಥೆಯ ಹೆಸರು,
                        ಪೂರ್ವನಿಯೋಜಿತವು
                        ಆತಿಥೇಯ
                        ಹೆಸರಾಗಿರುತ್ತದೆ
  --consumerid=SYSTEMID
                        ಈಗಿರುವ ವ್ಯವಸ್ಥೆಯ
                        ದತ್ತಾಂಶವನ್ನು
                        ಪೂರೈಕೆಗಣಕದಿಂದ
                        ತೆಗೆದುಕೊಳ್ಳಲಾಗುತ್ತದೆ
  --org=ORG             ಬಳಕೆದಾರರಿಗಾಗಿ ಹಲವು
                        ಸಂಸ್ಥೆಗಳಲ್ಲಿ
                        ಒಂದಕ್ಕೆ ನೊಂದಾಯಿಸಿ
  --environment=ENVIRONMENT
                        ಉದ್ಧೇಶಿತ
                        ಸಂಸ್ಥೆಯಲ್ಲಿ ಒಂದು
                        ನಿರ್ದಿಷ್ಟ
                        ಪರಿಸರಕ್ಕೆ
                        ನೋಂದಾಯಿಸಿ
  --release=RELEASE     ಬಿಡುಗಡೆಯ
                        ಆವೃತ್ತಿಯನ್ನು
                        ಹೊಂದಿಸಿ
  --autosubscribe       ಅಪ್ರಚಲಿತಗೊಳಿಸಲಾಗಿದೆ,
                        --auto-attach ಅನ್ನು ನೋಡಿ
  --auto-attach         ಈ ವ್ಯವಸ್ಥೆಯನ್ನು
                        ಸ್ವಯಂಚಾಲಿತವಾಗಿ
                        ಹೊಂದಿಕೆಯಾಗುವ
                        ಚಂದಾದಾರಿಕೆಗಳಿಗೆ
                        ಲಗತ್ತಿಸು
  --force               ವ್ಯವಸ್ಥೆಯನ್ನು
                        ಈಗಾಗಲೆ
                        ನೋಂದಾಯಿಸಲಾಗಿದ್ದರೂ
                        ಸಹ ಮತ್ತೊಮ್ಮೆ
                        ನೋಂದಾಯಿಸು
  --activationkey=ACTIVATION_KEYS
                        ನೋಂದಣಿಗಾಗಿ
                        ಬಳಸಬೇಕಿರುವ
                        ಸಕ್ರಿಯಗೊಳಿಸುವ ಕೀಲಿ
                        (ಒಂದಕ್ಕಿಂತ ಹೆಚ್ಚು
                        ಬಾರಿ ಸೂಚಿಸಬಹುದು)
  --servicelevel=SERVICE_LEVEL
                        ಸ್ವಯಂಚಾಲಿತವಾಗಿ
                        ಚಂದಾದಾರವಾಗಿಸುವಾಗ
                        ಬಳಸಲಾಗುವ ವ್ಯವಸ್ಥೆ
                        ಆದ್ಯತೆ
[root@jsefler-6 ~]# 


VERIFIED: register --help now displays for kn