Commits

Takeshi Komiya  committed ad3f80f

Add language option (-l)

  • Participants
  • Parent commits 5ca84ad

Comments (0)

Files changed (1)

File sphinx_gettext_helper/command.py

                  help='build message catalogs')
     p.add_option('-c', '--config', default="conf.py",
                  help='read configurations from FILE', metavar='FILE')
+    p.add_option('-l', '--language',
+                 help='target language')
     p.add_option('-p', '--potdir',
                  help='pot files directory which is generated by sphinx')
     p.add_option('-u', '--update', action='store_true',
         msg = "language and locale_dirs was not defined: %s" % options.config
         raise RuntimeError(msg)
 
-    options.language = config['language']
     options.locale_dir = os.path.join(config['locale_dirs'][0],
                                       options.language, 'LC_MESSAGES')
 
+    if options.language is None:
+        options.language = config['language']
+
     return options, args