diff options
Diffstat (limited to 'actions/services/__init__.py.in')
-rwxr-xr-x | actions/services/__init__.py.in | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/actions/services/__init__.py.in b/actions/services/__init__.py.in index 0fc81bd..df6a8b4 100755 --- a/actions/services/__init__.py.in +++ b/actions/services/__init__.py.in @@ -18,13 +18,21 @@ # it will hopefully appear in 0.3 # this file is just an interim solution to give the same functionnaly as 0.1 -import pygtk -pygtk.require('2.0') -import gtk -import os -import pwd -import subprocess -import gnome +try: + import gettext + gettext.bindtextdomain("@GETTEXT_PACKAGE@", "@LOCALEDIR@") + gettext.textdomain("@GETTEXT_PACKAGE@") + gettext.install("@GETTEXT_PACKAGE@", unicode=1) + import pygtk + pygtk.require('2.0') + import gtk + import os + import pwd + import subprocess + import gnome +except ImportError, e: + error_msg(_("A python module is missing.\n%s") % (e)) + sys.exit() def pair_to_dict(l): res = dict() @@ -96,7 +104,7 @@ def enter_callback(widget, win): def SshLogin(hostname, username = None): global win - win = gtk.Dialog("Ssh Connection", None, + win = gtk.Dialog(_("SSH Connection"), None, gtk.DIALOG_MODAL, (gtk.STOCK_OK, gtk.RESPONSE_OK)) @@ -105,7 +113,7 @@ def SshLogin(hostname, username = None): vbox.set_border_width(5) label = gtk.Label() - label.set_markup("Connecting to <b>%s</b>.\nPlease enter your <b>login</b>:" % (hostname)) + label.set_markup(_("Connecting to <b>%s</b>.\nPlease enter your <b>login</b>:") % (hostname)) vbox.pack_start(label, False, False, 0) |