Gentoo Archives: gentoo-commits

From: "Preston Cody (codeman)" <codeman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gli r1905 - trunk/src/fe/gtk
Date: Mon, 26 May 2008 02:24:55
Message-Id: E1K0SOH-0000lR-Qf@stork.gentoo.org
1 Author: codeman
2 Date: 2008-05-26 02:24:48 +0000 (Mon, 26 May 2008)
3 New Revision: 1905
4
5 Modified:
6 trunk/src/fe/gtk/Partition.py
7 Log:
8 committing changes to gtkfe in stages.
9 adding internalization support written by
10 Jesus Rivero (Neurogeek)
11 basically sets everything in gettext.
12 concerned about the import line
13
14
15 Modified: trunk/src/fe/gtk/Partition.py
16 ===================================================================
17 --- trunk/src/fe/gtk/Partition.py 2008-05-26 02:20:43 UTC (rev 1904)
18 +++ trunk/src/fe/gtk/Partition.py 2008-05-26 02:24:48 UTC (rev 1905)
19 @@ -10,8 +10,9 @@
20 import re
21 import PartitionButton
22 import PartProperties
23 -from gettext import gettext as _
24 +import gettext
25
26 +
27 class Panel(GLIScreen):
28
29 title = _("Partitioning")
30 @@ -23,7 +24,7 @@
31 active_part_idx = -1
32 colors = { 'ext2': '#0af2fe', 'ext3': '#0af2fe', 'unalloc': '#a2a2a2', 'unknown': '#ed03e0', 'free': '#ffffff', 'ntfs': '#f20600', 'fat16': '#3d07f9', 'fat32': '#3d07f9', 'reiserfs': '#f0ff00', 'linux-swap': '#12ff09', 'xfs': '#006600', 'jfs': '#ffb400', 'hfs': '#fdb0ff', 'hfs+': '#fdb0ff', 'apple_bootstrap': '#fdb0ff' }
33 supported_filesystems = ["ext2", "ext3", "linux-swap", "xfs", "jfs", "reiserfs", "fat16", "fat32", "ntfs", "hfs", "hfs+"]
34 - _helptext = """
35 + _helptext = _("""
36 <b><u>Partitioning</u></b>
37
38 The choices you make on this screen are very important. There are three ways \
39 @@ -61,7 +62,7 @@
40
41 Keep in mind that all changes are committed to disk immediately. If you just \
42 click the Next button, your partition table will remain untouched.
43 -"""
44 +""")
45
46 def __init__(self, controller):
47 GLIScreen.__init__(self, controller, show_title=True)
48 @@ -341,7 +342,10 @@
49 try:
50 self.devices[drive] = Partitioning.Device(drive, self.controller.cc.get_arch(), self.controller.install_profile)
51 if self.devices[drive].has_mounted_partitions():
52 - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="You have a filesystem mounted on %s. Please unmount before performing any operations on this device. Failure to do so could cause data loss. You have been warned." % drive)
53 + msgmted = _("You have a filesystem mounted on %(drive)s. Please unmount before performing any operations on this device. Failure to do so could cause data loss. You have been warned.")
54 + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format=msgmted % {"drive" : drive})
55 +
56 +
57 msgdlg.run()
58 msgdlg.destroy()
59 self.detected_dev_combo.append_text(drive)
60 @@ -349,7 +353,7 @@
61 except:
62 print _("Exception received while loading partitions from device " + drive)
63 if self.devices.has_key(drive): del self.devices[drive]
64 - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="There was an error loading the partition table from device " + drive + ". It will not be displayed.")
65 + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format=_("There was an error loading the partition table from device " + drive + ". It will not be displayed."))
66 msgdlg.run()
67 msgdlg.destroy()
68
69
70 --
71 gentoo-commits@l.g.o mailing list