[damned-lies] Add schemas.in in reduced po default filter
- From: Claude Paroz <claudep src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [damned-lies] Add schemas.in in reduced po default filter
 
- Date: Sat, 17 Sep 2011 18:55:19 +0000 (UTC)
 
commit 97dcfecca3cd8b4660e0893c0be0c9da9e1574fc
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Sep 17 20:54:27 2011 +0200
    Add schemas.in in reduced po default filter
    
    Fixes bug #659329
 stats/utils.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index da169a1..4da317c 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -155,20 +155,20 @@ def po_grep(in_file, out_file, filter_):
     if not has_toolkit or filter_ == u"-":
         return
     if not filter_:
-        filter_loc, filter_str = "locations", "gschema.xml.in"
+        filter_loc, filter_str = "locations", "gschema.xml.in|schemas.in"
     else:
         try:
             filter_loc, filter_str = filter_.split("|")
         except:
             # Probably bad filter syntax in DB (TODO: log it)
             return
-    grepfilter = pogrep.GrepFilter(filter_str, filter_loc, invertmatch=True, keeptranslations=True)
+    grepfilter = pogrep.GrepFilter(filter_str, filter_loc, useregexp=True, invertmatch=True, keeptranslations=True)
     out = open(out_file, "w")
     pogrep.rungrep(in_file, out, None, grepfilter)
     out.close()
     # command-line variant:
     """
-    cmd = "pogrep --invert-match --header --search=locations \"gschema.xml.in\" %(full_po)s %(part_po)s" % {
+    cmd = "pogrep --invert-match --header --search=locations --regexp \"gschema\\.xml\\.in|schemas\\.in\" %(full_po)s %(part_po)s" % {
         'full_po': in_file,
         'part_po': out_file,
     }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]