diff options
author | Paul W. Frields <stickster@gmail.com> | 2010-02-21 20:17:11 -0500 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2010-02-21 20:17:11 -0500 |
commit | af48635e3a1327e44ce493054a7d9d4394e470d2 (patch) | |
tree | 3986fd27ff349507951ef84a019bd7286f799133 | |
parent | 8556548ea85f429a198636b21edb5d9b7ee0252e (diff) | |
download | pulsecaster-af48635e3a1327e44ce493054a7d9d4394e470d2.tar.gz pulsecaster-af48635e3a1327e44ce493054a7d9d4394e470d2.tar.xz pulsecaster-af48635e3a1327e44ce493054a7d9d4394e470d2.zip |
Add i18n support in .py files
-rw-r--r-- | pulsecaster/config.py | 5 | ||||
-rw-r--r-- | pulsecaster/ui.py | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/pulsecaster/config.py b/pulsecaster/config.py index fbd1a49..2f3b576 100644 --- a/pulsecaster/config.py +++ b/pulsecaster/config.py @@ -18,14 +18,15 @@ # # Author: Paul W. Frields <stickster@gmail.com> +from gettext import gettext as _ NAME = u'PulseCaster' VERSION = u'0.1.5' AUTHOR = u'Paul W. Frields' AUTHOR_EMAIL = u'stickster@gmail.com' -DESCRIPTION = u'PulseAudio based podcast recorder' +DESCRIPTION = _(u'PulseAudio based podcast recorder') LICENSE = u'GPLv3+' -COPYRIGHT = u'Copyright © 2009 ' + AUTHOR +COPYRIGHT = _(u'Copyright © 2009 ' + AUTHOR) KEYWORDS = u'pulseaudio podcast recorder mixer gstreamer pygtk' URL = u'http://pulsecaster.fedorahosted.org' # FIXME: Project needs a # home! diff --git a/pulsecaster/ui.py b/pulsecaster/ui.py index 3f75335..e5a08f2 100644 --- a/pulsecaster/ui.py +++ b/pulsecaster/ui.py @@ -30,6 +30,8 @@ import pygst pygst.require('0.10') import gst +from gettext import gettext as _ + _debug = True def _debugPrint(text): @@ -42,13 +44,13 @@ class PulseCasterUI: try: self.builder.add_from_file(os.path.join(os.getcwd(),'data','pulsecaster.glade') ) - _debugPrint("loading glade file from current subdir") + _debugPrint(_("loading glade file from current subdir")) except: try: self.builder.add_from_file(os.path.join(sys.prefix,'share','pulsecaster','pulsecaster.glade')) except Exception,e: print(e) - raise SystemExit("Cannot load resources") + raise SystemExit(_("Cannot load resources")) self.icontheme = gtk.icon_theme_get_default() |