Bug 876692

Summary: String Updates: Consistency cleanups in --helps across subscription-manager and associated tools/scripts
Product: Red Hat Enterprise Linux 6 Reporter: Matt Reid <mreid>
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: alikins, awood, jmolet
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 876753 (view as bug list) Environment:
Last Closed: 2013-02-21 09:00:42 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, 840993, 876753    

Description Matt Reid 2012-11-14 18:00:00 UTC
Description of problem:

In an effort to have more consistency throughout subscription-manager and its associated tools and scripts, there's some cleanup we could do to remove some of our common inconsistencies (like capitalization, some description strings ending with a period, wording and layout throughout, etc).

This bz details things we can address to get us towards a consistent presentation through --helps in subscription-manager, subscription-manager-gui, rhsmcertd, rhsm-icon, install-num-migrate-to-rhsm, and rhn-migrate-classic-to-rhsm.

The standard we should strive for is to have description strings for modules start with a capital letter, with no ending punctuation, and to have description strings for options within those modules to not start with a capital letter, and again, no ending punctuation. 


Primary Modules
already filed under 876356

-------------------------------------------------------------------------

list --help

--consumed
#: ../src/subscription_manager/managercli.py:1726
msgid "show the subscriptions being consumed by this system."
1. "show the subscriptions being consumed by this system"

--servicelevel
#: ../src/subscription_manager/managercli.py:1728
msgid ""
"show only subscriptions matching the specified service level. Only used with "
"--available and --consumed"
2. "shows only subscriptions matching the specified service level, only used with --available and --consumed"

------------------------------------------------------------------------

redeem --help

--email
#: ../src/subscription_manager/managercli.py:1100
msgid "Email address to notify when subscription redemption is complete."
3. "email address to notify when subscription redemption is complete"

--locale
#: ../src/subscription_manager/managercli.py:1103
msgid ""
"Optional language to use for email notification when subscription redemption "
"is complete. Examples: en-us, de-de"
4. "optional language to use for email notification when subscription redemption "
"is complete (Examples: en-us, de-de)"

---------------------------------------------------------------------------

release -- help

--show 
#: ../src/subscription_manager/managercli.py:1151
msgid "shows current release setting. default command."
5. "shows current release setting, default command"

----------------------------------------------------------------------------

environments --help

--org 
#: ../src/subscription_manager/managercli.py:641
msgid "specify org for environment list"
6. "specify organization for environment list"

-----------------------------------------------------------------------------

rhsmcertd
Usage:
  rhsmcertd [OPTION...]

7. Change Usage statement to be on a single line (Usage: rhsmcertd...), matching sub-man, and change [OPTION...] to [OPTIONS]

8. Merge Help Options with App Options, rename section to Options:
 
Options:

--cert-interval
#: ../src/rhsmcertd.c:54
msgid "Interval to run cert check (in minutes)"
9. "interval to run cert check (in minutes)"

--heal-interval
#: ../src/rhsmcertd.c:57
msgid "Interval to run healing (in minutes)"
10. "interval to run auto-attach (in minutes)"
11. change --heal-interval to --attach-interval (do you think we need to call this --auto-attach-interval? --auto-interval?)

--now
#: ../src/rhsmcertd.c:60
msgid "Run the initial checks immediatly, with no delay."
12. "run the initial checks immediately, with no delay" (fix typo as well)

#: ../src/rhsm_icon.c:48 ../src/rhsmcertd.c:63
msgid "Show debug messages"
13. "show debug messages"

14. Show help options ->  "show this help message and exit" (not sure where this string lives, update to match our message in sub-man) 

15. remove newline at the end of the output of rhsmcertd --help

--------------------------------------------------------------------------

rhsm-icon --help
Usage:
 rhsm-icon [OPTION...]

16. make usage statement on single line, Usage: rhsm-icon [OPTIONS]


17. Rename [OPTION...] to [OPTIONS]

18. merge Help Options with Application Options into Options 

--check-period
#: ../src/rhsm_icon.c:46
msgid "How often to check for validity (in seconds)"
19. "how often to check for validity (in seconds)"

--debug
#: ../src/rhsm_icon.c:48 ../src/rhsmcertd.c:63
msgid "Show debug messages"
20. "show debug messages"

--force-icon
#: ../src/rhsm_icon.c:50
msgid "Force display of the icon (expired, partial or warning)"
21. "force display of the icon (expired, partial, or warning)"

--check-immediately
#: ../src/rhsm_icon.c:53
msgid "Run the first status check right away"
22. "run the first status check right away"

(not sure where these strings live)
23. Show help options -> show this help message and exit
24. Show all help options -> show all help options
25. Show GTK+ Options -> show GTK+ options

26. remove newline at the end of output

-------------------------------------------------------------------------


subscription-manager-gui --help
27. Usage: sub-man-gui [options] to [OPTIONS]

--register
28. "Launches the registration dialog on startup." -> "launches the registration dialog on startup"
(not sure where this lives)

-----------------------------------------------------------------------------

install-num-migrate-to-rhsm --help
usage: install-num-migrate-to-rhsm [options]
29. usage -> Usage
30. [options] -> [OPTIONS]

31. options: -> Options:

--instnumber
#: ../bin/install-num-migrate-to-rhsm:54
msgid "Install number to run against"
32. "install number to run against"

--dryrun
#: ../bin/install-num-migrate-to-rhsm:58
msgid "Only print the files which would be copied over"
33. "only print the files which would be copied over"

Version-Release number of selected component (if applicable):
subscription-manager-1.1.8-1

Additional info:

Comment 1 Alex Wood 2012-11-14 21:12:14 UTC
Some of these issues we are not able to fix since the strings come from the underlying option parsing library.

The issues are enumerated below

1 Fixable
2 Fixable
3 Fixable
4 Fixable
5 Fixable
6 Fixable
7 Can't fix
8 Can't fix
9 Fixable
10 Fixable
11 * I'd like to address this in a separate bug
12 Fixable
13 Fixable
14 Can't fix
15 Can't fix
16 Can't fix
17 Can't fix
18 Can't fix
19 Fixable
20 Fixable
21 Fixable
22 Fixable
23 Can't fix
24 Can't fix
25 Can't fix
26 Can't fix
27 Fixable
28 Fixable
29 Can't fix
30 Fixable
31 Can't fix
32 Fixable
33 Fixable

Comment 2 Matt Reid 2012-11-15 21:32:36 UTC
This may be unrelated, but I found these strings that look like they might match up with some of the usage/option stuff that I couldn't match up to anything before.

#: ../src/subscription_manager/i18n_optparse.py:134
#, python-format
msgid "usage: %s\n"
#7 & 16?

#: ../src/subscription_manager/i18n_optparse.py:136
msgid "Usage"
msgstr ""

#: ../src/subscription_manager/i18n_optparse.py:137
msgid "%prog [options]"
#27 and 30?

#: ../src/subscription_manager/i18n_optparse.py:138
msgid "Options"
msgstr ""

#: ../src/subscription_manager/i18n_optparse.py:139
msgid "options"
msgstr ""

#: ../src/subscription_manager/i18n_optparse.py:140
msgid "options:"
#31?

Might still be unfixable, but figured I'd make note of them here, just in case.

Comment 3 Adrian Likins 2012-11-16 15:20:15 UTC
(In reply to comment #2)
> This may be unrelated, but I found these strings that look like they might
> match up with some of the usage/option stuff that I couldn't match up to
> anything before.
>

Because of some weirdness with the optparse versions, we have a chunk of
code that just extracts all the options variants, so they all get
marked for translations:

    #translators: this should have the same translation as "Usage: %s\n"
    _("usage: %s\n")   # For older versions of optparse
    _("Usage: %s\n")
    _("Usage")
    _("%prog [options]")
    _("Options")
    _("options")
    _("options:")

Comment 4 Alex Wood 2012-11-16 16:01:53 UTC
commit 4ded0198be19dbfb188439d079924f7400e2e59b
Author: Alex Wood <awood>
Date:   Wed Nov 14 15:59:01 2012 -0500

    876692: Correct capitalization in various help messages.

Should address the items marked as "Fixable" in comment 1

Comment 7 J.C. Molet 2012-11-28 16:07:57 UTC
[root@jmolet-vm4 ~]# rpm -qa | egrep "subscription|python-rhsm"
subscription-manager-1.1.10-1.el6.x86_64
python-rhsm-1.1.6-1.el6.x86_64
subscription-manager-gui-1.1.10-1.el6.x86_64
subscription-manager-firstboot-1.1.10-1.el6.x86_64


1,2  PASS)
[root@jmolet-vm4 ~]# subscription-manager list --help

  --consumed            show the subscriptions being consumed by this system
  --servicelevel=SERVICE_LEVEL
                        shows only subscriptions matching the specified
                        service level; only used with --available and
                        --consumed

3,4 PASS)
[root@jmolet-vm4 ~]# subscription-manager redeem --help

  --email=EMAIL         email address to notify when subscription redemption
                        is complete
  --locale=LOCALE       optional language to use for email notification when
                        subscription redemption is complete (Examples: en-us,
                        de-de)
                        
5 PASS)
[root@jmolet-vm4 ~]# subscription-manager release --help

  --show                shows current release setting; default command

6 PASS)
[root@jmolet-vm4 ~]# subscription-manager environments --help
  --org=ORG             specify organization for environment list

7,8,14,15 FAIL)
[root@jmolet-vm4 ~]# rhsmcertd  --help
Usage:
  rhsmcertd [OPTION...] 

Help Options:
  -h, --help                             Show help options

Application Options:
  -c, --cert-interval=MINUTES            interval to run cert check (in minutes)
  --heal-interval=MINUTES                deprecated, see auto-attach-interval
  -i, --auto-attach-interval=MINUTES     interval to run auto-attach (in minutes)
  -n, --now                              run the initial checks immediately, with no delay
  -d, --debug                            show debug messages

^^^^^^^^ THESE ISSUES HAVE NOT BEEN ADDRESSED ^^^^^^^^^^^
From above, 9,10,11,12,13 are PASS.  

16,17,18,23,24,25 FAIL)
[root@jmolet-vm4 ~]# rhsm-icon --help
Usage:
  rhsm-icon [OPTION...] 

Help Options:
  -h, --help                  Show help options
  --help-all                  Show all help options
  --help-gtk                  Show GTK+ Options

Application Options:
  -c, --check-period          how often to check for validity (in seconds)
  -d, --debug                 show debug messages
  -f, --force-icon=TYPE       force display of the icon (expired, partial or warning)
  -i, --check-immediately     run the first status check right away
  --display=DISPLAY           X display to use

^^^^^^^^ THESE ISSUES HAVE NOT BEEN ADDRESSED ^^^^^^^^^^^
From above, 19,20,21,22 are PASS.

28 FAIL)
[root@jmolet-vm4 ~]# subscription-manager-gui --help
Usage: subscription-manager-gui [OPTIONS]

Options:
  -h, --help  show this help message and exit
  --register  launches the registration dialog on startup.  << CONTAINS PUNCTUATION AT END
-----
From above, 27 is PASSing.


29,30,31,32,33 will be VERIFIED in RHEL5 since that only exists there.


Given comment 1 , all things that could be fixed were fixed EXCEPT FOR 28 - opening new bug 881091 for that. 

Marking VERIFIED as all other things passing.

Comment 9 errata-xmlrpc 2013-02-21 09:00:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0350.html