public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gli r1906 - trunk/src/fe/gtk
@ 2008-05-26  2:30 Preston Cody (codeman)
  0 siblings, 0 replies; only message in thread
From: Preston Cody (codeman) @ 2008-05-26  2:30 UTC (permalink / raw
  To: gentoo-commits

Author: codeman
Date: 2008-05-26 02:30:37 +0000 (Mon, 26 May 2008)
New Revision: 1906

Modified:
   trunk/src/fe/gtk/InstallDone.py
   trunk/src/fe/gtk/InstallFailed.py
   trunk/src/fe/gtk/InstallMode.py
   trunk/src/fe/gtk/LocalMounts.py
   trunk/src/fe/gtk/NetworkMounts.py
   trunk/src/fe/gtk/Networking.py
   trunk/src/fe/gtk/OtherSettings.py
Log:

committing changes to gtkfe in stages.
adding internalization support written by
Jesus Rivero (Neurogeek)
basically sets everything in gettext.
these files are more trivial updates.


Modified: trunk/src/fe/gtk/InstallDone.py
===================================================================
--- trunk/src/fe/gtk/InstallDone.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/InstallDone.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -8,12 +8,12 @@
 
 class Panel(GLIScreen):
 
-	_helptext = """
+	_helptext = _("""
 <b><u>Install Complete!</u></b>
 
 Your install has finished. Click the Exit button, restart your computer, \
 and enjoy!
-"""
+""")
 
 	def __init__(self, controller):
 		GLIScreen.__init__(self, controller)
@@ -24,7 +24,7 @@
 
 		hbox = gtk.HBox(False, 0)
 		label = gtk.Label()
-		label_markup = '<b>Your install is complete!</b>'
+		label_markup = _('<b>Your install is complete!</b>')
 		label.set_markup(label_markup)
 		label.set_line_wrap(True)
 		hbox.pack_start(label, expand=False, fill=False, padding=5)

Modified: trunk/src/fe/gtk/InstallFailed.py
===================================================================
--- trunk/src/fe/gtk/InstallFailed.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/InstallFailed.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -8,14 +8,14 @@
 
 class Panel(GLIScreen):
 
-	_helptext = """
+	_helptext = _("""
 <b><u>Install Failed</u></b>
 
 Your install has failed for one of numerous reasons. You can find the error in \
 the logfile at /var/log/install.log.failed. Once you determine that the error was \
 not caused by you, please file a bug at http://bugs.gentoo.org/ in the \
 Gentoo Release Media product and the Installer component.
-"""
+""")
 
 	def __init__(self, controller):
 		GLIScreen.__init__(self, controller)
@@ -26,7 +26,7 @@
 
 		hbox = gtk.HBox(False, 0)
 		label = gtk.Label()
-		label_markup = '<b>Your install has failed.</b>'
+		label_markup = _('<b>Your install has failed.</b>')
 		label.set_markup(label_markup)
 		label.set_line_wrap(True)
 		hbox.pack_start(label, expand=False, fill=False, padding=5)

Modified: trunk/src/fe/gtk/InstallMode.py
===================================================================
--- trunk/src/fe/gtk/InstallMode.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/InstallMode.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -5,12 +5,11 @@
 
 import gtk
 from GLIScreen import *
-from gettext import gettext as _
 
 class Panel(GLIScreen):
 
 	title = _("Welcome to the Gentoo Linux Installer")
-	_helptext = """
+	_helptext = _("""
 <b><u>Install Mode</u></b>
 
 Welcome to the GTK+ front-end for the Gentoo Linux Installer. It is highly \
@@ -24,7 +23,7 @@
 some flexibility, but it makes safe assumptions on some advanced options. The \
 "Advanced" mode is for people who want to play around with more settings. If \
 you break your install in this mode, don't come crying to us.
-"""
+""")
 
 	def __init__(self, controller):
 		GLIScreen.__init__(self, controller)
@@ -33,7 +32,7 @@
 
 		hbox = gtk.HBox(False)
 		label = gtk.Label()
-		label.set_markup('<b>Choose your install mode</b>')
+		label.set_markup(_('<b>Choose your install mode</b>'))
 		hbox.pack_start(label, expand=False, fill=False, padding=0)
 		vert.pack_start(hbox, expand=False, fill=False, padding=15)
 

Modified: trunk/src/fe/gtk/LocalMounts.py
===================================================================
--- trunk/src/fe/gtk/LocalMounts.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/LocalMounts.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -14,11 +14,11 @@
 
 class Panel(GLIScreen):
 
-	title = "Local Mounts"
+	title = _("Local Mounts")
 	columns = []
 	localmounts = []
 	active_entry = -1
-	_helptext = """
+	_helptext = _("""
 <b><u>Local Mounts</u></b>
 
 Here, you can add partitions and special devices to mount during (and after) \
@@ -32,7 +32,7 @@
 To edit a mount that you've already added to the list list, select it by \
 clicking on it. Edit any of the fields below and click the 'Update' button. You \
 can remove it from the list by clicking the 'Delete' button.
-"""
+""")
 
 	def __init__(self, controller):
 		GLIScreen.__init__(self, controller)
@@ -43,10 +43,10 @@
 		self.treedatasort = gtk.TreeModelSort(self.treedata)
 		self.treeview = gtk.TreeView(self.treedatasort)
 		self.treeview.connect("cursor-changed", self.selection_changed)
-		self.columns.append(gtk.TreeViewColumn("Device", gtk.CellRendererText(), text=1))
-		self.columns.append(gtk.TreeViewColumn("Type", gtk.CellRendererText(), text=2))
-		self.columns.append(gtk.TreeViewColumn("Mount Point", gtk.CellRendererText(), text=3))
-		self.columns.append(gtk.TreeViewColumn("Mount Options", gtk.CellRendererText(), text=4))
+		self.columns.append(gtk.TreeViewColumn(_("Device"), gtk.CellRendererText(), text=1))
+		self.columns.append(gtk.TreeViewColumn(_("Type"), gtk.CellRendererText(), text=2))
+		self.columns.append(gtk.TreeViewColumn(_("Mount Point"), gtk.CellRendererText(), text=3))
+		self.columns.append(gtk.TreeViewColumn(_("Mount Options"), gtk.CellRendererText(), text=4))
 		col_num = 0
 		for column in self.columns:
 			column.set_resizable(True)
@@ -64,7 +64,7 @@
 		mount_info_table = gtk.Table(5, 3, False)
 		mount_info_table.set_col_spacings(10)
 		mount_info_table.set_row_spacings(6)
-		mount_info_device_label = gtk.Label("Device:")
+		mount_info_device_label = gtk.Label(_("Device:"))
 		mount_info_device_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_device_label, 0, 1, 0, 1)
 		self.mount_info_device = gtk.ComboBoxEntry(gtk.ListStore(gobject.TYPE_STRING))
@@ -72,19 +72,19 @@
 		if not self.mount_info_device.get_text_column() == 0:
 			self.mount_info_device.set_text_column(0)
 		mount_info_table.attach(self.mount_info_device, 1, 2, 0, 1)
-		mount_info_type_label = gtk.Label("Type:")
+		mount_info_type_label = gtk.Label(_("Type:"))
 		mount_info_type_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_type_label, 0, 1, 1, 2)
 		self.mount_info_type = gtk.Entry()
 		self.mount_info_type.set_width_chars(20)
 		mount_info_table.attach(self.mount_info_type, 1, 2, 1, 2)
-		mount_info_mountpoint_label = gtk.Label("Mount point:")
+		mount_info_mountpoint_label = gtk.Label(_("Mount point:"))
 		mount_info_mountpoint_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_mountpoint_label, 0, 1, 2, 3)
 		self.mount_info_mountpoint = gtk.Entry()
 		self.mount_info_mountpoint.set_width_chars(30)
 		mount_info_table.attach(self.mount_info_mountpoint, 1, 2, 2, 3)
-		mount_info_mountopts_label = gtk.Label("Mount options:")
+		mount_info_mountopts_label = gtk.Label(_("Mount options:"))
 		mount_info_mountopts_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_mountopts_label, 0, 1, 3, 4)
 		self.mount_info_mountopts = gtk.Entry()
@@ -94,14 +94,14 @@
 		vert.pack_start(self.mount_info_box, expand=False, fill=False, padding=10)
 
 		mount_button_box = gtk.HBox(False, 0)
-		mount_button_add = gtk.Button(" _Add ")
+		mount_button_add = gtk.Button(_(" _Add "))
 		mount_button_add.connect("clicked", self.new_mount)
 		mount_button_box.pack_start(mount_button_add, expand=False, fill=False, padding=10)
-		self.mount_button_update = gtk.Button(" _Update ")
+		self.mount_button_update = gtk.Button(_(" _Update "))
 		self.mount_button_update.connect("clicked", self.update_mount)
 		self.mount_button_update.set_sensitive(False)
 		mount_button_box.pack_start(self.mount_button_update, expand=False, fill=False, padding=10)
-		self.mount_button_delete = gtk.Button(" _Delete ")
+		self.mount_button_delete = gtk.Button(_(" _Delete "))
 		self.mount_button_delete.connect("clicked", self.delete_mount)
 		self.mount_button_delete.set_sensitive(False)
 		mount_button_box.pack_start(self.mount_button_delete, expand=False, fill=False, padding=10)
@@ -172,13 +172,13 @@
 
 	def update_mount(self, button):
 		if self.mount_info_device.get_child().get_text().strip() == "":
-			msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a value for the device field")
+			msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry"), _("You must enter a value for the device field"))
 			result = msgdialog.run()
 			if result == gtk.RESPONSE_ACCEPT:
 				msgdialog.destroy()
 			return
 		if not self.mount_info_type.get_text().strip() in ("swap", "linux-swap") and self.mount_info_mountpoint.get_text().strip() == "":
-			msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a mountpoint")
+			msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry"), _("You must enter a mountpoint"))
 			result = msgdialog.run()
 			if result == gtk.RESPONSE_ACCEPT:
 				msgdialog.destroy()

Modified: trunk/src/fe/gtk/NetworkMounts.py
===================================================================
--- trunk/src/fe/gtk/NetworkMounts.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/NetworkMounts.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -13,12 +13,12 @@
 
 class Panel(GLIScreen):
 
-	title = "Network Mounts"
+	title = _("Network Mounts")
 	columns = []
 	netmounts = []
 	active_entry = -1
 	mount_types = ["NFS"]
-	_helptext = """
+	_helptext = _("""
 <b><u>Network Mounts</u></b>
 
 Here, you can specify network shares to mount during (and after) the install. \
@@ -37,7 +37,7 @@
 To edit an existing mount, select it in the list above. Edit any fields below \
 and then click the 'Update' button. You can remove it from the list by clicking \
 the 'Delete' button.
-"""
+""")
 
 	def __init__(self, controller):
 		GLIScreen.__init__(self, controller)
@@ -50,11 +50,11 @@
 		self.treedatasort = gtk.TreeModelSort(self.treedata)
 		self.treeview = gtk.TreeView(self.treedatasort)
 		self.treeview.connect("cursor-changed", self.selection_changed)
-		self.columns.append(gtk.TreeViewColumn("Host/IP", gtk.CellRendererText(), text=1))
-		self.columns.append(gtk.TreeViewColumn("Export/Share", gtk.CellRendererText(), text=2))
-		self.columns.append(gtk.TreeViewColumn("Type", gtk.CellRendererText(), text=3))
-		self.columns.append(gtk.TreeViewColumn("Mount Point", gtk.CellRendererText(), text=4))
-		self.columns.append(gtk.TreeViewColumn("Mount Options", gtk.CellRendererText(), text=5))
+		self.columns.append(gtk.TreeViewColumn(_("Host/IP"), gtk.CellRendererText(), text=1))
+		self.columns.append(gtk.TreeViewColumn(_("Export/Share"), gtk.CellRendererText(), text=2))
+		self.columns.append(gtk.TreeViewColumn(_("Type"), gtk.CellRendererText(), text=3))
+		self.columns.append(gtk.TreeViewColumn(_("Mount Point"), gtk.CellRendererText(), text=4))
+		self.columns.append(gtk.TreeViewColumn(_("Mount Options"), gtk.CellRendererText(), text=5))
 		col_num = 0
 		for column in self.columns:
 			column.set_resizable(True)
@@ -72,7 +72,7 @@
 		mount_info_table = gtk.Table(5, 3, False)
 		mount_info_table.set_col_spacings(10)
 		mount_info_table.set_row_spacings(6)
-		mount_info_type_label = gtk.Label("Type:")
+		mount_info_type_label = gtk.Label(_("Type:"))
 		mount_info_type_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_type_label, 0, 1, 0, 1)
 		self.mount_info_type = gtk.combo_box_new_text()
@@ -80,13 +80,13 @@
 			self.mount_info_type.append_text(mount_type)
 		self.mount_info_type.set_active(0)
 		mount_info_table.attach(self.mount_info_type, 1, 2, 0, 1)
-		mount_info_host_label = gtk.Label("Host/IP:")
+		mount_info_host_label = gtk.Label(_("Host/IP:"))
 		mount_info_host_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_host_label, 0, 1, 1, 2)
 		self.mount_info_host = gtk.Entry()
 		self.mount_info_host.set_width_chars(25)
 		mount_info_table.attach(self.mount_info_host, 1, 2, 1, 2)
-		mount_info_export_label = gtk.Label("Export/Share:")
+		mount_info_export_label = gtk.Label(_("Export/Share:"))
 		mount_info_export_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_export_label, 0, 1, 2, 3)
 		self.mount_info_export = gtk.ComboBoxEntry(gtk.ListStore(gobject.TYPE_STRING))
@@ -99,13 +99,13 @@
 		self.mount_info_export_refresh.add(mount_info_export_refresh_img)
 		self.mount_info_export_refresh.connect("clicked", self.populate_exports)
 		mount_info_table.attach(self.mount_info_export_refresh, 2, 3, 2, 3)
-		mount_info_mountpoint_label = gtk.Label("Mount point:")
+		mount_info_mountpoint_label = gtk.Label(_("Mount point:"))
 		mount_info_mountpoint_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_mountpoint_label, 0, 1, 3, 4)
 		self.mount_info_mountpoint = gtk.Entry()
 		self.mount_info_mountpoint.set_width_chars(30)
 		mount_info_table.attach(self.mount_info_mountpoint, 1, 2, 3, 4)
-		mount_info_mountopts_label = gtk.Label("Mount options:")
+		mount_info_mountopts_label = gtk.Label(_("Mount options:"))
 		mount_info_mountopts_label.set_alignment(0.0, 0.5)
 		mount_info_table.attach(mount_info_mountopts_label, 0, 1, 4, 5)
 		self.mount_info_mountopts = gtk.Entry()
@@ -115,18 +115,18 @@
 		vert.pack_start(self.mount_info_box, expand=False, fill=False, padding=10)
 
 		mount_button_box = gtk.HBox(False, 0)
-		mount_button_new = gtk.Button(" _New ")
+		mount_button_new = gtk.Button(_(" _New "))
 		mount_button_new.connect("clicked", self.new_mount)
 		mount_button_box.pack_start(mount_button_new, expand=False, fill=False, padding=10)
-		self.mount_button_update = gtk.Button(" _Update ")
+		self.mount_button_update = gtk.Button(_(" _Update "))
 		self.mount_button_update.connect("clicked", self.update_mount)
 		self.mount_button_update.set_sensitive(False)
 		mount_button_box.pack_start(self.mount_button_update, expand=False, fill=False, padding=10)
-		self.mount_button_delete = gtk.Button(" _Delete ")
+		self.mount_button_delete = gtk.Button(_(" _Delete "))
 		self.mount_button_delete.connect("clicked", self.delete_mount)
 		self.mount_button_delete.set_sensitive(False)
 		mount_button_box.pack_start(self.mount_button_delete, expand=False, fill=False, padding=10)
-		self.mount_button_populate = gtk.Button(" _Populate Exports ")
+		self.mount_button_populate = gtk.Button(_(" _Populate Exports "))
 		self.mount_button_populate.connect("clicked", self.populate_exports)
 		self.mount_button_populate.set_sensitive(False)
 		mount_button_box.pack_start(self.mount_button_populate, expand=False, fill=False, padding=10)
@@ -200,19 +200,19 @@
 
 	def update_mount(self, button, data=None):
 		if not GLIUtility.is_ip(self.mount_info_host.get_text()) and not GLIUtility.is_hostname(self.mount_info_host.get_text()):
-			msgdialog = Widgets.Widgets().error_Box("Invalid Host or IP", "You must specify a valid hostname or IP address")
+			msgdialog = Widgets.Widgets().error_Box(_("Invalid Host or IP", "You must specify a valid hostname or IP address"))
 			result = msgdialog.run()
 			if result == gtk.RESPONSE_ACCEPT:
 				msgdialog.destroy()
 			return
 		if self.mount_info_export.get_child().get_text() == "":
-			msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a value for the export field")
+			msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry", "You must enter a value for the export field"))
 			result = msgdialog.run()
 			if result == gtk.RESPONSE_ACCEPT:
 				msgdialog.destroy()
 			return
 		if self.mount_info_mountpoint.get_text() == "":
-			msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a mountpoint")
+			msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry", "You must enter a mountpoint"))
 			result = msgdialog.run()
 			if result == gtk.RESPONSE_ACCEPT:
 				msgdialog.destroy()
@@ -256,7 +256,7 @@
 				mountlist.append([remotemount])
 			self.mount_info_export.get_child().set_text(oldtext)
 		else:
-			msgdialog = Widgets.Widgets().error_Box("Invalid Host or IP", "You must specify a valid hostname or IP address to scan for exports")
+			msgdialog = Widgets.Widgets().error_Box(_("Invalid Host or IP", "You must specify a valid hostname or IP address to scan for exports"))
 			result = msgdialog.run()
 			if result == gtk.RESPONSE_ACCEPT:
 				msgdialog.destroy()

Modified: trunk/src/fe/gtk/Networking.py
===================================================================
--- trunk/src/fe/gtk/Networking.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/Networking.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -21,8 +21,8 @@
 	@license:   GPL
 	"""
 	# Attributes:
-	title="Networking Settings"
-	_helptext = """
+	title = _("Networking Settings")
+	_helptext = _("""
 <b><u>Networking</u></b>
 
 All detected interfaces should show up in the list, but you also have the option \
@@ -35,7 +35,7 @@
 
 Don't forget to set a hostname and domain name in the \
 "Hostname / Proxy Information / Other" tab!
-"""
+""")
 	
 	# Operations
 	def __init__(self, controller):
@@ -55,12 +55,12 @@
 		treedatasort = gtk.TreeModelSort(treedata)
 		treeview = gtk.TreeView(treedatasort)
 		#self.treeview.connect("cursor-changed", self.selection_changed)
-		columns.append(gtk.TreeViewColumn("Device    ", gtk.CellRendererText(), text=1))
-		columns.append(gtk.TreeViewColumn("IP Address", gtk.CellRendererText(), text=2))
-		columns.append(gtk.TreeViewColumn("Broadcast ", gtk.CellRendererText(), text=3))
-		columns.append(gtk.TreeViewColumn("Netmask      ", gtk.CellRendererText(), text=4))
-		columns.append(gtk.TreeViewColumn("DHCP Options ", gtk.CellRendererText(), text=5))
-		columns.append(gtk.TreeViewColumn("Gateway      ", gtk.CellRendererText(), text=6))
+		columns.append(gtk.TreeViewColumn(_("Device    "), gtk.CellRendererText(), text=1))
+		columns.append(gtk.TreeViewColumn(_("IP Address"), gtk.CellRendererText(), text=2))
+		columns.append(gtk.TreeViewColumn(_("Broadcast "), gtk.CellRendererText(), text=3))
+		columns.append(gtk.TreeViewColumn(_("Netmask      "), gtk.CellRendererText(), text=4))
+		columns.append(gtk.TreeViewColumn(_("DHCP Options "), gtk.CellRendererText(), text=5))
+		columns.append(gtk.TreeViewColumn(_("Gateway      "), gtk.CellRendererText(), text=6))
 		col_num = 0
 		for column in columns:
 				column.set_resizable(True)
@@ -83,11 +83,11 @@
 		ethernet_select_combo = gtk.combo_box_entry_new_text()
 		# pack it all into a box
 		ethernet_and_label = gtk.HBox(False,0)
-		label = gtk.Label(" _Interface: ")
+		label = gtk.Label(_(" _Interface: "))
 		label.set_use_underline(True)
-		save_button = gtk.Button("Save")
+		save_button = gtk.Button(_("Save"))
 		save_button.set_size_request(100,-1)
-		delete_button = gtk.Button("Delete")
+		delete_button = gtk.Button(_("Delete"))
 		delete_button.set_size_request(100,-1)
 		ethernet_and_label.pack_start(label, expand=False, fill=False, padding=5)
 		ethernet_and_label.pack_start(ethernet_select_combo, expand=False, fill=False, padding=5)
@@ -108,12 +108,12 @@
 		# create the combo that holds the different types of interfaces
 		ethernet_type_select_combo = gtk.combo_box_new_text()
 		ethernet_type_select_combo.append_text("DHCP")
-		ethernet_type_select_combo.append_text("Static")
+		ethernet_type_select_combo.append_text(_("Static"))
 		self.dhcp = 0
 		self.static = 1
 		# pack it into a box
 		ethernet_type_and_label = gtk.HBox(False,0)
-		label = gtk.Label(" _Configuration: ")
+		label = gtk.Label(_(" _Configuration: "))
 		label.set_use_underline(True)
 		ethernet_type_and_label.pack_start(label, expand=False, fill=False, padding=5)
 		ethernet_type_and_label.pack_start(ethernet_type_select_combo, expand=False, fill=False, padding=5)		
@@ -147,7 +147,7 @@
 		staticip_entry = gtk.Entry()
 		staticip_entry.set_max_length(15)
 		# pack it all into a box
-		label = gtk.Label(" _IP Address: ")
+		label = gtk.Label(_(" _IP Address: "))
 		label.set_size_request(50,-1)
 		label.set_use_underline(True)
 		label.set_alignment(0.0, 0.5)
@@ -159,7 +159,7 @@
 		broadcastip_entry = gtk.Entry()
 		broadcastip_entry.set_max_length(15)
 		# pack it all into a box
-		label = gtk.Label(" _Broadcast: ")
+		label = gtk.Label(_(" _Broadcast: "))
 		label.set_use_underline(True)
 		label.set_alignment(0.0, 0.5)
 		static_entry_table.attach(label,0,1,1,2)
@@ -169,7 +169,7 @@
 		netmaskip_entry = gtk.Entry()
 		netmaskip_entry.set_max_length(15)
 		# pack it all into a box
-		label = gtk.Label(" _Netmask: ")
+		label = gtk.Label(_(" _Netmask: "))
 		label.set_use_underline(True)
 		label.set_alignment(0.0, 0.5)
 		static_entry_table.attach(label,0,1,2,3)
@@ -179,7 +179,7 @@
 		gatewayip_entry = gtk.Entry()
 		gatewayip_entry.set_max_length(15)
 		# pack it all into a box
-		label = gtk.Label(" _Gateway: ")
+		label = gtk.Label(_(" _Gateway: "))
 		label.set_use_underline(True)
 		label.set_alignment(0.0, 0.5)
 		static_entry_table.attach(label,0,1,3,4)
@@ -190,7 +190,7 @@
 		static_entry_hbox.set_border_width(5)
 		static_entry_hbox.pack_start(static_entry_table, expand=False, fill=False, padding=5)
 		ethernet_static_frame.add(static_entry_hbox)
-		static_and_dhcp_notebook.append_page(ethernet_static_frame, gtk.Label("static"))
+		static_and_dhcp_notebook.append_page(ethernet_static_frame, gtk.Label(_("static")))
 		#------------------------------------------------
 		
 		# Create the DHCP page of the gtk.Notebook ( page 2 )
@@ -210,7 +210,7 @@
 		dhcp_options_entry = gtk.Entry()
 		dhcp_options_entry.set_max_length(15)
 		# pack it all into a box
-		label = gtk.Label(" _DHCP Options: ")
+		label = gtk.Label(_(" _DHCP Options: "))
 		label.set_size_request(50,-1)
 		label.set_use_underline(True)
 		label.set_alignment(0.0, 0.5)
@@ -236,7 +236,7 @@
 		# align it to the top left of the frame
 		wireless_frame.set_label_align(0.0, .5)
 		# create the checkbox that will determine if you have wireless or not
-		wireless_checkbox = gtk.CheckButton("Wireless")
+		wireless_checkbox = gtk.CheckButton(_("Wireless"))
 		# pack it all into a box
 		wireless_and_label = gtk.HBox(False,0)
 		wireless_and_label.pack_start(wireless_checkbox, expand=False, fill=False, padding=5)
@@ -250,7 +250,7 @@
 		essid_entry.set_max_length(30)
 		# pack it all into a box
 		essid_and_label = gtk.HBox(False,0)
-		label = gtk.Label(" _ESSID: ")
+		label = gtk.Label(_(" _ESSID: "))
 		label.set_use_underline(True)
 		label.set_alignment(0.0, 0.5)
 		label.set_size_request(50,-1)
@@ -280,12 +280,12 @@
 		#hardware_frame.set_border_width(5)
 		# align it to the top left of the frame
 		hardware_frame.set_label_align(0.0, .5)
-		hardware_frame.set_label("Hardware Information")
+		hardware_frame.set_label(_("Hardware Information"))
 		# create the textview to hold the hardware information
 		#textview = gtk.TextView(buffer=None)
 		#textview.set_editable(False)
 		#textbuffer = textview.get_buffer()
-		hardware_label = gtk.Label("No Device Selected")
+		hardware_label = gtk.Label(_("No Device Selected"))
 		hardware_label.set_size_request(250,75)
 		hardware_label.set_line_wrap(True)
 		#textbuffer.set_text(string)
@@ -322,7 +322,7 @@
 		hostname_entry.set_size_request(150,-1)
 		
 		hostname_and_label = gtk.HBox(False,0)
-		label = gtk.Label(" _Hostname: ")
+		label = gtk.Label(_(" _Hostname: "))
 		label.set_use_underline(True)
 		label.set_size_request(150,-1)
 		hostname_and_label.pack_start(label, expand=False, fill=False, padding=5)
@@ -334,7 +334,7 @@
 		dnsdomainname_entry.set_size_request(150,-1)
 		
 		dnsdomainname_and_label = gtk.HBox(False,0)
-		label = gtk.Label(" _DNS Domain Name: ")
+		label = gtk.Label(_(" _DNS Domain Name: "))
 		label.set_use_underline(True)
 		label.set_size_request(150,-1)
 		dnsdomainname_and_label.pack_start(label, expand=False, fill=False, padding=5)
@@ -364,8 +364,8 @@
 		#notebook.set_show_tabs(False)
 		#self.add_content(vert)
 		notebook.set_show_border(False)
-		notebook.append_page(vert, gtk.Label("Device Information"))
-		notebook.append_page(bottom_hbox, gtk.Label("Hostname / Proxy Information / Other"))
+		notebook.append_page(vert, gtk.Label(_("Device Information")))
+		notebook.append_page(bottom_hbox, gtk.Label(_("Hostname / Proxy Information / Other")))
 		self.add_content(notebook)
 		
 		# connect to widget events
@@ -526,7 +526,7 @@
 							data["netmask"], data["dhcp_options"],gateway])
 		
 		else:
-			msgdialog = Widgets().error_Box("No Ethernet Device","Please enter a device!")
+			msgdialog = Widgets().error_Box(_("No Ethernet Device"),_("Please enter a device!"))
 			result = msgdialog.run()
 			msgdialog.destroy()
 	
@@ -635,9 +635,9 @@
 			info = get.readlines()
 			if len(info) != 1:
 				if len(info) != 0:
-					info = "An error occurred retrieving hardware information"
+					info = _("An error occurred retrieving hardware information")
 				else:
-					info = "No information was found in dmesg about your device."
+					info = _("No information was found in dmesg about your device.")
 			else:
 				info = info[0]
 			
@@ -788,7 +788,7 @@
 					self.controller.install_profile.set_default_gateway(None,self.gateway[1], \
 										    {'interface':self.gateway[0]})
 				except:
-					msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in your gateway!")
+					msgdialog=Widgets().error_Box(_("Malformed IP","Malformed IP address in your gateway!"))
 					result = msgdialog.run()
 					msgdialog.destroy()
 					return
@@ -797,7 +797,7 @@
 
 		# If there are no interfaces configured, confirm this is what the user actually wants
 		if not interfaces:
-			msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="You have not configured any interfaces. Continue?")
+			msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("You have not configured any interfaces. Continue?"))
 			resp = msgdlg.run()
 			msgdlg.destroy()
 			if resp == gtk.RESPONSE_NO:
@@ -807,7 +807,7 @@
 		try:
 			self.controller.install_profile.set_network_interfaces(interfaces)
 		except:
-			msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in one of your interfaces!")
+			msgdialog=Widgets().error_Box(_("Malformed IP"),_("Malformed IP address in one of your interfaces!"))
 			result = msgdialog.run()
 			msgdialog.destroy()
 			return
@@ -819,7 +819,7 @@
 			self.controller.install_profile.set_hostname(None, hostname, None)
 			self.controller.install_profile.set_domainname(None, domainname, None)
 		elif( self.first_run == True):
-			msgdialog=Widgets().error_Box("Missing information","You didn't set your hostname and/or dnsdomainname!")
+			msgdialog=Widgets().error_Box(_("Missing information"),_("You didn't set your hostname and/or dnsdomainname!"))
 			result = msgdialog.run()
 			msgdialog.destroy()
 			return

Modified: trunk/src/fe/gtk/OtherSettings.py
===================================================================
--- trunk/src/fe/gtk/OtherSettings.py	2008-05-26 02:24:48 UTC (rev 1905)
+++ trunk/src/fe/gtk/OtherSettings.py	2008-05-26 02:30:37 UTC (rev 1906)
@@ -18,7 +18,7 @@
 	"""
 	# Attributes:
 	#title="Other Settings"
-	_helptext = """
+	_helptext = _("""
 <b><u>Other Settings</u></b>
 
 Display Manager:
@@ -48,7 +48,7 @@
 
 Default Editor:
 Pick one.  Nano is the default and recommended.
-"""
+""")
 	
 	# Operations
 	def __init__(self, controller):
@@ -65,7 +65,7 @@
 		
 		# create the CLOCK object
 		self.clock = self.Option("Clock")
-		self.clock.HelpText = "Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local."
+		self.clock.HelpText = _("Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.")
 		self.clock.Options = ["UTC","local"]
 		self.clock.Type = self.Option.OptionType.COMBO
 		clock_gtk = self.clock.Generate_GTK()
@@ -73,7 +73,7 @@
 		
 		# create the Windowkeys object
 		self.windowkeys = self.Option("Windowkeys")
-		self.windowkeys.HelpText = "Should we first load the 'windowkeys' console keymap?"
+		self.windowkeys.HelpText = _("Should we first load the 'windowkeys' console keymap?")
 		self.windowkeys.Options = ["Yes","No"]
 		self.windowkeys.Type = self.Option.OptionType.COMBO
 		clock_gtk = self.windowkeys.Generate_GTK()
@@ -81,7 +81,7 @@
 		
 		# create the Display Manager object
 		self.displaymanager = self.Option("Display Manager")
-		self.displaymanager.HelpText = "Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work)"
+		self.displaymanager.HelpText = _("Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work)")
 		self.displaymanager.Options = ["xdm","kdm","gdm"]
 		self.displaymanager.Type = self.Option.OptionType.COMBO_ENTRY
 		clock_gtk = self.displaymanager.Generate_GTK()
@@ -89,7 +89,7 @@
 		
 		# create the Default Editor object
 		self.editor = self.Option("Default Editor")
-		self.editor.HelpText = "Choose your default editor"
+		self.editor.HelpText = _("Choose your default editor")
 		self.editor.Options = ["/bin/nano","/usr/bin/vim","/usr/bin/emacs"]
 		self.editor.Type = self.Option.OptionType.COMBO
 		editor_gtk = self.editor.Generate_GTK()
@@ -97,7 +97,7 @@
 
 		# create the Keymap object
 		self.keymap = self.Option("Keymap")
-		self.keymap.HelpText = "Choose your desired keymap"
+		self.keymap.HelpText = _("Choose your desired keymap")
 		self.keymap.Options = [""] + GLIUtility.generate_keymap_list()
 		self.keymap.Type = self.Option.OptionType.COMBO
 		editor_gtk = self.keymap.Generate_GTK()
@@ -105,7 +105,7 @@
 
 		# create the Console Font object
 		self.font = self.Option("Console Font")
-		self.font.HelpText = "Choose your default console font"
+		self.font.HelpText = _("Choose your default console font")
 		self.font.Options = [""] + GLIUtility.generate_consolefont_list()
 		self.font.Type = self.Option.OptionType.COMBO
 		editor_gtk = self.font.Generate_GTK()
@@ -120,7 +120,7 @@
 		
 		# create the XSession object
 		self.xsession = self.Option("XSession")
-		self.xsession.HelpText = "Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession)"
+		self.xsession.HelpText = _("Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession)")
 		self.xsession.Options = ["Gnome","Xsession","fluxbox"]
 		self.xsession.Type = self.Option.OptionType.COMBO_ENTRY
 		editor_gtk = self.xsession.Generate_GTK()
@@ -128,7 +128,7 @@
 		
 		# create the Extended Keymaps object
 		self.extkeymap = self.Option("Extended Keymaps")
-		self.extkeymap.HelpText = "This sets the maps to load for extended keyboards. Most users will leave this as is."
+		self.extkeymap.HelpText = _("This sets the maps to load for extended keyboards. Most users will leave this as is.")
 		self.extkeymap.Type = self.Option.OptionType.TEXT
 		editor_gtk = self.extkeymap.Generate_GTK()
 		addme_to_vert.append(editor_gtk)
@@ -210,7 +210,7 @@
 		try:
 			self.controller.install_profile.set_etc_files(etc_files)
 		except:
-			msgbox=Widgets().error_Box("Error","An internal error occurred!")
+			msgbox=Widgets().error_Box(_("Error"),_("An internal error occurred!"))
 			msgbox.run()
 			msgbox.destroy()
 			

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-26  2:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26  2:30 [gentoo-commits] gli r1906 - trunk/src/fe/gtk Preston Cody (codeman)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox