--- a/patches/moovida-01-g11n-localedir.diff Thu Aug 06 06:55:34 2009 +0000
+++ b/patches/moovida-01-g11n-localedir.diff Thu Aug 06 16:18:40 2009 +0000
@@ -1,26 +1,11 @@
---- elisa-1.0.5/elisa/core/utils/i18n.py-orig 2009-07-15 16:43:33.727389000 -0500
-+++ elisa-1.0.5/elisa/core/utils/i18n.py 2009-07-21 03:26:46.895600000 -0500
-@@ -89,14 +89,19 @@ def get_current_locale():
- def install_translation(plugin_name, plural = False):
- log_category = 'i18n'
- domain = 'elisa-plugin-%s' % plugin_name
-- i18n_dir = pkg_resources.resource_filename('elisa.plugins.%s' % plugin_name,
-- 'i18n')
+--- elisa-1.0.6/elisa/core/utils/i18n.py-orig 2009-08-06 10:49:02.966599000 -0500
++++ elisa-1.0.6/elisa/core/utils/i18n.py 2009-08-06 10:49:31.499871000 -0500
+@@ -92,6 +92,8 @@ def install_translation(plugin_name, plu
+ i18n_dir = pkg_resources.resource_filename('elisa.plugins.%s' % plugin_name,
+ 'i18n')
+
+ i18n_dir = "/usr/share/locale"
-
++
current_locale = get_current_locale()
-- fallback_locale = current_locale.split('_')[0]
-+ try:
-+ fallback_locale = current_locale.split('_')[0]
-+ except AttributeError:
-+ fallback_locale = None
-
try:
-- t = gettext.translation(domain, i18n_dir, languages=[current_locale, fallback_locale])
-+ if current_locale == None:
-+ t = gettext.translation(domain, i18n_dir)
-+ else:
-+ t = gettext.translation(domain, i18n_dir, languages=[current_locale,])
- translator = t.ugettext
- translator_plural = t.ungettext
- except IOError:
+ fallback_locale = current_locale.split('_')[0]