Salome HOME
#12754 fixed i18n accent francais
[tools/sat.git] / src / salomeTools.py
index ef3857ebc7011f8cf117a20846d3fbff5150c8a7..ec06a1ae1131a51edab21bdda6997e6cf6ae2f98 100755 (executable)
@@ -65,7 +65,10 @@ import commands.config as CONFIG
 # load resources for internationalization
 gettext.install("salomeTools", os.path.join(srcdir, "i18n"))
 
-_LANG = os.environ["LANG"] # original locale
+try:
+  _LANG = os.environ["LANG"] # original locale
+except:
+  _LANG = "en_US.utf8" #default
 
 # The possible hooks : 
 # pre is for hooks to be executed before commands
@@ -86,9 +89,9 @@ parser.add_option('v', 'verbose', 'int', "output_verbose_level",
 parser.add_option('b', 'batch', 'boolean', "batch", 
                   _("batch mode (no question)."))
 parser.add_option('t', 'all_in_terminal', 'boolean', "all_in_terminal", 
-                  _("All traces in the terminal (for example compilation logs)."))
+                  _("all traces in the terminal (for example compilation logs)."))
 parser.add_option('l', 'logs_paths_in_file', 'string', "logs_paths_in_file", 
-                  _("Put the command result and paths to log files in ."))
+                  _("put the command results and paths to log files."))
 
 
 ########################################################################
@@ -458,7 +461,12 @@ class Sat(object):
                                              src.printcolors.printcWarning(msg),
                                              str(e)))
                         self.options.logs_paths_in_file = None
-                
+
+
+                # do nothing more if help is True
+                if self.options.help:
+                  return 0
+
                 options_launched = ""
                 res = None
                 try:
@@ -716,7 +724,7 @@ def get_help():
     msg += "\n"
     # Explain how to get the help for a specific command
     msg += src.printcolors.printcHeader(
-        _("Getting the help for a specific command: ")) + \
+        _("Get help for a specific command:")) + \
         "\n>> sat --help <command>\n"
     return msg