Merge lp:~schwuk/checkbox/bug-347038 into lp:checkbox

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

Contains Gabor Kelemen's patches (with some tweaks) for bug 347038 and an updated translation template.

Revision history for this message
Marc Tardif (cr3) wrote :

A few problems which have been fixed in lp:~cr3/checkbox/bug-347038:

- The _ function was not being imported
- Exceptions were being internationalized, which is not necessary
- Signal strings were only being partially internationalized
- Added comment for hack around calling gettext.textdomain

The above branch will be submitted for approval.

review: Disapprove

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'backend/com.ubuntu.checkbox.policy.in'
2--- backend/com.ubuntu.checkbox.policy.in 2009-02-19 04:34:51 +0000
3+++ backend/com.ubuntu.checkbox.policy.in 2009-03-23 14:50:21 +0000
4@@ -15,8 +15,8 @@
5 <icon_name>checkbox</icon_name>
6
7 <action id="com.ubuntu.checkbox.test">
8- <description>Run system tests</description>
9- <message>System policy prevents running system tests</message>
10+ <_description>Run system tests</_description>
11+ <_message>System policy prevents running system tests</_message>
12 <defaults>
13 <allow_any>yes</allow_any>
14 <allow_inactive>yes</allow_inactive>
15@@ -25,8 +25,8 @@
16 </action>
17
18 <action id="com.ubuntu.checkbox.info">
19- <description>Get system information</description>
20- <message>System policy prevents getting system information</message>
21+ <_description>Get system information</_description>
22+ <_message>System policy prevents getting system information</_message>
23 <defaults>
24 <allow_any>yes</allow_any>
25 <allow_inactive>yes</allow_inactive>
26
27=== modified file 'checkbox/test.py'
28--- checkbox/test.py 2009-02-19 04:40:40 +0000
29+++ checkbox/test.py 2009-03-23 15:37:34 +0000
30@@ -80,7 +80,7 @@
31
32 def _set_status(self, status):
33 if status not in ALL_STATUS:
34- raise Exception, "Invalid status: %s" % status
35+ raise Exception, _("Invalid status: %s") % status
36
37 self._status = status
38
39@@ -110,18 +110,18 @@
40 data = result.stderr
41 elif exit_status == 127:
42 status = SKIP
43- data = "Command failed, skipping."
44+ data = _("Command failed, skipping.")
45 else:
46 status = FAIL
47 data = result.stderr
48 elif result.if_signaled:
49 status = SKIP
50 term_signal = result.term_signal
51- data = "Received terminate signal %s: %s" % \
52+ data = _("Received terminate signal %s: %s") % \
53 (signal_to_name(term_signal),
54 signal_to_description(term_signal))
55 else:
56- raise Exception, "Command not terminated: %s" \
57+ raise Exception, _("Command not terminated: %s") \
58 % self.get_command()
59
60 duration = result.duration
61
62=== modified file 'plugins/user_interface.py'
63--- plugins/user_interface.py 2009-02-19 04:40:40 +0000
64+++ plugins/user_interface.py 2009-03-23 14:42:22 +0000
65@@ -21,14 +21,18 @@
66 from checkbox.properties import Path, String
67 from checkbox.plugin import Plugin
68
69+import gettext
70+from gettext import gettext as _
71
72 class UserInterface(Plugin):
73
74 interface_module = String()
75 interface_class = String()
76
77+ gettext.textdomain("checkbox")
78+
79 # Title of the user interface
80- title = String(default="System Testing")
81+ title = String(default=_("System Testing"))
82
83 # Path where data files are stored.
84 data_path = Path(required=False)
85
86=== modified file 'po/POTFILES.in'
87--- po/POTFILES.in 2008-12-23 22:35:09 +0000
88+++ po/POTFILES.in 2009-03-23 15:37:34 +0000
89@@ -1,17 +1,21 @@
90 [encoding: UTF-8]
91+backend/com.ubuntu.checkbox.policy.in
92 gtk/checkbox-gtk.glade
93 gtk/checkbox-gtk.desktop.in
94 [type: gettext/rfc822deb] suites/manual.txt.in
95 checkbox/application.py
96+checkbox/test.py
97 checkbox_cli/cli_interface.py
98 checkbox_gtk/gtk_interface.py
99 checkbox/user_interface.py
100 plugins/shell_prompt.py
101 plugins/category_prompt.py
102 plugins/exchange_prompt.py
103+plugins/final_prompt.py
104 plugins/gather_prompt.py
105 plugins/intro_prompt.py
106 plugins/launchpad_exchange.py
107+plugins/lock_prompt.py
108 plugins/manual_prompt.py
109 plugins/report_prompt.py
110 plugins/user_interface.py
111
112=== modified file 'po/checkbox.pot'
113--- po/checkbox.pot 2009-03-17 19:23:33 +0000
114+++ po/checkbox.pot 2009-03-23 15:37:34 +0000
115@@ -8,7 +8,7 @@
116 msgstr ""
117 "Project-Id-Version: PACKAGE VERSION\n"
118 "Report-Msgid-Bugs-To: \n"
119-"POT-Creation-Date: 2009-03-17 14:23-0400\n"
120+"POT-Creation-Date: 2009-03-23 15:09+0000\n"
121 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
122 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
123 "Language-Team: LANGUAGE <LL@li.org>\n"
124@@ -16,6 +16,22 @@
125 "Content-Type: text/plain; charset=CHARSET\n"
126 "Content-Transfer-Encoding: 8bit\n"
127
128+#: ../backend/com.ubuntu.checkbox.policy.in.h:1
129+msgid "Get system information"
130+msgstr ""
131+
132+#: ../backend/com.ubuntu.checkbox.policy.in.h:2
133+msgid "Run system tests"
134+msgstr ""
135+
136+#: ../backend/com.ubuntu.checkbox.policy.in.h:3
137+msgid "System policy prevents getting system information"
138+msgstr ""
139+
140+#: ../backend/com.ubuntu.checkbox.policy.in.h:4
141+msgid "System policy prevents running system tests"
142+msgstr ""
143+
144 #: ../gtk/checkbox-gtk.glade.h:1 ../checkbox_cli/cli_interface.py:234
145 msgid "Further information:"
146 msgstr ""
147@@ -24,8 +40,10 @@
148 msgid "Ne_xt"
149 msgstr ""
150
151+#. Title of the user interface
152 #: ../gtk/checkbox-gtk.glade.h:3 ../gtk/checkbox-gtk.desktop.in.h:1
153 #: ../checkbox_cli/cli_interface.py:184 ../checkbox_cli/cli_interface.py:224
154+#: ../plugins/user_interface.py:35
155 msgid "System Testing"
156 msgstr ""
157
158@@ -168,6 +186,25 @@
159 msgid "Missing configuration file as argument.\n"
160 msgstr ""
161
162+#: ../checkbox/test.py:83
163+#, python-format
164+msgid "Invalid status: %s"
165+msgstr ""
166+
167+#: ../checkbox/test.py:113
168+msgid "Command failed, skipping."
169+msgstr ""
170+
171+#: ../checkbox/test.py:120
172+#, python-format
173+msgid "Received terminate signal %s: %s"
174+msgstr ""
175+
176+#: ../checkbox/test.py:124
177+#, python-format
178+msgid "Command not terminated: %s"
179+msgstr ""
180+
181 #: ../checkbox_cli/cli_interface.py:114
182 msgid "Press any key to continue..."
183 msgstr ""
184@@ -266,6 +303,10 @@
185 msgid "Exchanging information with the server..."
186 msgstr ""
187
188+#: ../plugins/final_prompt.py:31
189+msgid "Successfully sent information!"
190+msgstr ""
191+
192 #: ../plugins/gather_prompt.py:34
193 msgid "Gathering information from your system..."
194 msgstr ""
195@@ -309,6 +350,14 @@
196 msgid "Information not posted to Launchpad."
197 msgstr ""
198
199+#: ../plugins/lock_prompt.py:51
200+msgid "Another checkbox is running"
201+msgstr ""
202+
203+#: ../plugins/lock_prompt.py:52
204+msgid "There is another checkbox running. Please close it first."
205+msgstr ""
206+
207 #: ../plugins/report_prompt.py:34
208 msgid "Building report..."
209 msgstr ""

Subscribers

People subscribed via source and target branches