[devhelp] Display translated strings in gedit plugin



commit 81d1471506bcfcdfa4a3da4cb3ef4b9cb29c8aa0
Author: Gabor Kelemen <kelemeng gnome hu>
Date:   Fri Aug 28 13:42:23 2009 +0200

    Display translated strings in gedit plugin

 misc/gedit-plugin/devhelp/devhelp.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/misc/gedit-plugin/devhelp/devhelp.py b/misc/gedit-plugin/devhelp/devhelp.py
index 6f6e5f6..0a5bd3d 100644
--- a/misc/gedit-plugin/devhelp/devhelp.py
+++ b/misc/gedit-plugin/devhelp/devhelp.py
@@ -22,6 +22,7 @@
 import gedit
 import gtk
 import os
+import gettext
 
 class DevhelpInstance:
     def __init__(self, window):
@@ -29,9 +30,10 @@ class DevhelpInstance:
 
     def activate(self):
         manager = self._window.get_ui_manager()
+	# Translate actions below, hardcoding domain here to avoid complications now
+	_ = lambda s: gettext.dgettext('devhelp', s);
 
         self._action_group = gtk.ActionGroup("GeditDevhelpPluginActions")
-        self._action_group.set_translation_domain('devhelp')
         self._action_group.add_actions([('Devhelp', None,
                                          _('Show API Documentation'),
                                          'F2',



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]