diff options
author | 2008-05-26 02:24:48 +0000 | |
---|---|---|
committer | 2008-05-26 02:24:48 +0000 | |
commit | 218fc730c61538bb8537d644c9e029ebfc88d285 (patch) | |
tree | 012a6ae0842241f5b6b72bc950b5ba6d2aa96086 | |
parent | committing changes to gtkfe in stages. (diff) | |
download | gli-218fc730c61538bb8537d644c9e029ebfc88d285.tar.gz gli-218fc730c61538bb8537d644c9e029ebfc88d285.tar.bz2 gli-218fc730c61538bb8537d644c9e029ebfc88d285.zip |
committing changes to gtkfe in stages.
adding internalization support written by
Jesus Rivero (Neurogeek)
basically sets everything in gettext.
concerned about the import line
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1905 f8877401-5920-0410-a79b-8e2d7e04ca0d
-rw-r--r-- | src/fe/gtk/Partition.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/fe/gtk/Partition.py b/src/fe/gtk/Partition.py index f2252b5..de2947d 100644 --- a/src/fe/gtk/Partition.py +++ b/src/fe/gtk/Partition.py @@ -10,7 +10,8 @@ from GLIException import * import re import PartitionButton import PartProperties -from gettext import gettext as _ +import gettext + class Panel(GLIScreen): @@ -23,7 +24,7 @@ class Panel(GLIScreen): active_part_idx = -1 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' } supported_filesystems = ["ext2", "ext3", "linux-swap", "xfs", "jfs", "reiserfs", "fat16", "fat32", "ntfs", "hfs", "hfs+"] - _helptext = """ + _helptext = _(""" <b><u>Partitioning</u></b> The choices you make on this screen are very important. There are three ways \ @@ -61,7 +62,7 @@ jfs, or xfs. Ext3 is the recommended type. Keep in mind that all changes are committed to disk immediately. If you just \ click the Next button, your partition table will remain untouched. -""" +""") def __init__(self, controller): GLIScreen.__init__(self, controller, show_title=True) @@ -341,7 +342,10 @@ click the Next button, your partition table will remain untouched. try: self.devices[drive] = Partitioning.Device(drive, self.controller.cc.get_arch(), self.controller.install_profile) if self.devices[drive].has_mounted_partitions(): - 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) + 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.") + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format=msgmted % {"drive" : drive}) + + msgdlg.run() msgdlg.destroy() self.detected_dev_combo.append_text(drive) @@ -349,7 +353,7 @@ click the Next button, your partition table will remain untouched. except: print _("Exception received while loading partitions from device " + drive) if self.devices.has_key(drive): del self.devices[drive] - 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.") + 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.")) msgdlg.run() msgdlg.destroy() |