[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    l10n-support/pology/scripts
From:       Simon Depiets <null () kde ! org>
Date:       2018-08-30 10:16:40
Message-ID: E1fvK0G-0001y8-MV () code ! kde ! org
[Download RAW message or body]

SVN commit 1523767 by sdepiets:

Add an option to posieve to check only 1 entry

 M  +10 -1     posieve.py  


--- trunk/l10n-support/pology/scripts/posieve.py #1523766:1523767
@@ -88,6 +88,12 @@
                "Check catalogs by %(cmd)s and skip those which do not pass.",
                cmd="msgfmt -c"))
     opars.add_option(
+        "-u", "--single-entry",
+        metavar=_("@info command line value placeholder", "ENTRY_NUMBER"),
+        action="store", dest="single_entry", default=0,
+        help=_("@info command line option description",
+               "Only perform the check on this ENTRY_NUMBER."))
+    opars.add_option(
         "--force-sync",
         action="store_true", dest="force_sync", default=False,
         help=_("@info command line option description",
@@ -178,6 +184,9 @@
 
     op.raw_sieves = []
     op.raw_paths = []
+    if len(free_args) > 2 and op.single_entry != 0:
+        error(_("@info", "With single entry mode, you can only give one input \
file.")) +
     if len(free_args) >= 1:
         op.raw_sieves = free_args[0]
         op.raw_paths = free_args[1:]
@@ -429,7 +438,7 @@
                 continue
 
         try:
-            cat = Catalog(fname, monitored=use_monitored, headonly=use_headonly)
+            cat = Catalog(fname, monitored=use_monitored, headonly=use_headonly, \
single_entry=int(op.single_entry))  except CatalogSyntaxError, e:
             errwarn(_("@info:progress",
                       "%(file)s: Parsing failed: %(msg)s",


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic