[jhbuild] also look up for system-installed translations



commit c04a391ad171b9091da485e6bc97153cb7532458
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat May 16 12:45:50 2009 +0200

    also look up for system-installed translations
---
 jhbuild/main.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/jhbuild/main.py b/jhbuild/main.py
index 637ed0c..55a7ee0 100644
--- a/jhbuild/main.py
+++ b/jhbuild/main.py
@@ -23,8 +23,6 @@ import traceback
 import logging
 
 import gettext
-localedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../mo'))
-gettext.install('jhbuild', localedir=localedir, unicode=True)
 import __builtin__
 __builtin__.__dict__['N_'] = lambda x: x
 
@@ -100,6 +98,11 @@ def help_commands(option, opt_str, value, parser):
     parser.exit()
 
 def main(args):
+    localedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'mo'))
+    if not os.path.exists(localedir):
+        localedir = None
+    gettext.install('jhbuild', localedir=localedir, unicode=True)
+
     logging.getLogger().setLevel(logging.INFO)
     logging_handler = logging.StreamHandler()
     logging_handler.setFormatter(LoggingFormatter())



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