From a7402fdcbd11a16522761704ca9dacea9046cf79 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Sun, 17 Sep 2006 02:58:17 +0000 Subject: [PATCH] plug-ins/pygimp/gimpfu.py let the gettext module 2006-09-16 Manish Singh * plug-ins/pygimp/gimpfu.py * plug-ins/pygimp/plug-ins/gtkcons.py: let the gettext module * po-python/POTFILES.in * plug-ins/pygimp/gimpui.py: Mark a couple strings for translation here. --- ChangeLog | 9 +++++++++ plug-ins/pygimp/gimpfu.py | 2 +- plug-ins/pygimp/gimpui.py | 8 ++++++-- plug-ins/pygimp/plug-ins/gtkcons.py | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8bfe77b34c..4621426261 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-09-16 Manish Singh + + * plug-ins/pygimp/gimpfu.py + * plug-ins/pygimp/plug-ins/gtkcons.py: let the gettext module + + * po-python/POTFILES.in + * plug-ins/pygimp/gimpui.py: Mark a couple strings for translation + here. + 2006-09-16 Michael Natterer * app/tools/gimpperspectiveclonetool.c (button_press) diff --git a/plug-ins/pygimp/gimpfu.py b/plug-ins/pygimp/gimpfu.py index 14714f24fb..73eec44af0 100644 --- a/plug-ins/pygimp/gimpfu.py +++ b/plug-ins/pygimp/gimpfu.py @@ -67,7 +67,7 @@ from gimpenums import * pdb = gimp.pdb import gettext -t = gettext.translation('gimp20-python', gimp.locale_directory) +t = gettext.translation('gimp20-python', gimp.locale_directory, fallback=True) _ = t.ugettext class error(RuntimeError):pass diff --git a/plug-ins/pygimp/gimpui.py b/plug-ins/pygimp/gimpui.py index 804bbe88bd..852393fc4e 100644 --- a/plug-ins/pygimp/gimpui.py +++ b/plug-ins/pygimp/gimpui.py @@ -35,6 +35,10 @@ import gtk, gobject, gimp, gimpcolor from _gimpui import * +import gettext +t = gettext.translation('gimp20-python', gimp.locale_directory, fallback=True) +_ = t.ugettext + def _callbackWrapper(menu_item, callback, data): callback(menu_item.get_data("Gimp-ID"), data) @@ -146,7 +150,7 @@ class ColorSelector(ColorButton): color = default elif isinstance(default, tuple): color = apply(gimpcolor.RGB, default) - ColorButton.__init__(self, "Python-Fu Color Selection", 100, 20, + ColorButton.__init__(self, _("Python-Fu Color Selection"), 100, 20, color, COLOR_AREA_FLAT) def get_value(self): return self.get_color(); @@ -193,7 +197,7 @@ class FontSelector(FontSelectButton): class FileSelector(gtk.FileChooserButton): def __init__(self, default=""): - gtk.FileChooserButton.__init__(self, "Python-Fu File Selection") + gtk.FileChooserButton.__init__(self, _("Python-Fu File Selection")) if default: self.set_filename(default) def get_value(self): diff --git a/plug-ins/pygimp/plug-ins/gtkcons.py b/plug-ins/pygimp/plug-ins/gtkcons.py index 5119adbaf1..3ad3be758b 100755 --- a/plug-ins/pygimp/plug-ins/gtkcons.py +++ b/plug-ins/pygimp/plug-ins/gtkcons.py @@ -36,7 +36,7 @@ import gtk, pango from gimp import locale_directory import gettext -t = gettext.translation('gimp20-python', locale_directory) +t = gettext.translation('gimp20-python', locale_directory, fallback=True) _ = t.ugettext stdout = sys.stdout