Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-02-16 03:23:08 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-02-16 03:23:08 (GMT)
commit0c4e143941082a98b6fc8307cc82a89133c9bd9d (patch)
tree7742e3d18ae11814b23375580ccb0b75ce41ebf9
parenta7de64cf3f64bfe2ce7dfa7f27672e6ab554de68 (diff)
Do not abort activity if where is now proper i18n data
-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