[checkmk-commits] Check_MK Git: check_mk: language string sniff supports local web dir now

Lars Michelsen lm at mathias-kettner.de
Fri May 13 16:04:01 CEST 2011


Module: check_mk
Branch: master
Commit: 01d9476a54bc26f6395facacd11038c6d22d6d49
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=01d9476a54bc26f6395facacd11038c6d22d6d49

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Fri May 13 13:19:22 2011 +0200

language string sniff supports local web dir now

---

 modules/localize.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/localize.py b/modules/localize.py
index 464af95..40c1612 100755
--- a/modules/localize.py
+++ b/modules/localize.py
@@ -138,10 +138,15 @@ def localize_init_po(lang):
 def localize_sniff():
     sys.stdout.write('Sniffing source code...\n')
 
+    if local_web_dir and os.path.exists(local_web_dir):
+        paths = web_dir + ' ' + local_web_dir
+    else:
+        paths = web_dir
+
     if os.system('xgettext --no-wrap --sort-output --force-po '
                  '-L Python --from-code=utf-8 --omit-header '
                  '-o %s $(find %s -type f -name \*.py | xargs) >/dev/null' % \
-                   (pot_file, web_dir)) != 0:
+                   (pot_file, paths)) != 0:
         sys.stderr.write('Failed!\n')
     else:
         header = '''# +------------------------------------------------------------------+



More information about the checkmk-commits mailing list