Merge lp://staging/~schwuk/checkbox/bug-374666 into lp://staging/checkbox

Proposed by David Murphy
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~schwuk/checkbox/bug-374666
Merge into: lp://staging/checkbox
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~schwuk/checkbox/bug-374666
Reviewer Review Type Date Requested Status
Marc Tardif (community) Approve
Review via email: mp+6413@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Marc Tardif (cr3) wrote :

Approved and merged into trunk.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/POTFILES.in'
2--- po/POTFILES.in 2009-03-23 16:44:00 +0000
3+++ po/POTFILES.in 2009-05-11 09:00:44 +0000
4@@ -19,3 +19,5 @@
5 plugins/lock_prompt.py
6 plugins/report_prompt.py
7 plugins/user_interface.py
8+scripts/internet_test
9+scripts/keyboard_test
10
11=== modified file 'scripts/internet_test'
12--- scripts/internet_test 2009-02-11 20:53:02 +0000
13+++ scripts/internet_test 2009-05-11 09:00:44 +0000
14@@ -8,10 +8,12 @@
15 import logging
16 import socket
17 import struct
18+import gettext
19+
20+from gettext import gettext as _
21
22 from optparse import OptionParser
23
24-
25 class Route(object):
26 """Gets routing information from the system.
27 """
28@@ -92,6 +94,9 @@
29 return packets_received
30
31 def main(args):
32+
33+ gettext.textdomain("checkbox")
34+
35 default_count = 2
36 default_delay = 4
37
38@@ -118,11 +123,11 @@
39 received_packets = ping(host, options.count, options.deadline)
40
41 if received_packets == 0:
42- print "No Internet connection"
43+ print _("No Internet connection")
44 elif received_packets != options.count:
45- print "Connection established lost a packet"
46+ print _("Connection established lost a packet")
47 else:
48- print "Internet connection fully established"
49+ print _("Internet connection fully established")
50
51 return 0
52
53
54=== modified file 'scripts/keyboard_test'
55--- scripts/keyboard_test 2009-02-15 21:10:19 +0000
56+++ scripts/keyboard_test 2009-05-11 09:00:44 +0000
57@@ -2,6 +2,8 @@
58
59 import os
60 import sys
61+from gettext import gettext as _
62+import gettext
63
64 def cli_prompt():
65 import termios
66@@ -16,7 +18,7 @@
67 attributes[6][termios.VTIME] = 0
68 termios.tcsetattr(fileno, termios.TCSANOW, attributes)
69
70- sys.stdout.write("Enter text:\n")
71+ sys.stdout.write(_("Enter text:\n"))
72
73 input = ""
74 try:
75@@ -37,7 +39,7 @@
76 window = gtk.Window(gtk.WINDOW_TOPLEVEL)
77 window.set_size_request(200, 100)
78 window.set_resizable(False)
79- window.set_title("Type Text")
80+ window.set_title(_("Type Text"))
81 window.connect("delete_event", lambda w,e: gtk.main_quit())
82
83 vbox = gtk.VBox(False, 0)
84@@ -64,6 +66,9 @@
85 gtk.main()
86
87 def main(args):
88+
89+ gettext.textdomain("checkbox")
90+
91 if "DISPLAY" in os.environ:
92 gtk_prompt()
93 else:

Subscribers

People subscribed via source and target branches