Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/i18n.py
diff options
context:
space:
mode:
Diffstat (limited to 'i18n.py')
-rw-r--r--i18n.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/i18n.py b/i18n.py
index 963d258..265dc70 100644
--- a/i18n.py
+++ b/i18n.py
@@ -72,7 +72,10 @@ class LangDetails (object):
self.domain = domain
def guess_translation (self, fallback=False):
- self.gnutranslation = gettext.translation(self.domain, 'locale', [self.code], fallback=fallback)
+ try:
+ self.gnutranslation = gettext.translation(self.domain, 'locale', [self.code], fallback=fallback)
+ except:
+ return False
def install (self):
self.gnutranslation.install()
@@ -103,8 +106,8 @@ def list_available_translations (domain):
try:
details = get_lang_details(x, domain)
if details is not None:
- details.guess_translation()
- rv.append(details)
+ if details.guess_translation():
+ rv.append(details)
except:
raise
pass