Gentoo Archives: gentoo-commits

From: "Preston Cody (codeman)" <codeman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gli r1903 - trunk/src/fe/gtk
Date: Mon, 26 May 2008 01:55:07
Message-Id: E1K0RvU-0003ur-GM@stork.gentoo.org
1 Author: codeman
2 Date: 2008-05-26 01:55:03 +0000 (Mon, 26 May 2008)
3 New Revision: 1903
4
5 Modified:
6 trunk/src/fe/gtk/gtkfe.py
7 Log:
8 adding gettext support written by Jesus Rivero (Neurogeek)
9
10
11 Modified: trunk/src/fe/gtk/gtkfe.py
12 ===================================================================
13 --- trunk/src/fe/gtk/gtkfe.py 2008-05-26 01:51:19 UTC (rev 1902)
14 +++ trunk/src/fe/gtk/gtkfe.py 2008-05-26 01:55:03 UTC (rev 1903)
15 @@ -14,10 +14,18 @@
16 import GLIUtility
17 from SplashScreen import SplashScreen
18 import gtk
19 -from gettext import gettext as _
20 +import gettext
21 import TextBufferMarkup
22 from ProgressDialog import *
23
24 +
25 +try:
26 + gettext.install('gli-gtk', './languages')
27 + translator = gettext.translation('gli-gtk', './languages')
28 + _ = translator.gettext
29 +except:
30 + _ = gettext.gettext
31 +
32 class Installer:
33
34 SHOW_BUTTON_FORWARD = 1
35 @@ -218,11 +226,11 @@
36
37 def exit_button(self, widget, data=None):
38 if not self.install_done:
39 - msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="Are you sure you want to exit?")
40 + msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Are you sure you want to exit?"))
41 resp = msgdlg.run()
42 msgdlg.destroy()
43 if resp == gtk.RESPONSE_YES:
44 - msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="Do you want the installer to clean up after itself before exiting?")
45 + msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Do you want the installer to clean up after itself before exiting?"))
46 resp = msgdlg.run()
47 msgdlg.destroy()
48 if resp == gtk.RESPONSE_YES:
49
50 --
51 gentoo-commits@l.g.o mailing list