[orca] Fix for bug 751476: Mark "help" command-line argument for translation



commit ff03183c38d6573fb1879792ab620ed83f9c347a
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jun 26 10:52:21 2015 -0400

    Fix for bug 751476: Mark "help" command-line argument for translation

 src/orca/messages.py    |    4 ++++
 src/orca/orca_bin.py.in |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/messages.py b/src/orca/messages.py
index 429119a..328ae77 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -250,6 +250,10 @@ CLI_PREFS_DIR = _("DIR")
 # which tells Orca to replace any existing Orca process that might be running.
 CLI_REPLACE = _("Replace a currently running instance of this screen reader")
 
+# Translators: this is the description of command line option '-h, --help'
+# which lists all the available command line options.
+CLI_HELP = _("Show this help message and exit")
+
 # Translators: This is the description of command line option '--debug' which
 # causes debugging output for Orca to be sent to a file. The YYYY-MM-DD-HH:MM:SS
 # portion of the string indicates the file name will be formed from the current
diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in
index 3033601..2991f4b 100644
--- a/src/orca/orca_bin.py.in
+++ b/src/orca/orca_bin.py.in
@@ -87,7 +87,9 @@ class HelpFormatter(argparse.HelpFormatter):
 class Parser(argparse.ArgumentParser):
     def __init__(self, *args, **kwargs):
         super(Parser, self).__init__(
-            epilog=messages.CLI_EPILOG, formatter_class=HelpFormatter)
+            epilog=messages.CLI_EPILOG, formatter_class=HelpFormatter, add_help=False)
+        self.add_argument(
+            "-h", "--help", action="help", help=messages.CLI_HELP)
         self.add_argument(
             "-v", "--version", action="version", version=version, help=version)
         self.add_argument(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]