diff options
author | Matt Wilson <msw@redhat.com> | 1999-08-26 18:44:35 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-08-26 18:44:35 +0000 |
commit | d2fb657ae4aeeaf3ab070b594371742d810829c3 (patch) | |
tree | 8eb4b406fbf81def6a5aeed771143956febde417 /iw | |
parent | 82ba493137e9cb80c484291a5595e7d47bc67058 (diff) | |
download | anaconda-d2fb657ae4aeeaf3ab070b594371742d810829c3.tar.gz anaconda-d2fb657ae4aeeaf3ab070b594371742d810829c3.tar.xz anaconda-d2fb657ae4aeeaf3ab070b594371742d810829c3.zip |
i18n
Diffstat (limited to 'iw')
-rw-r--r-- | iw/account.py | 10 | ||||
-rw-r--r-- | iw/auth.py | 18 | ||||
-rw-r--r-- | iw/autopartition.py | 14 | ||||
-rw-r--r-- | iw/bootdisk.py | 6 | ||||
-rw-r--r-- | iw/congrats.py | 12 | ||||
-rw-r--r-- | iw/dependencies.py | 11 | ||||
-rw-r--r-- | iw/examine.py | 6 | ||||
-rw-r--r-- | iw/format.py | 5 | ||||
-rw-r--r-- | iw/installpath.py | 10 | ||||
-rw-r--r-- | iw/installtype.py | 10 | ||||
-rw-r--r-- | iw/keyboard.py | 12 | ||||
-rw-r--r-- | iw/language.py | 10 | ||||
-rw-r--r-- | iw/lilo.py | 16 | ||||
-rw-r--r-- | iw/network.py | 28 | ||||
-rw-r--r-- | iw/package.py | 32 | ||||
-rw-r--r-- | iw/progress.py | 22 | ||||
-rw-r--r-- | iw/rootpartition.py | 8 | ||||
-rw-r--r-- | iw/welcome.py | 8 |
18 files changed, 147 insertions, 91 deletions
diff --git a/iw/account.py b/iw/account.py index a66a9b8df..0243b3435 100644 --- a/iw/account.py +++ b/iw/account.py @@ -1,5 +1,9 @@ from gtk import * from iw import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class AccountWindow (InstallWindow): @@ -7,7 +11,7 @@ class AccountWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Account Configuration") + ics.setTitle (_("Account Configuration")) ics.setHTML ("<HTML><BODY>Enter a root password. The password " "must be at least six characters in length." "<p>The \"Next\" button will become enabled when both entry fields match." @@ -29,8 +33,8 @@ class AccountWindow (InstallWindow): def getScreen (self): box = GtkVBox () table = GtkTable (2, 2) - table.attach (GtkLabel ("Root Password: "), 0, 1, 0, 1) - table.attach (GtkLabel ("Confirm: "), 0, 1, 1, 2) + table.attach (GtkLabel (_("Root Password: ")), 0, 1, 0, 1) + table.attach (GtkLabel (_("Confirm: ")), 0, 1, 1, 2) self.pw = GtkEntry (8) self.pw.connect ("changed", self.passwordsMatch) self.pw.set_visibility (FALSE) diff --git a/iw/auth.py b/iw/auth.py index 96b34cce0..119c5ea31 100644 --- a/iw/auth.py +++ b/iw/auth.py @@ -1,5 +1,9 @@ from gtk import * from iw import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class AuthWindow (InstallWindow): @@ -7,7 +11,7 @@ class AuthWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Authentication Configuration") + ics.setTitle (_("Authentication Configuration")) ics.setHTML ("<HTML><BODY>Select authentication methods" "</BODY></HTML>") ics.setNextEnabled (TRUE) @@ -42,11 +46,11 @@ class AuthWindow (InstallWindow): def getScreen (self): box = GtkVBox (FALSE, 10) - self.md5 = GtkCheckButton ("Enable MD5 passwords") - self.shadow = GtkCheckButton ("Enable shadow passwords") + self.md5 = GtkCheckButton (_("Enable MD5 passwords")) + self.shadow = GtkCheckButton (_("Enable shadow passwords")) - self.nis = GtkCheckButton ("Enable NIS") - self.nisBroadcast = GtkCheckButton ("Use broadcast to find NIS server") + self.nis = GtkCheckButton (_("Enable NIS")) + self.nisBroadcast = GtkCheckButton (_("Use broadcast to find NIS server")) self.nisDomain = GtkEntry () self.nisServer = GtkEntry () @@ -58,9 +62,9 @@ class AuthWindow (InstallWindow): self.nisBroadcast.set_active (self.todo.auth.useBroadcast) self.nisServer.set_text (self.todo.auth.server ) - self.domainLabel = GtkLabel ("NIS Domain: ") + self.domainLabel = GtkLabel (_("NIS Domain: ")) self.domainLabel.set_alignment (0, 0) - self.serverLabel = GtkLabel ("NIS Server: ") + self.serverLabel = GtkLabel (_("NIS Server: ")) self.serverLabel.set_alignment (0, 0) self.setSensitivities() diff --git a/iw/autopartition.py b/iw/autopartition.py index 017dd109a..5e70edd84 100644 --- a/iw/autopartition.py +++ b/iw/autopartition.py @@ -1,6 +1,10 @@ from gtk import * from iw import * from thread import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext FSEDIT_CLEAR_LINUX = (1 << 0) FSEDIT_CLEAR_ALL = (1 << 2) @@ -12,7 +16,7 @@ class AutoPartitionWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Auto partition") + ics.setTitle (_("Auto partition")) ics.setNextEnabled (TRUE) def getNext (self): @@ -25,7 +29,7 @@ class AutoPartitionWindow (InstallWindow): ( "Swap-auto", 64, 0x82, 0, -1 ), ] - ret = self.todo.ddruid.attempt (attempt, "Workstation", self.type) + ret = self.todo.ddruid.attempt (attempt, _("Workstation"), self.type) return None def typeSelected (self, button, data): @@ -34,13 +38,13 @@ class AutoPartitionWindow (InstallWindow): def getScreen (self): box = GtkVBox (FALSE) - group = GtkRadioButton (None, "Remove all data") + group = GtkRadioButton (None, _("Remove all data")) group.connect ("clicked", self.typeSelected, FSEDIT_CLEAR_ALL) box.pack_start (group, FALSE) - item = GtkRadioButton (group, "Remove Linux partitions") + item = GtkRadioButton (group, _("Remove Linux partitions")) item.connect ("clicked", self.typeSelected, FSEDIT_CLEAR_LINUX) box.pack_start (item, FALSE) - item = GtkRadioButton (group, "Use existing free space") + item = GtkRadioButton (group, _("Use existing free space")) item.connect ("clicked", self.typeSelected, FSEDIT_USE_EXISTING) box.pack_start (item, FALSE) item.set_active (TRUE) diff --git a/iw/bootdisk.py b/iw/bootdisk.py index 76320812e..3f177b008 100644 --- a/iw/bootdisk.py +++ b/iw/bootdisk.py @@ -2,7 +2,7 @@ from iw import * from gtk import * import gettext -cat = gettext.Catalog ("anaconda-text", "/usr/share/locale") +cat = gettext.Catalog ("anaconda", "/usr/share/locale") _ = cat.gettext class BootdiskWindow (InstallWindow): @@ -10,7 +10,7 @@ class BootdiskWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Bootdisk Creation") + ics.setTitle (_("Bootdisk Creation")) ics.setPrevEnabled (0) ics.setNextEnabled (1) BootdiskWindow.initial = 1 @@ -51,7 +51,7 @@ class BootdiskWindow (InstallWindow): label.set_line_wrap (TRUE) box.pack_start (label, FALSE) - self.bootdisk = GtkCheckButton ("Skip boot disk creation") + self.bootdisk = GtkCheckButton (_("Skip boot disk creation")) self.bootdisk.set_active (FALSE) box.pack_start (GtkHSeparator (), FALSE, padding=3) box.pack_start (self.bootdisk, FALSE) diff --git a/iw/congrats.py b/iw/congrats.py index 031bc145a..903c8228c 100644 --- a/iw/congrats.py +++ b/iw/congrats.py @@ -1,25 +1,29 @@ from gtk import * from gnome.ui import * from iw import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class CongratulationWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Congratulations") + ics.setTitle (_("Congratulations")) ics.setPrevEnabled (0) - ics.setNextButton (STOCK_PIXMAP_QUIT, "Exit") + ics.setNextButton (STOCK_PIXMAP_QUIT, _("Exit")) ics.setNextEnabled (1) def getScreen (self): - label = GtkLabel("Congratulations, installation is complete.\n\n" + label = GtkLabel(_("Congratulations, installation is complete.\n\n" "Remove the boot media and " "press return to reboot. For information on fixes which are " "available for this release of Red Hat Linux, consult the " "Errata available from http://www.redhat.com.\n\n" "Information on configuring your system is available in the post " - "install chapter of the Official Red Hat Linux User's Guide.") + "install chapter of the Official Red Hat Linux User's Guide.")) label.set_line_wrap (TRUE) label.set_line_wrap (TRUE) label.set_alignment (0.0, 0.5) diff --git a/iw/dependencies.py b/iw/dependencies.py index c4712ac32..97677b93f 100644 --- a/iw/dependencies.py +++ b/iw/dependencies.py @@ -1,13 +1,16 @@ from iw import * from gtk import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class UnresolvedDependenciesWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Unresolved Dependencies") + ics.setTitle (_("Unresolved Dependencies")) ics.setNextEnabled (1) - print "hello world" self.dependCB = None def getNext (self): @@ -24,14 +27,14 @@ class UnresolvedDependenciesWindow (InstallWindow): sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) - list = GtkCList (2, ("Package", "Requirement")) + list = GtkCList (2, (_("Package"), _("Requirement"))) list.freeze () for (name, suggest) in self.deps: list.append ((name, suggest)) list.thaw () sw.add (list) - self.dependCB = GtkCheckButton ("Install packages to satisfy dependencies") + self.dependCB = GtkCheckButton (_("Install packages to satisfy dependencies")) self.dependCB.set_active (TRUE) align = GtkAlignment (0.5, 0.5) align.add (self.dependCB) diff --git a/iw/examine.py b/iw/examine.py index ab469cf49..459367dae 100644 --- a/iw/examine.py +++ b/iw/examine.py @@ -7,7 +7,7 @@ class UpgradeExamineWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Upgrade Examine") + ics.setTitle (_("Upgrade Examine")) def toggled (self, widget, part): if widget.get_active (): @@ -31,7 +31,7 @@ class UpgradeExamineWindow (InstallWindow): box = GtkVBox (FALSE) if not parts: - box.pack_start (GtkLabel ("You don't have any Linux partitions.\n You can't upgrade this sytem!"), + box.pack_start (GtkLabel (_("You don't have any Linux partitions.\n You can't upgrade this sytem!")), FALSE) return box @@ -49,7 +49,7 @@ class UpgradeExamineWindow (InstallWindow): sw.add_with_viewport (box) vbox = GtkVBox (FALSE, 5) - self.individualPackages = GtkCheckButton ("Customize packages to be upgraded") + self.individualPackages = GtkCheckButton (_("Customize packages to be upgraded")) self.individualPackages.set_active (FALSE) align = GtkAlignment (0.5, 0.5) align.add (self.individualPackages) diff --git a/iw/format.py b/iw/format.py index e1945404f..096743747 100644 --- a/iw/format.py +++ b/iw/format.py @@ -2,9 +2,10 @@ from gtk import * from iw import * from thread import * import isys +import gettext -def _(x): - return x +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class FormatWindow (InstallWindow): def __init__ (self, ics): diff --git a/iw/installpath.py b/iw/installpath.py index cf0265913..54a5fb758 100644 --- a/iw/installpath.py +++ b/iw/installpath.py @@ -18,6 +18,10 @@ from dependencies import * from lilo import * from examine import * from bootdisk import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext UPGRADE = 0 INSTALL = 1 @@ -27,7 +31,7 @@ class InstallPathWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Install Path") + ics.setTitle (_("Install Path")) ics.setNextEnabled (1) self.commonSteps = [LanguageWindow, KeyboardWindow, @@ -52,11 +56,11 @@ class InstallPathWindow (InstallWindow): def getScreen (self): box = GtkVBox (FALSE, 5) - group = GtkRadioButton (None, "Install") + group = GtkRadioButton (None, _("Install")) group.connect ("toggled", self.toggled, INSTALL) self.toggled (group, INSTALL) box.pack_start (group, FALSE) - group = GtkRadioButton (group, "Upgrade") + group = GtkRadioButton (group, _("Upgrade")) group.connect ("toggled", self.toggled, UPGRADE) box.pack_start (group, FALSE) diff --git a/iw/installtype.py b/iw/installtype.py index 1ee72e231..7e4a6f32d 100644 --- a/iw/installtype.py +++ b/iw/installtype.py @@ -13,13 +13,13 @@ class InstallTypeWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Installation Type") + ics.setTitle (_("Installation Type")) ics.setNextEnabled (TRUE) - self.installTypes = ((WORKSTATION_GNOME, "Workstation (Gnome)"), - (WORKSTATION_KDE, "Workstation (KDE)"), - (SERVER, "Server"), - (CUSTOM, "Custom")) + self.installTypes = ((WORKSTATION_GNOME, _("Workstation (Gnome)")), + (WORKSTATION_KDE, _("Workstation (KDE)")), + (SERVER, _("Server")), + (CUSTOM, _("Custom"))) self.type = self.installTypes[0][0] diff --git a/iw/keyboard.py b/iw/keyboard.py index eec6e48ce..e09711fd8 100644 --- a/iw/keyboard.py +++ b/iw/keyboard.py @@ -1,13 +1,17 @@ from gtk import * from iw import * import xkb +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class KeyboardWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Keyboard Configuration") + ics.setTitle (_("Keyboard Configuration")) ics.setHTML ("<HTML><BODY>Select your keyboard." "</BODY></HTML>") ics.setNextEnabled (TRUE) @@ -22,7 +26,7 @@ class KeyboardWindow (InstallWindow): print self.todo.keyboard.available () box = GtkVBox (FALSE) - box.pack_start (GtkLabel ("Model"), FALSE) + box.pack_start (GtkLabel (_("Model")), FALSE) sw = GtkScrolledWindow () sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) @@ -34,7 +38,7 @@ class KeyboardWindow (InstallWindow): sw.add (self.modelList) box.pack_start (sw, TRUE) - box.pack_start (GtkLabel ("Layout"), FALSE) + box.pack_start (GtkLabel (_("Layout")), FALSE) sw = GtkScrolledWindow () sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) @@ -48,7 +52,7 @@ class KeyboardWindow (InstallWindow): sw.add (self.layoutList) box.pack_start (sw, TRUE) - box.pack_start (GtkLabel ("Variant"), FALSE) + box.pack_start (GtkLabel (_("Variant")), FALSE) sw = GtkScrolledWindow () sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) diff --git a/iw/language.py b/iw/language.py index fd5ba23e9..944157eb3 100644 --- a/iw/language.py +++ b/iw/language.py @@ -1,19 +1,23 @@ from gtk import * from iw import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class LanguageWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Language Selection") + ics.setTitle (_("Language Selection")) ics.setPrevEnabled (0) ics.setNextEnabled (1) ics.setHTML ("<HTML><BODY>Select which language you would like" "to use for the system default.</BODY></HTML>") - self.question = ("What language should be used during the " - "installation process?") + self.question = (_("What language should be used during the " + "installation process?")) def languageSelected (self, button, locale): self.todo.language.set (locale) diff --git a/iw/lilo.py b/iw/lilo.py index 92beb26c7..5482614d7 100644 --- a/iw/lilo.py +++ b/iw/lilo.py @@ -1,12 +1,16 @@ from iw import * from gtk import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class LiloWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Lilo Configuration") + ics.setTitle (_("Lilo Configuration")) ics.setNextEnabled (1) self.type = None @@ -49,10 +53,10 @@ class LiloWindow (InstallWindow): sw.set_border_width (5) sw.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) - self.list = GtkCList (2, ("Device", "Location")) + self.list = GtkCList (2, (_("Device"), _("Location"))) self.list.freeze () - self.list.append ((format % (self.boothd,), "Master Boot Record (MBR)")) - self.list.append ((format % (self.bootpart,), "First sector of boot partition")) + self.list.append ((format % (self.boothd,), _("Master Boot Record (MBR)"))) + self.list.append ((format % (self.bootpart,), _("First sector of boot partition"))) self.list.columns_autosize () self.list.set_selection_mode (SELECTION_BROWSE) self.list.set_column_resizeable (0, FALSE) @@ -64,12 +68,12 @@ class LiloWindow (InstallWindow): sw.add (self.list) box = GtkVBox (FALSE, 5) - self.bootdisk = GtkCheckButton ("Create boot disk") + self.bootdisk = GtkCheckButton (_("Create boot disk")) self.bootdisk.set_active (TRUE) box.pack_start (self.bootdisk, FALSE) box.pack_start (GtkHSeparator (), FALSE, padding=3) - self.lilo = GtkCheckButton ("Skip LILO install") + self.lilo = GtkCheckButton (_("Skip LILO install")) self.lilo.set_active (FALSE) self.lilo.connect ("toggled", self.toggled) box.pack_start (self.lilo, FALSE) diff --git a/iw/network.py b/iw/network.py index 2b4c8a897..efd23677a 100644 --- a/iw/network.py +++ b/iw/network.py @@ -1,13 +1,17 @@ from gtk import * from iw import * from isys import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class NetworkWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Network Configuration") + ics.setTitle (_("Network Configuration")) ics.setNextEnabled (1) self.todo = ics.getToDo () self.calcNMHandler = None @@ -63,20 +67,20 @@ class NetworkWindow (InstallWindow): def devSelected (self, widget, key): self.setupTODO () self.dev = self.devs[key] - if self.dev.get ("bootproto") == "dhcp": + if self.dev.get (_("bootproto")) == "dhcp": self.DHCPcb.set_active (TRUE) self.ip.set_text ("") self.nm.set_text ("") else: self.DHCPcb.set_active (FALSE) - self.ip.set_text (self.dev.get ("ipaddr")) - self.nm.set_text (self.dev.get ("netmask")) + self.ip.set_text (self.dev.get (_("ipaddr"))) + self.nm.set_text (self.dev.get (_("netmask"))) def getScreen (self): box = GtkVBox () devLine = GtkHBox () - devLabel = GtkLabel ("Device: ") + devLabel = GtkLabel (_("Device: ")) devLabel.set_alignment (0, 0) devLine.pack_start (devLabel) menu = GtkMenu () @@ -94,7 +98,7 @@ class NetworkWindow (InstallWindow): devLine.pack_start (devMenu) box.pack_start (devLine, FALSE) - self.DHCPcb = GtkCheckButton ("Configure using DHCP") + self.DHCPcb = GtkCheckButton (_("Configure using DHCP")) self.DHCPcb.set_active (TRUE) box.pack_start (self.DHCPcb, FALSE) @@ -102,8 +106,8 @@ class NetworkWindow (InstallWindow): ipTable = GtkTable (2, 2) self.ipTable = ipTable - ipTable.attach (GtkLabel ("IP Address:"), 0, 1, 0, 1) - ipTable.attach (GtkLabel ("Netmask:"), 0, 1, 1, 2) + ipTable.attach (GtkLabel (_("IP Address:")), 0, 1, 0, 1) + ipTable.attach (GtkLabel (_("Netmask:")), 0, 1, 1, 2) self.ip = GtkEntry (15) self.ip.connect ("focus_in_event", self.focusInIP) self.ip.connect ("focus_out_event", self.focusOutIP) @@ -117,10 +121,10 @@ class NetworkWindow (InstallWindow): box.pack_start (GtkHSeparator (), FALSE, padding=3) ipTable = GtkTable (5, 2) - ipTable.attach (GtkLabel ("Gateway: "), 0, 1, 0, 1) - ipTable.attach (GtkLabel ("Primary DNS: "), 0, 1, 2, 3) - ipTable.attach (GtkLabel ("Secondary DNS: "), 0, 1, 3, 4) - ipTable.attach (GtkLabel ("Ternary DNS: "), 0, 1, 4, 5) + ipTable.attach (GtkLabel (_("Gateway: ")), 0, 1, 0, 1) + ipTable.attach (GtkLabel (_("Primary DNS: ")), 0, 1, 2, 3) + ipTable.attach (GtkLabel (_("Secondary DNS: ")), 0, 1, 3, 4) + ipTable.attach (GtkLabel (_("Ternary DNS: ")), 0, 1, 4, 5) self.gw = GtkEntry (15) self.gw.connect ("activate", lambda widget, box=box: box.focus (DIR_TAB_FORWARD)) self.dns1 = GtkEntry (15) diff --git a/iw/package.py b/iw/package.py index e284787f7..d18466309 100644 --- a/iw/package.py +++ b/iw/package.py @@ -10,6 +10,10 @@ import GdkImlib import string import sys import xpms +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class IndividualPackageSelectionWindow (InstallWindow): @@ -17,7 +21,7 @@ class IndividualPackageSelectionWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Individual Package Selection") + ics.setTitle (_("Individual Package Selection")) ics.setNextEnabled (1) ics.setHTML ("<HTML><BODY>Next you must select which packages to install." "</BODY></HTML>") @@ -174,7 +178,7 @@ class IndividualPackageSelectionWindow (InstallWindow): self.clear_package_desc () self.iconList.freeze () self.iconList.clear () - self.iconList.append_imlib (self.idirUpImage, "Up") + self.iconList.append_imlib (self.idirUpImage, _("Up")) self.iconList.set_icon_data (0, (self.DIR_UP, node)) for x in node.children: dirName = ctree.get_node_info (x)[0] @@ -182,7 +186,7 @@ class IndividualPackageSelectionWindow (InstallWindow): self.iconList.set_icon_data (pos, (self.DIR, x)) try: - # this code is wrapped in a generic exception handler since we don't + # this code is wrapped in a generic exception handler since we dont # care if we access a namespace that lacks rpms # drop the leading slash off the package namespace @@ -200,7 +204,7 @@ class IndividualPackageSelectionWindow (InstallWindow): pass # make sure that the iconList is reset to show the initial files in a dir, - # unless we're rebuilding the icons because one has been selected for install + # unless we re rebuilding the icons because one has been selected for install if not self.updatingIcons: self.iconListSW.get_vadjustment ().set_value (0.0) self.iconList.thaw () @@ -231,7 +235,7 @@ class IndividualPackageSelectionWindow (InstallWindow): # print self.currentPackagePos # self.iconList.remove (self.currentPackagePos) -# print "got here" +# print _("got here") # self.iconList.insert (self.currentPackagePos, packageIcon, # self.currentPackage[rpm.RPMTAG_NAME]) # self.iconList.set_icon_data (self.currentPackagePos, (self.RPM, self.currentPackage)) @@ -247,7 +251,7 @@ class IndividualPackageSelectionWindow (InstallWindow): self.path_mapping = {} self.ctree = GtkCTree () self.ctree.set_selection_mode (SELECTION_BROWSE) - # Kludge to get around CTree's extremely broken focus behavior + # Kludge to get around CTree s extremely broken focus behavior self.ctree.unset_flags (CAN_FOCUS) if (not self.__dict__.has_key ("open_p")): @@ -272,7 +276,7 @@ class IndividualPackageSelectionWindow (InstallWindow): self.flat_groups = groups index = 0 - # now insert the groups into the list, then each group's packages + # now insert the groups into the list, then each group s packages # after sorting the list def cmpHdrName(first, second): if first[rpm.RPMTAG_NAME] < second[rpm.RPMTAG_NAME]: @@ -320,24 +324,24 @@ class IndividualPackageSelectionWindow (InstallWindow): hbox = GtkHBox () - label = GtkLabel ("Name: ") + label = GtkLabel (_("Name: ")) self.packageName = GtkLabel () self.packageName.set_alignment (0.0, 0.0) hbox.pack_start (label, FALSE, padding=5) hbox.pack_start (self.packageName, FALSE) - label = GtkLabel ("Package Details") + label = GtkLabel (_("Package Details")) label.set_alignment (1.0, 1.0) hbox.pack_start (label, padding=5) descVBox.pack_start (hbox, FALSE) hbox = GtkHBox () - label = GtkLabel ("Size: ") + label = GtkLabel (_("Size: ")) self.packageSize = GtkLabel () self.packageSize.set_alignment (0.0, 0.5) hbox.pack_start (label, FALSE, padding=5) hbox.pack_start (self.packageSize, FALSE) align = GtkAlignment (1.0, 0.0) - self.cbutton = GtkCheckButton ("Select Package For Installation") + self.cbutton = GtkCheckButton (_("Select Package For Installation")) self.cbutton.set_sensitive (FALSE) self.cbutton.connect ("toggled", self.installButtonToggled) self.cbutton.children()[0].set_alignment (1.0, 0.5) @@ -358,7 +362,7 @@ class IndividualPackageSelectionWindow (InstallWindow): descVBox.pack_start (descSW) -# descFrame = GtkFrame ("Package Details") +# descFrame = GtkFrame (_("Package Details")) # descFrame.set_border_width (5) # descFrame.add (descVBox) @@ -373,7 +377,7 @@ class PackageSelectionWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Package Group Selection") + ics.setTitle (_("Package Group Selection")) ics.setNextEnabled (1) ics.setHTML ("<HTML><BODY>Next you must select which package groups to install." "</BODY></HTML>") @@ -437,7 +441,7 @@ class PackageSelectionWindow (InstallWindow): sw.add_with_viewport (box) vbox = GtkVBox (FALSE, 5) - self.individualPackages = GtkCheckButton ("Select individual packages") + self.individualPackages = GtkCheckButton (_("Select individual packages")) self.individualPackages.set_active (FALSE) align = GtkAlignment (0.5, 0.5) align.add (self.individualPackages) diff --git a/iw/progress.py b/iw/progress.py index 04e584eb6..d49a35736 100644 --- a/iw/progress.py +++ b/iw/progress.py @@ -4,6 +4,10 @@ import string import rpm import time from threading import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class DoInstall (Thread): def __init__ (self, icw, todo): @@ -22,7 +26,7 @@ class InstallProgressWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Installing Packages") + ics.setTitle (_("Installing Packages")) ics.setPrevEnabled (0) self.todo = ics.getToDo () @@ -73,7 +77,7 @@ class InstallProgressWindow (InstallWindow): # self.clist.set_text ("%d" % self.numComplete, # status["completed"]["packages"]["row"], -# status["completed"]["packages"][" +# status["completed"]["packages"]["xxx"] self.timeCompleteW.setText("%12s" % formatTime(elapsedTime)) @@ -101,7 +105,7 @@ class InstallProgressWindow (InstallWindow): def getScreen (self): table = GtkTable (3, 3) - label = GtkLabel ("Package") + label = GtkLabel (_("Package")) label.set_alignment (0.0, 0.0) table.attach (label, 0, 1, 0, 1, FILL, 0) label = GtkLabel (":") @@ -111,10 +115,10 @@ class InstallProgressWindow (InstallWindow): label = GtkLabel (":") label.set_alignment (0.0, 0.0) table.attach (label, 1, 2, 2, 3, 0, FILL | EXPAND, 5) - label = GtkLabel ("Size") + label = GtkLabel (_("Size")) label.set_alignment (0.0, 0.0) table.attach (label, 0, 1, 1, 2, FILL, 0) - label = GtkLabel ("Summary") + label = GtkLabel (_("Summary")) label.set_alignment (0.0, 0.0) table.attach (label, 0, 1, 2, 3, FILL, FILL | EXPAND) @@ -148,14 +152,14 @@ class InstallProgressWindow (InstallWindow): "time" : (2, 3) } } - clist = GtkCList (4, ("Status", "Packages", "Size", "Time")) + clist = GtkCList (4, (_("Status"), _("Packages"), _("Size"), _("Time"))) clist.set_column_justification (0, JUSTIFY_LEFT) clist.set_column_justification (1, JUSTIFY_RIGHT) clist.set_column_justification (2, JUSTIFY_RIGHT) clist.set_column_justification (3, JUSTIFY_RIGHT) - clist.append (("Total", "0", "0", "0:00.00")) - clist.append (("Completed", "0", "0", "0:00.00")) - clist.append (("Remaining", "0", "0", "0:00.00")) + clist.append ((_("Total"), "0", "0", "0:00.00")) + clist.append ((_("Completed"), "0", "0", "0:00.00")) + clist.append ((_("Remaining"), "0", "0", "0:00.00")) # clist.set_column_auto_resize (0, TRUE) clist.columns_autosize () self.clist = clist diff --git a/iw/rootpartition.py b/iw/rootpartition.py index bde8044f0..0ae3fb3f3 100644 --- a/iw/rootpartition.py +++ b/iw/rootpartition.py @@ -2,13 +2,17 @@ from gtk import * from iw import * from thread import * import isys +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class ConfirmPartitionWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Confirm Partitioning Selection") + ics.setTitle (_("Confirm Partitioning Selection")) ics.setHTML ("<HTML><BODY>Select a root partition" "</BODY></HTML>") ics.setNextEnabled (TRUE) @@ -24,7 +28,7 @@ class PartitionWindow (InstallWindow): InstallWindow.__init__ (self, ics) self.todo = ics.getToDo () - ics.setTitle ("Root Partition Selection") + ics.setTitle (_("Root Partition Selection")) ics.setHTML ("<HTML><BODY>Select a root partition" "</BODY></HTML>") ics.setNextEnabled (TRUE) diff --git a/iw/welcome.py b/iw/welcome.py index a9c398702..e3b148982 100644 --- a/iw/welcome.py +++ b/iw/welcome.py @@ -1,12 +1,16 @@ from gtk import * from iw import * +import gettext + +cat = gettext.Catalog ("anaconda", "/usr/share/locale") +_ = cat.gettext class WelcomeWindow (InstallWindow): def __init__ (self, ics): InstallWindow.__init__ (self, ics) - ics.setTitle ("Welcome to Red Hat Linux!") + ics.setTitle (_("Welcome to Red Hat Linux!")) ics.setNextEnabled (1) ics.setHTML("<HTML><BODY><CENTER><H2>Welcome to<br>Red Hat Linux!</H2></CENTER>" "" @@ -19,7 +23,7 @@ class WelcomeWindow (InstallWindow): "http://www.redhat.com/.</P></BODY></HTML>") def getScreen (self): - label = GtkLabel("(insert neat logo graphic here)") + label = GtkLabel ("(insert neat logo graphic here)") box = GtkVBox (FALSE, 10) box.pack_start (label, TRUE, TRUE, 0) |