Gentoo Archives: gentoo-commits

From: "Preston Cody (codeman)" <codeman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gli r1906 - trunk/src/fe/gtk
Date: Mon, 26 May 2008 02:30:43
Message-Id: E1K0STu-0000oQ-F9@stork.gentoo.org
1 Author: codeman
2 Date: 2008-05-26 02:30:37 +0000 (Mon, 26 May 2008)
3 New Revision: 1906
4
5 Modified:
6 trunk/src/fe/gtk/InstallDone.py
7 trunk/src/fe/gtk/InstallFailed.py
8 trunk/src/fe/gtk/InstallMode.py
9 trunk/src/fe/gtk/LocalMounts.py
10 trunk/src/fe/gtk/NetworkMounts.py
11 trunk/src/fe/gtk/Networking.py
12 trunk/src/fe/gtk/OtherSettings.py
13 Log:
14
15 committing changes to gtkfe in stages.
16 adding internalization support written by
17 Jesus Rivero (Neurogeek)
18 basically sets everything in gettext.
19 these files are more trivial updates.
20
21
22 Modified: trunk/src/fe/gtk/InstallDone.py
23 ===================================================================
24 --- trunk/src/fe/gtk/InstallDone.py 2008-05-26 02:24:48 UTC (rev 1905)
25 +++ trunk/src/fe/gtk/InstallDone.py 2008-05-26 02:30:37 UTC (rev 1906)
26 @@ -8,12 +8,12 @@
27
28 class Panel(GLIScreen):
29
30 - _helptext = """
31 + _helptext = _("""
32 <b><u>Install Complete!</u></b>
33
34 Your install has finished. Click the Exit button, restart your computer, \
35 and enjoy!
36 -"""
37 +""")
38
39 def __init__(self, controller):
40 GLIScreen.__init__(self, controller)
41 @@ -24,7 +24,7 @@
42
43 hbox = gtk.HBox(False, 0)
44 label = gtk.Label()
45 - label_markup = '<b>Your install is complete!</b>'
46 + label_markup = _('<b>Your install is complete!</b>')
47 label.set_markup(label_markup)
48 label.set_line_wrap(True)
49 hbox.pack_start(label, expand=False, fill=False, padding=5)
50
51 Modified: trunk/src/fe/gtk/InstallFailed.py
52 ===================================================================
53 --- trunk/src/fe/gtk/InstallFailed.py 2008-05-26 02:24:48 UTC (rev 1905)
54 +++ trunk/src/fe/gtk/InstallFailed.py 2008-05-26 02:30:37 UTC (rev 1906)
55 @@ -8,14 +8,14 @@
56
57 class Panel(GLIScreen):
58
59 - _helptext = """
60 + _helptext = _("""
61 <b><u>Install Failed</u></b>
62
63 Your install has failed for one of numerous reasons. You can find the error in \
64 the logfile at /var/log/install.log.failed. Once you determine that the error was \
65 not caused by you, please file a bug at http://bugs.gentoo.org/ in the \
66 Gentoo Release Media product and the Installer component.
67 -"""
68 +""")
69
70 def __init__(self, controller):
71 GLIScreen.__init__(self, controller)
72 @@ -26,7 +26,7 @@
73
74 hbox = gtk.HBox(False, 0)
75 label = gtk.Label()
76 - label_markup = '<b>Your install has failed.</b>'
77 + label_markup = _('<b>Your install has failed.</b>')
78 label.set_markup(label_markup)
79 label.set_line_wrap(True)
80 hbox.pack_start(label, expand=False, fill=False, padding=5)
81
82 Modified: trunk/src/fe/gtk/InstallMode.py
83 ===================================================================
84 --- trunk/src/fe/gtk/InstallMode.py 2008-05-26 02:24:48 UTC (rev 1905)
85 +++ trunk/src/fe/gtk/InstallMode.py 2008-05-26 02:30:37 UTC (rev 1906)
86 @@ -5,12 +5,11 @@
87
88 import gtk
89 from GLIScreen import *
90 -from gettext import gettext as _
91
92 class Panel(GLIScreen):
93
94 title = _("Welcome to the Gentoo Linux Installer")
95 - _helptext = """
96 + _helptext = _("""
97 <b><u>Install Mode</u></b>
98
99 Welcome to the GTK+ front-end for the Gentoo Linux Installer. It is highly \
100 @@ -24,7 +23,7 @@
101 some flexibility, but it makes safe assumptions on some advanced options. The \
102 "Advanced" mode is for people who want to play around with more settings. If \
103 you break your install in this mode, don't come crying to us.
104 -"""
105 +""")
106
107 def __init__(self, controller):
108 GLIScreen.__init__(self, controller)
109 @@ -33,7 +32,7 @@
110
111 hbox = gtk.HBox(False)
112 label = gtk.Label()
113 - label.set_markup('<b>Choose your install mode</b>')
114 + label.set_markup(_('<b>Choose your install mode</b>'))
115 hbox.pack_start(label, expand=False, fill=False, padding=0)
116 vert.pack_start(hbox, expand=False, fill=False, padding=15)
117
118
119 Modified: trunk/src/fe/gtk/LocalMounts.py
120 ===================================================================
121 --- trunk/src/fe/gtk/LocalMounts.py 2008-05-26 02:24:48 UTC (rev 1905)
122 +++ trunk/src/fe/gtk/LocalMounts.py 2008-05-26 02:30:37 UTC (rev 1906)
123 @@ -14,11 +14,11 @@
124
125 class Panel(GLIScreen):
126
127 - title = "Local Mounts"
128 + title = _("Local Mounts")
129 columns = []
130 localmounts = []
131 active_entry = -1
132 - _helptext = """
133 + _helptext = _("""
134 <b><u>Local Mounts</u></b>
135
136 Here, you can add partitions and special devices to mount during (and after) \
137 @@ -32,7 +32,7 @@
138 To edit a mount that you've already added to the list list, select it by \
139 clicking on it. Edit any of the fields below and click the 'Update' button. You \
140 can remove it from the list by clicking the 'Delete' button.
141 -"""
142 +""")
143
144 def __init__(self, controller):
145 GLIScreen.__init__(self, controller)
146 @@ -43,10 +43,10 @@
147 self.treedatasort = gtk.TreeModelSort(self.treedata)
148 self.treeview = gtk.TreeView(self.treedatasort)
149 self.treeview.connect("cursor-changed", self.selection_changed)
150 - self.columns.append(gtk.TreeViewColumn("Device", gtk.CellRendererText(), text=1))
151 - self.columns.append(gtk.TreeViewColumn("Type", gtk.CellRendererText(), text=2))
152 - self.columns.append(gtk.TreeViewColumn("Mount Point", gtk.CellRendererText(), text=3))
153 - self.columns.append(gtk.TreeViewColumn("Mount Options", gtk.CellRendererText(), text=4))
154 + self.columns.append(gtk.TreeViewColumn(_("Device"), gtk.CellRendererText(), text=1))
155 + self.columns.append(gtk.TreeViewColumn(_("Type"), gtk.CellRendererText(), text=2))
156 + self.columns.append(gtk.TreeViewColumn(_("Mount Point"), gtk.CellRendererText(), text=3))
157 + self.columns.append(gtk.TreeViewColumn(_("Mount Options"), gtk.CellRendererText(), text=4))
158 col_num = 0
159 for column in self.columns:
160 column.set_resizable(True)
161 @@ -64,7 +64,7 @@
162 mount_info_table = gtk.Table(5, 3, False)
163 mount_info_table.set_col_spacings(10)
164 mount_info_table.set_row_spacings(6)
165 - mount_info_device_label = gtk.Label("Device:")
166 + mount_info_device_label = gtk.Label(_("Device:"))
167 mount_info_device_label.set_alignment(0.0, 0.5)
168 mount_info_table.attach(mount_info_device_label, 0, 1, 0, 1)
169 self.mount_info_device = gtk.ComboBoxEntry(gtk.ListStore(gobject.TYPE_STRING))
170 @@ -72,19 +72,19 @@
171 if not self.mount_info_device.get_text_column() == 0:
172 self.mount_info_device.set_text_column(0)
173 mount_info_table.attach(self.mount_info_device, 1, 2, 0, 1)
174 - mount_info_type_label = gtk.Label("Type:")
175 + mount_info_type_label = gtk.Label(_("Type:"))
176 mount_info_type_label.set_alignment(0.0, 0.5)
177 mount_info_table.attach(mount_info_type_label, 0, 1, 1, 2)
178 self.mount_info_type = gtk.Entry()
179 self.mount_info_type.set_width_chars(20)
180 mount_info_table.attach(self.mount_info_type, 1, 2, 1, 2)
181 - mount_info_mountpoint_label = gtk.Label("Mount point:")
182 + mount_info_mountpoint_label = gtk.Label(_("Mount point:"))
183 mount_info_mountpoint_label.set_alignment(0.0, 0.5)
184 mount_info_table.attach(mount_info_mountpoint_label, 0, 1, 2, 3)
185 self.mount_info_mountpoint = gtk.Entry()
186 self.mount_info_mountpoint.set_width_chars(30)
187 mount_info_table.attach(self.mount_info_mountpoint, 1, 2, 2, 3)
188 - mount_info_mountopts_label = gtk.Label("Mount options:")
189 + mount_info_mountopts_label = gtk.Label(_("Mount options:"))
190 mount_info_mountopts_label.set_alignment(0.0, 0.5)
191 mount_info_table.attach(mount_info_mountopts_label, 0, 1, 3, 4)
192 self.mount_info_mountopts = gtk.Entry()
193 @@ -94,14 +94,14 @@
194 vert.pack_start(self.mount_info_box, expand=False, fill=False, padding=10)
195
196 mount_button_box = gtk.HBox(False, 0)
197 - mount_button_add = gtk.Button(" _Add ")
198 + mount_button_add = gtk.Button(_(" _Add "))
199 mount_button_add.connect("clicked", self.new_mount)
200 mount_button_box.pack_start(mount_button_add, expand=False, fill=False, padding=10)
201 - self.mount_button_update = gtk.Button(" _Update ")
202 + self.mount_button_update = gtk.Button(_(" _Update "))
203 self.mount_button_update.connect("clicked", self.update_mount)
204 self.mount_button_update.set_sensitive(False)
205 mount_button_box.pack_start(self.mount_button_update, expand=False, fill=False, padding=10)
206 - self.mount_button_delete = gtk.Button(" _Delete ")
207 + self.mount_button_delete = gtk.Button(_(" _Delete "))
208 self.mount_button_delete.connect("clicked", self.delete_mount)
209 self.mount_button_delete.set_sensitive(False)
210 mount_button_box.pack_start(self.mount_button_delete, expand=False, fill=False, padding=10)
211 @@ -172,13 +172,13 @@
212
213 def update_mount(self, button):
214 if self.mount_info_device.get_child().get_text().strip() == "":
215 - msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a value for the device field")
216 + msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry"), _("You must enter a value for the device field"))
217 result = msgdialog.run()
218 if result == gtk.RESPONSE_ACCEPT:
219 msgdialog.destroy()
220 return
221 if not self.mount_info_type.get_text().strip() in ("swap", "linux-swap") and self.mount_info_mountpoint.get_text().strip() == "":
222 - msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a mountpoint")
223 + msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry"), _("You must enter a mountpoint"))
224 result = msgdialog.run()
225 if result == gtk.RESPONSE_ACCEPT:
226 msgdialog.destroy()
227
228 Modified: trunk/src/fe/gtk/NetworkMounts.py
229 ===================================================================
230 --- trunk/src/fe/gtk/NetworkMounts.py 2008-05-26 02:24:48 UTC (rev 1905)
231 +++ trunk/src/fe/gtk/NetworkMounts.py 2008-05-26 02:30:37 UTC (rev 1906)
232 @@ -13,12 +13,12 @@
233
234 class Panel(GLIScreen):
235
236 - title = "Network Mounts"
237 + title = _("Network Mounts")
238 columns = []
239 netmounts = []
240 active_entry = -1
241 mount_types = ["NFS"]
242 - _helptext = """
243 + _helptext = _("""
244 <b><u>Network Mounts</u></b>
245
246 Here, you can specify network shares to mount during (and after) the install. \
247 @@ -37,7 +37,7 @@
248 To edit an existing mount, select it in the list above. Edit any fields below \
249 and then click the 'Update' button. You can remove it from the list by clicking \
250 the 'Delete' button.
251 -"""
252 +""")
253
254 def __init__(self, controller):
255 GLIScreen.__init__(self, controller)
256 @@ -50,11 +50,11 @@
257 self.treedatasort = gtk.TreeModelSort(self.treedata)
258 self.treeview = gtk.TreeView(self.treedatasort)
259 self.treeview.connect("cursor-changed", self.selection_changed)
260 - self.columns.append(gtk.TreeViewColumn("Host/IP", gtk.CellRendererText(), text=1))
261 - self.columns.append(gtk.TreeViewColumn("Export/Share", gtk.CellRendererText(), text=2))
262 - self.columns.append(gtk.TreeViewColumn("Type", gtk.CellRendererText(), text=3))
263 - self.columns.append(gtk.TreeViewColumn("Mount Point", gtk.CellRendererText(), text=4))
264 - self.columns.append(gtk.TreeViewColumn("Mount Options", gtk.CellRendererText(), text=5))
265 + self.columns.append(gtk.TreeViewColumn(_("Host/IP"), gtk.CellRendererText(), text=1))
266 + self.columns.append(gtk.TreeViewColumn(_("Export/Share"), gtk.CellRendererText(), text=2))
267 + self.columns.append(gtk.TreeViewColumn(_("Type"), gtk.CellRendererText(), text=3))
268 + self.columns.append(gtk.TreeViewColumn(_("Mount Point"), gtk.CellRendererText(), text=4))
269 + self.columns.append(gtk.TreeViewColumn(_("Mount Options"), gtk.CellRendererText(), text=5))
270 col_num = 0
271 for column in self.columns:
272 column.set_resizable(True)
273 @@ -72,7 +72,7 @@
274 mount_info_table = gtk.Table(5, 3, False)
275 mount_info_table.set_col_spacings(10)
276 mount_info_table.set_row_spacings(6)
277 - mount_info_type_label = gtk.Label("Type:")
278 + mount_info_type_label = gtk.Label(_("Type:"))
279 mount_info_type_label.set_alignment(0.0, 0.5)
280 mount_info_table.attach(mount_info_type_label, 0, 1, 0, 1)
281 self.mount_info_type = gtk.combo_box_new_text()
282 @@ -80,13 +80,13 @@
283 self.mount_info_type.append_text(mount_type)
284 self.mount_info_type.set_active(0)
285 mount_info_table.attach(self.mount_info_type, 1, 2, 0, 1)
286 - mount_info_host_label = gtk.Label("Host/IP:")
287 + mount_info_host_label = gtk.Label(_("Host/IP:"))
288 mount_info_host_label.set_alignment(0.0, 0.5)
289 mount_info_table.attach(mount_info_host_label, 0, 1, 1, 2)
290 self.mount_info_host = gtk.Entry()
291 self.mount_info_host.set_width_chars(25)
292 mount_info_table.attach(self.mount_info_host, 1, 2, 1, 2)
293 - mount_info_export_label = gtk.Label("Export/Share:")
294 + mount_info_export_label = gtk.Label(_("Export/Share:"))
295 mount_info_export_label.set_alignment(0.0, 0.5)
296 mount_info_table.attach(mount_info_export_label, 0, 1, 2, 3)
297 self.mount_info_export = gtk.ComboBoxEntry(gtk.ListStore(gobject.TYPE_STRING))
298 @@ -99,13 +99,13 @@
299 self.mount_info_export_refresh.add(mount_info_export_refresh_img)
300 self.mount_info_export_refresh.connect("clicked", self.populate_exports)
301 mount_info_table.attach(self.mount_info_export_refresh, 2, 3, 2, 3)
302 - mount_info_mountpoint_label = gtk.Label("Mount point:")
303 + mount_info_mountpoint_label = gtk.Label(_("Mount point:"))
304 mount_info_mountpoint_label.set_alignment(0.0, 0.5)
305 mount_info_table.attach(mount_info_mountpoint_label, 0, 1, 3, 4)
306 self.mount_info_mountpoint = gtk.Entry()
307 self.mount_info_mountpoint.set_width_chars(30)
308 mount_info_table.attach(self.mount_info_mountpoint, 1, 2, 3, 4)
309 - mount_info_mountopts_label = gtk.Label("Mount options:")
310 + mount_info_mountopts_label = gtk.Label(_("Mount options:"))
311 mount_info_mountopts_label.set_alignment(0.0, 0.5)
312 mount_info_table.attach(mount_info_mountopts_label, 0, 1, 4, 5)
313 self.mount_info_mountopts = gtk.Entry()
314 @@ -115,18 +115,18 @@
315 vert.pack_start(self.mount_info_box, expand=False, fill=False, padding=10)
316
317 mount_button_box = gtk.HBox(False, 0)
318 - mount_button_new = gtk.Button(" _New ")
319 + mount_button_new = gtk.Button(_(" _New "))
320 mount_button_new.connect("clicked", self.new_mount)
321 mount_button_box.pack_start(mount_button_new, expand=False, fill=False, padding=10)
322 - self.mount_button_update = gtk.Button(" _Update ")
323 + self.mount_button_update = gtk.Button(_(" _Update "))
324 self.mount_button_update.connect("clicked", self.update_mount)
325 self.mount_button_update.set_sensitive(False)
326 mount_button_box.pack_start(self.mount_button_update, expand=False, fill=False, padding=10)
327 - self.mount_button_delete = gtk.Button(" _Delete ")
328 + self.mount_button_delete = gtk.Button(_(" _Delete "))
329 self.mount_button_delete.connect("clicked", self.delete_mount)
330 self.mount_button_delete.set_sensitive(False)
331 mount_button_box.pack_start(self.mount_button_delete, expand=False, fill=False, padding=10)
332 - self.mount_button_populate = gtk.Button(" _Populate Exports ")
333 + self.mount_button_populate = gtk.Button(_(" _Populate Exports "))
334 self.mount_button_populate.connect("clicked", self.populate_exports)
335 self.mount_button_populate.set_sensitive(False)
336 mount_button_box.pack_start(self.mount_button_populate, expand=False, fill=False, padding=10)
337 @@ -200,19 +200,19 @@
338
339 def update_mount(self, button, data=None):
340 if not GLIUtility.is_ip(self.mount_info_host.get_text()) and not GLIUtility.is_hostname(self.mount_info_host.get_text()):
341 - msgdialog = Widgets.Widgets().error_Box("Invalid Host or IP", "You must specify a valid hostname or IP address")
342 + msgdialog = Widgets.Widgets().error_Box(_("Invalid Host or IP", "You must specify a valid hostname or IP address"))
343 result = msgdialog.run()
344 if result == gtk.RESPONSE_ACCEPT:
345 msgdialog.destroy()
346 return
347 if self.mount_info_export.get_child().get_text() == "":
348 - msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a value for the export field")
349 + msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry", "You must enter a value for the export field"))
350 result = msgdialog.run()
351 if result == gtk.RESPONSE_ACCEPT:
352 msgdialog.destroy()
353 return
354 if self.mount_info_mountpoint.get_text() == "":
355 - msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a mountpoint")
356 + msgdialog = Widgets.Widgets().error_Box(_("Invalid Entry", "You must enter a mountpoint"))
357 result = msgdialog.run()
358 if result == gtk.RESPONSE_ACCEPT:
359 msgdialog.destroy()
360 @@ -256,7 +256,7 @@
361 mountlist.append([remotemount])
362 self.mount_info_export.get_child().set_text(oldtext)
363 else:
364 - msgdialog = Widgets.Widgets().error_Box("Invalid Host or IP", "You must specify a valid hostname or IP address to scan for exports")
365 + msgdialog = Widgets.Widgets().error_Box(_("Invalid Host or IP", "You must specify a valid hostname or IP address to scan for exports"))
366 result = msgdialog.run()
367 if result == gtk.RESPONSE_ACCEPT:
368 msgdialog.destroy()
369
370 Modified: trunk/src/fe/gtk/Networking.py
371 ===================================================================
372 --- trunk/src/fe/gtk/Networking.py 2008-05-26 02:24:48 UTC (rev 1905)
373 +++ trunk/src/fe/gtk/Networking.py 2008-05-26 02:30:37 UTC (rev 1906)
374 @@ -21,8 +21,8 @@
375 @license: GPL
376 """
377 # Attributes:
378 - title="Networking Settings"
379 - _helptext = """
380 + title = _("Networking Settings")
381 + _helptext = _("""
382 <b><u>Networking</u></b>
383
384 All detected interfaces should show up in the list, but you also have the option \
385 @@ -35,7 +35,7 @@
386
387 Don't forget to set a hostname and domain name in the \
388 "Hostname / Proxy Information / Other" tab!
389 -"""
390 +""")
391
392 # Operations
393 def __init__(self, controller):
394 @@ -55,12 +55,12 @@
395 treedatasort = gtk.TreeModelSort(treedata)
396 treeview = gtk.TreeView(treedatasort)
397 #self.treeview.connect("cursor-changed", self.selection_changed)
398 - columns.append(gtk.TreeViewColumn("Device ", gtk.CellRendererText(), text=1))
399 - columns.append(gtk.TreeViewColumn("IP Address", gtk.CellRendererText(), text=2))
400 - columns.append(gtk.TreeViewColumn("Broadcast ", gtk.CellRendererText(), text=3))
401 - columns.append(gtk.TreeViewColumn("Netmask ", gtk.CellRendererText(), text=4))
402 - columns.append(gtk.TreeViewColumn("DHCP Options ", gtk.CellRendererText(), text=5))
403 - columns.append(gtk.TreeViewColumn("Gateway ", gtk.CellRendererText(), text=6))
404 + columns.append(gtk.TreeViewColumn(_("Device "), gtk.CellRendererText(), text=1))
405 + columns.append(gtk.TreeViewColumn(_("IP Address"), gtk.CellRendererText(), text=2))
406 + columns.append(gtk.TreeViewColumn(_("Broadcast "), gtk.CellRendererText(), text=3))
407 + columns.append(gtk.TreeViewColumn(_("Netmask "), gtk.CellRendererText(), text=4))
408 + columns.append(gtk.TreeViewColumn(_("DHCP Options "), gtk.CellRendererText(), text=5))
409 + columns.append(gtk.TreeViewColumn(_("Gateway "), gtk.CellRendererText(), text=6))
410 col_num = 0
411 for column in columns:
412 column.set_resizable(True)
413 @@ -83,11 +83,11 @@
414 ethernet_select_combo = gtk.combo_box_entry_new_text()
415 # pack it all into a box
416 ethernet_and_label = gtk.HBox(False,0)
417 - label = gtk.Label(" _Interface: ")
418 + label = gtk.Label(_(" _Interface: "))
419 label.set_use_underline(True)
420 - save_button = gtk.Button("Save")
421 + save_button = gtk.Button(_("Save"))
422 save_button.set_size_request(100,-1)
423 - delete_button = gtk.Button("Delete")
424 + delete_button = gtk.Button(_("Delete"))
425 delete_button.set_size_request(100,-1)
426 ethernet_and_label.pack_start(label, expand=False, fill=False, padding=5)
427 ethernet_and_label.pack_start(ethernet_select_combo, expand=False, fill=False, padding=5)
428 @@ -108,12 +108,12 @@
429 # create the combo that holds the different types of interfaces
430 ethernet_type_select_combo = gtk.combo_box_new_text()
431 ethernet_type_select_combo.append_text("DHCP")
432 - ethernet_type_select_combo.append_text("Static")
433 + ethernet_type_select_combo.append_text(_("Static"))
434 self.dhcp = 0
435 self.static = 1
436 # pack it into a box
437 ethernet_type_and_label = gtk.HBox(False,0)
438 - label = gtk.Label(" _Configuration: ")
439 + label = gtk.Label(_(" _Configuration: "))
440 label.set_use_underline(True)
441 ethernet_type_and_label.pack_start(label, expand=False, fill=False, padding=5)
442 ethernet_type_and_label.pack_start(ethernet_type_select_combo, expand=False, fill=False, padding=5)
443 @@ -147,7 +147,7 @@
444 staticip_entry = gtk.Entry()
445 staticip_entry.set_max_length(15)
446 # pack it all into a box
447 - label = gtk.Label(" _IP Address: ")
448 + label = gtk.Label(_(" _IP Address: "))
449 label.set_size_request(50,-1)
450 label.set_use_underline(True)
451 label.set_alignment(0.0, 0.5)
452 @@ -159,7 +159,7 @@
453 broadcastip_entry = gtk.Entry()
454 broadcastip_entry.set_max_length(15)
455 # pack it all into a box
456 - label = gtk.Label(" _Broadcast: ")
457 + label = gtk.Label(_(" _Broadcast: "))
458 label.set_use_underline(True)
459 label.set_alignment(0.0, 0.5)
460 static_entry_table.attach(label,0,1,1,2)
461 @@ -169,7 +169,7 @@
462 netmaskip_entry = gtk.Entry()
463 netmaskip_entry.set_max_length(15)
464 # pack it all into a box
465 - label = gtk.Label(" _Netmask: ")
466 + label = gtk.Label(_(" _Netmask: "))
467 label.set_use_underline(True)
468 label.set_alignment(0.0, 0.5)
469 static_entry_table.attach(label,0,1,2,3)
470 @@ -179,7 +179,7 @@
471 gatewayip_entry = gtk.Entry()
472 gatewayip_entry.set_max_length(15)
473 # pack it all into a box
474 - label = gtk.Label(" _Gateway: ")
475 + label = gtk.Label(_(" _Gateway: "))
476 label.set_use_underline(True)
477 label.set_alignment(0.0, 0.5)
478 static_entry_table.attach(label,0,1,3,4)
479 @@ -190,7 +190,7 @@
480 static_entry_hbox.set_border_width(5)
481 static_entry_hbox.pack_start(static_entry_table, expand=False, fill=False, padding=5)
482 ethernet_static_frame.add(static_entry_hbox)
483 - static_and_dhcp_notebook.append_page(ethernet_static_frame, gtk.Label("static"))
484 + static_and_dhcp_notebook.append_page(ethernet_static_frame, gtk.Label(_("static")))
485 #------------------------------------------------
486
487 # Create the DHCP page of the gtk.Notebook ( page 2 )
488 @@ -210,7 +210,7 @@
489 dhcp_options_entry = gtk.Entry()
490 dhcp_options_entry.set_max_length(15)
491 # pack it all into a box
492 - label = gtk.Label(" _DHCP Options: ")
493 + label = gtk.Label(_(" _DHCP Options: "))
494 label.set_size_request(50,-1)
495 label.set_use_underline(True)
496 label.set_alignment(0.0, 0.5)
497 @@ -236,7 +236,7 @@
498 # align it to the top left of the frame
499 wireless_frame.set_label_align(0.0, .5)
500 # create the checkbox that will determine if you have wireless or not
501 - wireless_checkbox = gtk.CheckButton("Wireless")
502 + wireless_checkbox = gtk.CheckButton(_("Wireless"))
503 # pack it all into a box
504 wireless_and_label = gtk.HBox(False,0)
505 wireless_and_label.pack_start(wireless_checkbox, expand=False, fill=False, padding=5)
506 @@ -250,7 +250,7 @@
507 essid_entry.set_max_length(30)
508 # pack it all into a box
509 essid_and_label = gtk.HBox(False,0)
510 - label = gtk.Label(" _ESSID: ")
511 + label = gtk.Label(_(" _ESSID: "))
512 label.set_use_underline(True)
513 label.set_alignment(0.0, 0.5)
514 label.set_size_request(50,-1)
515 @@ -280,12 +280,12 @@
516 #hardware_frame.set_border_width(5)
517 # align it to the top left of the frame
518 hardware_frame.set_label_align(0.0, .5)
519 - hardware_frame.set_label("Hardware Information")
520 + hardware_frame.set_label(_("Hardware Information"))
521 # create the textview to hold the hardware information
522 #textview = gtk.TextView(buffer=None)
523 #textview.set_editable(False)
524 #textbuffer = textview.get_buffer()
525 - hardware_label = gtk.Label("No Device Selected")
526 + hardware_label = gtk.Label(_("No Device Selected"))
527 hardware_label.set_size_request(250,75)
528 hardware_label.set_line_wrap(True)
529 #textbuffer.set_text(string)
530 @@ -322,7 +322,7 @@
531 hostname_entry.set_size_request(150,-1)
532
533 hostname_and_label = gtk.HBox(False,0)
534 - label = gtk.Label(" _Hostname: ")
535 + label = gtk.Label(_(" _Hostname: "))
536 label.set_use_underline(True)
537 label.set_size_request(150,-1)
538 hostname_and_label.pack_start(label, expand=False, fill=False, padding=5)
539 @@ -334,7 +334,7 @@
540 dnsdomainname_entry.set_size_request(150,-1)
541
542 dnsdomainname_and_label = gtk.HBox(False,0)
543 - label = gtk.Label(" _DNS Domain Name: ")
544 + label = gtk.Label(_(" _DNS Domain Name: "))
545 label.set_use_underline(True)
546 label.set_size_request(150,-1)
547 dnsdomainname_and_label.pack_start(label, expand=False, fill=False, padding=5)
548 @@ -364,8 +364,8 @@
549 #notebook.set_show_tabs(False)
550 #self.add_content(vert)
551 notebook.set_show_border(False)
552 - notebook.append_page(vert, gtk.Label("Device Information"))
553 - notebook.append_page(bottom_hbox, gtk.Label("Hostname / Proxy Information / Other"))
554 + notebook.append_page(vert, gtk.Label(_("Device Information")))
555 + notebook.append_page(bottom_hbox, gtk.Label(_("Hostname / Proxy Information / Other")))
556 self.add_content(notebook)
557
558 # connect to widget events
559 @@ -526,7 +526,7 @@
560 data["netmask"], data["dhcp_options"],gateway])
561
562 else:
563 - msgdialog = Widgets().error_Box("No Ethernet Device","Please enter a device!")
564 + msgdialog = Widgets().error_Box(_("No Ethernet Device"),_("Please enter a device!"))
565 result = msgdialog.run()
566 msgdialog.destroy()
567
568 @@ -635,9 +635,9 @@
569 info = get.readlines()
570 if len(info) != 1:
571 if len(info) != 0:
572 - info = "An error occurred retrieving hardware information"
573 + info = _("An error occurred retrieving hardware information")
574 else:
575 - info = "No information was found in dmesg about your device."
576 + info = _("No information was found in dmesg about your device.")
577 else:
578 info = info[0]
579
580 @@ -788,7 +788,7 @@
581 self.controller.install_profile.set_default_gateway(None,self.gateway[1], \
582 {'interface':self.gateway[0]})
583 except:
584 - msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in your gateway!")
585 + msgdialog=Widgets().error_Box(_("Malformed IP","Malformed IP address in your gateway!"))
586 result = msgdialog.run()
587 msgdialog.destroy()
588 return
589 @@ -797,7 +797,7 @@
590
591 # If there are no interfaces configured, confirm this is what the user actually wants
592 if not interfaces:
593 - 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?")
594 + 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?"))
595 resp = msgdlg.run()
596 msgdlg.destroy()
597 if resp == gtk.RESPONSE_NO:
598 @@ -807,7 +807,7 @@
599 try:
600 self.controller.install_profile.set_network_interfaces(interfaces)
601 except:
602 - msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in one of your interfaces!")
603 + msgdialog=Widgets().error_Box(_("Malformed IP"),_("Malformed IP address in one of your interfaces!"))
604 result = msgdialog.run()
605 msgdialog.destroy()
606 return
607 @@ -819,7 +819,7 @@
608 self.controller.install_profile.set_hostname(None, hostname, None)
609 self.controller.install_profile.set_domainname(None, domainname, None)
610 elif( self.first_run == True):
611 - msgdialog=Widgets().error_Box("Missing information","You didn't set your hostname and/or dnsdomainname!")
612 + msgdialog=Widgets().error_Box(_("Missing information"),_("You didn't set your hostname and/or dnsdomainname!"))
613 result = msgdialog.run()
614 msgdialog.destroy()
615 return
616
617 Modified: trunk/src/fe/gtk/OtherSettings.py
618 ===================================================================
619 --- trunk/src/fe/gtk/OtherSettings.py 2008-05-26 02:24:48 UTC (rev 1905)
620 +++ trunk/src/fe/gtk/OtherSettings.py 2008-05-26 02:30:37 UTC (rev 1906)
621 @@ -18,7 +18,7 @@
622 """
623 # Attributes:
624 #title="Other Settings"
625 - _helptext = """
626 + _helptext = _("""
627 <b><u>Other Settings</u></b>
628
629 Display Manager:
630 @@ -48,7 +48,7 @@
631
632 Default Editor:
633 Pick one. Nano is the default and recommended.
634 -"""
635 +""")
636
637 # Operations
638 def __init__(self, controller):
639 @@ -65,7 +65,7 @@
640
641 # create the CLOCK object
642 self.clock = self.Option("Clock")
643 - self.clock.HelpText = "Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local."
644 + self.clock.HelpText = _("Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.")
645 self.clock.Options = ["UTC","local"]
646 self.clock.Type = self.Option.OptionType.COMBO
647 clock_gtk = self.clock.Generate_GTK()
648 @@ -73,7 +73,7 @@
649
650 # create the Windowkeys object
651 self.windowkeys = self.Option("Windowkeys")
652 - self.windowkeys.HelpText = "Should we first load the 'windowkeys' console keymap?"
653 + self.windowkeys.HelpText = _("Should we first load the 'windowkeys' console keymap?")
654 self.windowkeys.Options = ["Yes","No"]
655 self.windowkeys.Type = self.Option.OptionType.COMBO
656 clock_gtk = self.windowkeys.Generate_GTK()
657 @@ -81,7 +81,7 @@
658
659 # create the Display Manager object
660 self.displaymanager = self.Option("Display Manager")
661 - self.displaymanager.HelpText = "Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work)"
662 + self.displaymanager.HelpText = _("Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work)")
663 self.displaymanager.Options = ["xdm","kdm","gdm"]
664 self.displaymanager.Type = self.Option.OptionType.COMBO_ENTRY
665 clock_gtk = self.displaymanager.Generate_GTK()
666 @@ -89,7 +89,7 @@
667
668 # create the Default Editor object
669 self.editor = self.Option("Default Editor")
670 - self.editor.HelpText = "Choose your default editor"
671 + self.editor.HelpText = _("Choose your default editor")
672 self.editor.Options = ["/bin/nano","/usr/bin/vim","/usr/bin/emacs"]
673 self.editor.Type = self.Option.OptionType.COMBO
674 editor_gtk = self.editor.Generate_GTK()
675 @@ -97,7 +97,7 @@
676
677 # create the Keymap object
678 self.keymap = self.Option("Keymap")
679 - self.keymap.HelpText = "Choose your desired keymap"
680 + self.keymap.HelpText = _("Choose your desired keymap")
681 self.keymap.Options = [""] + GLIUtility.generate_keymap_list()
682 self.keymap.Type = self.Option.OptionType.COMBO
683 editor_gtk = self.keymap.Generate_GTK()
684 @@ -105,7 +105,7 @@
685
686 # create the Console Font object
687 self.font = self.Option("Console Font")
688 - self.font.HelpText = "Choose your default console font"
689 + self.font.HelpText = _("Choose your default console font")
690 self.font.Options = [""] + GLIUtility.generate_consolefont_list()
691 self.font.Type = self.Option.OptionType.COMBO
692 editor_gtk = self.font.Generate_GTK()
693 @@ -120,7 +120,7 @@
694
695 # create the XSession object
696 self.xsession = self.Option("XSession")
697 - 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)"
698 + 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)")
699 self.xsession.Options = ["Gnome","Xsession","fluxbox"]
700 self.xsession.Type = self.Option.OptionType.COMBO_ENTRY
701 editor_gtk = self.xsession.Generate_GTK()
702 @@ -128,7 +128,7 @@
703
704 # create the Extended Keymaps object
705 self.extkeymap = self.Option("Extended Keymaps")
706 - self.extkeymap.HelpText = "This sets the maps to load for extended keyboards. Most users will leave this as is."
707 + self.extkeymap.HelpText = _("This sets the maps to load for extended keyboards. Most users will leave this as is.")
708 self.extkeymap.Type = self.Option.OptionType.TEXT
709 editor_gtk = self.extkeymap.Generate_GTK()
710 addme_to_vert.append(editor_gtk)
711 @@ -210,7 +210,7 @@
712 try:
713 self.controller.install_profile.set_etc_files(etc_files)
714 except:
715 - msgbox=Widgets().error_Box("Error","An internal error occurred!")
716 + msgbox=Widgets().error_Box(_("Error"),_("An internal error occurred!"))
717 msgbox.run()
718 msgbox.destroy()
719
720
721 --
722 gentoo-commits@l.g.o mailing list