From 0c4e143941082a98b6fc8307cc82a89133c9bd9d Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Mon, 16 Feb 2009 03:23:08 +0000 Subject: Do not abort activity if where is now proper i18n data --- 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 -- cgit v0.9.1