hamster-applet r853 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r853 - trunk/hamster
- Date: Thu, 12 Mar 2009 16:36:03 +0000 (UTC)
Author: tbaugis
Date: Thu Mar 12 16:36:02 2009
New Revision: 853
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=853&view=rev
Log:
cooler gettext imports that allow seeing glade files in locale
without switching whole UI
Modified:
trunk/hamster/hamster-applet.py
Modified: trunk/hamster/hamster-applet.py
==============================================================================
--- trunk/hamster/hamster-applet.py (original)
+++ trunk/hamster/hamster-applet.py Thu Mar 12 16:36:02 2009
@@ -42,15 +42,13 @@
# Setup i18n
locale_dir = os.path.abspath(os.path.join(hamster.defs.DATA_DIR, "locale"))
-gettext.bindtextdomain('hamster-applet', locale_dir)
-if hasattr(gettext, 'bind_textdomain_codeset'):
- gettext.bind_textdomain_codeset('hamster-applet','UTF-8')
-gettext.textdomain('hamster-applet')
-
-locale.bindtextdomain('hamster-applet', locale_dir)
-if hasattr(locale, 'bind_textdomain_codeset'):
- locale.bind_textdomain_codeset('hamster-applet','UTF-8')
-locale.textdomain('hamster-applet')
+for module in (gettext, locale, gtk.glade):
+ module.bindtextdomain('hamster-applet', locale_dir)
+ module.textdomain('hamster-applet')
+
+ if hasattr(module, 'bind_textdomain_codeset'):
+ module.bind_textdomain_codeset('hamster-applet','UTF-8')
+
hamster.__init_db()
import hamster.applet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]