[damned-lies] Take into account modules using AS_ALL_LINGUAS macro in configure



commit 959de517fced4249d6989c36335dc6721bad35b8
Author: Claude Paroz <claude 2xlibre net>
Date:   Mon Apr 25 21:38:55 2011 +0200

    Take into account modules using AS_ALL_LINGUAS macro in configure

 stats/utils.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index 9a79e37..6f291f8 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -354,6 +354,12 @@ def get_ui_linguas(module_path, po_path):
     for LINGUAS in [LINGUAShere, LINGUASpo]:
         if os.access(LINGUAS, os.R_OK):
             return read_linguas_file(LINGUAS)
+    # AS_ALL_LINGUAS is a macro that takes all po files by default
+    (status, output, errs) = run_shell_command("grep -qs AS_ALL_LINGUAS %s%sconfigure.*" % (module_path, os.sep))
+    if status == 0:
+        return {'langs': None,
+                'error': ugettext_noop("No need to edit LINGUAS file or variable for this module")}
+
     for configure in [configureac, configurein]:
         found = search_variable_in_file(configure, 'ALL_LINGUAS')
         if found is not None:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]