Commits

Steve Borho committed 5fa3912

i18n: locale/ is an install option

Closes #1685

  • Participants
  • Parent commits 1b33a53
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/util/i18n.py

     basedir = paths.get_locale_path()
     def mopath(lang):
         return os.path.join(basedir, lang, 'LC_MESSAGES', 'tortoisehg.mo')
-    langs = [e for e in os.listdir(basedir) if os.path.exists(mopath(e))]
+    if os.path.exists(basedir): # locale/ is an install option
+        langs = [e for e in os.listdir(basedir) if os.path.exists(mopath(e))]
+    else:
+        langs = []
     langs.append('en')  # means null translation
     return sorted(langs)