[ create a new paste ] login | about

Project: apertium
Link: http://apertium.codepad.org/hf8xt426    [ raw code | fork ]

unhammer - Plain Text, pasted on Sep 15:
Index: scripts/pomtrans.py===================================================================
--- scripts/pomtrans.py	(revision 1175316)
+++ scripts/pomtrans.py	(working copy)
@@ -101,6 +101,12 @@
                "Target language code. "
                "Detected from catalogs if not given."))
     opars.add_option(
+        "-M", "--apertium-mode", dest="amode",
+        metavar=_("@info command line value placeholder", "LANG"),
+        help=_("@info command line option description",
+               "Apertium translation mode (only applicable for Apertium). "
+               "Default is \"sl-tl\" where sl is source language, tl is target language."))
+    opars.add_option(
         "-T", "--transerv-bin", dest="transerv_bin",
         metavar=_("@info command line value placeholder", "PATH"),
         help=_("@info command line option description",
@@ -348,7 +354,10 @@
                     "Apertium executable not found at '%(path)s'.",
                     path=cmdpath))
 
-        mode = "%s-%s" % (slang, tlang)
+        if options.amode != None:
+            mode = options.amode
+        else:
+            mode = "%s-%s" % (slang, tlang)
 
         self.cmdline = "%s %s -u -f html" % (cmdpath, mode)
 


Create a new paste based on this one


Comments: