From 28d939cda70aaac9c9bd19dff9a3d3be90e555ab Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sat, 17 Nov 2012 21:28:14 +0000 Subject: [PATCH] 6155: Error when running Detailed Descendant Report svn: r20674 --- gramps/gen/utils/trans.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gramps/gen/utils/trans.py b/gramps/gen/utils/trans.py index 46e597529..4666e4ff8 100644 --- a/gramps/gen/utils/trans.py +++ b/gramps/gen/utils/trans.py @@ -49,7 +49,10 @@ from ..constfunc import mac # #------------------------------------------------------------------------- if "GRAMPSI18N" in os.environ: - LOCALEDIR = os.environ["GRAMPSI18N"] + if os.path.exists(os.environ["GRAMPSI18N"]): + LOCALEDIR = os.environ["GRAMPSI18N"] + else: + LOCALEDIR = None elif os.path.exists( os.path.join(ROOT_DIR, "lang") ): LOCALEDIR = os.path.join(ROOT_DIR, "lang") elif os.path.exists(os.path.join(PREFIXDIR, "share/locale")): @@ -219,8 +222,8 @@ def setup_windows_gettext(): return # No complete/working translation found - logging.warning("Translation might not be complete/not working for",\ - locale.getlocale()[0]) + logging.warning("Translation might not be complete, " + "not working for your locale") def get_localedomain():