Merge lp://qastaging/~deejay1/acire/i18n_and_pl_translation into lp://qastaging/acire

Proposed by Łukasz Jernaś
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~deejay1/acire/i18n_and_pl_translation
Merge into: lp://qastaging/acire
Diff against target: 361 lines (+174/-28)
8 files modified
acire.desktop.in (+2/-2)
acire/AboutAcireDialog.py (+1/-0)
acire/PreferencesAcireDialog.py (+1/-0)
bin/acire (+17/-10)
data/ui/AboutAcireDialog.ui (+1/-0)
data/ui/PreferencesAcireDialog.ui (+2/-2)
po/acire.pot (+57/-14)
po/pl.po (+93/-0)
To merge this branch: bzr merge lp://qastaging/~deejay1/acire/i18n_and_pl_translation
Reviewer Review Type Date Requested Status
Jono Bacon Pending
Review via email: mp+20219@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Łukasz Jernaś (deejay1) wrote :

Enable i18n and translate into Polish ;)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'acire.desktop.in'
2--- acire.desktop.in 2010-01-10 19:16:21 +0000
3+++ acire.desktop.in 2010-02-26 13:54:17 +0000
4@@ -1,6 +1,6 @@
5 [Desktop Entry]
6-Name=Acire
7-Comment=Acire application
8+_Name=Acire
9+_Comment=Acire application
10 Categories=GNOME;Development;
11 Exec=acire
12 Icon=/usr/share/acire/media/icon.png
13
14=== modified file 'acire/AboutAcireDialog.py'
15--- acire/AboutAcireDialog.py 2009-12-31 00:35:03 +0000
16+++ acire/AboutAcireDialog.py 2010-02-26 13:54:17 +0000
17@@ -60,6 +60,7 @@
18 ui_filename = None
19
20 builder = gtk.Builder()
21+ builder.set_translation_domain('acire')
22 builder.add_from_file(ui_filename)
23 dialog = builder.get_object("about_acire_dialog")
24 dialog.finish_initializing(builder)
25
26=== modified file 'acire/PreferencesAcireDialog.py'
27--- acire/PreferencesAcireDialog.py 2009-12-31 00:35:03 +0000
28+++ acire/PreferencesAcireDialog.py 2010-02-26 13:54:17 +0000
29@@ -118,6 +118,7 @@
30 ui_filename = None
31
32 builder = gtk.Builder()
33+ builder.set_translation_domain('acire')
34 builder.add_from_file(ui_filename)
35 dialog = builder.get_object("preferences_acire_dialog")
36 dialog.finish_initializing(builder)
37
38=== modified file 'bin/acire'
39--- bin/acire 2010-02-08 05:31:05 +0000
40+++ bin/acire 2010-02-26 13:54:17 +0000
41@@ -48,6 +48,12 @@
42 from acire import AboutAcireDialog, PreferencesAcireDialog
43 from acire.acireconfig import getdatapath
44
45+# Set up translations
46+import gettext
47+import locale
48+locale.setlocale(locale.LC_ALL, '')
49+gettext.install('acire', unicode=True)
50+
51 class AcireWindow(gtk.Window):
52 __gtype_name__ = "AcireWindow"
53
54@@ -119,7 +125,7 @@
55
56 self.snippets_model = gtk.ListStore(str, str, str, str)
57 self.snippets_tv.set_model(self.snippets_model)
58- self.tvcolumn = gtk.TreeViewColumn("Available Snippets")
59+ self.tvcolumn = gtk.TreeViewColumn(_("Available Snippets"))
60 self.cellpb = gtk.CellRendererPixbuf()
61 self.cell_name = gtk.CellRendererText()
62 self.tvcolumn.pack_start(self.cellpb, False)
63@@ -158,7 +164,7 @@
64 finalcats = list(set(finalcats))
65
66 templist = []
67- templist.append("All")
68+ templist.append(_("All"))
69 self.categories_liststore.append(templist)
70
71 for i in finalcats:
72@@ -259,18 +265,18 @@
73 def save_snippet(self, widget, data=None):
74 if not self.current_filename:
75 md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
76- gtk.BUTTONS_CLOSE, "Please choose a snippet first.")
77+ gtk.BUTTONS_CLOSE, _("Please choose a snippet first."))
78 md.run()
79 md.destroy()
80 return
81 if gtk.pygtk_version < (2,3,90):
82 md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR,
83- gtk.BUTTONS_CLOSE, "Sorry, PyGTK must be at least version 2.4 to display the Save As dialog!")
84+ gtk.BUTTONS_CLOSE, _("Sorry, PyGTK must be at least version 2.4 to display the Save As dialog!"))
85 md.run()
86 md.destroy()
87 return
88
89- dialog = gtk.FileChooserDialog("Save Snippet As...",
90+ dialog = gtk.FileChooserDialog(_("Save Snippet As..."),
91 None,
92 gtk.FILE_CHOOSER_ACTION_SAVE,
93 (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
94@@ -278,12 +284,12 @@
95 dialog.set_default_response(gtk.RESPONSE_OK)
96
97 filter = gtk.FileFilter()
98- filter.set_name("All files")
99+ filter.set_name(_("All files"))
100 filter.add_pattern("*")
101 dialog.add_filter(filter)
102
103 filter = gtk.FileFilter()
104- filter.set_name("Python scripts")
105+ filter.set_name(_("Python scripts"))
106 filter.add_mime_type("application/x-python")
107 filter.add_mime_type("text/plain")
108 filter.add_mime_type("application/octet-stream")
109@@ -368,11 +374,11 @@
110 self.snippets_model.clear()
111
112 if len(self.snippetsdata) == 0:
113- md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, "No snippets data has been found. Please install the python-snippets package to get them.")
114+ md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, _("No snippets data has been found. Please install the python-snippets package to get them."))
115 md.run()
116 md.destroy()
117
118- if category == "All":
119+ if category == _("All"):
120 for i in self.snippetsdata:
121 for item in i:
122 templist.append(gtk.STOCK_FILE)
123@@ -454,6 +460,7 @@
124 ui_filename = None
125
126 builder = gtk.Builder()
127+ builder.set_translation_domain('acire')
128 builder.add_from_file(ui_filename)
129 window = builder.get_object("acire_window")
130 window.finish_initializing(builder)
131@@ -463,7 +470,7 @@
132 #support for command line options
133 import logging, optparse
134 parser = optparse.OptionParser(version="%prog %ver")
135- parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Show debug messages")
136+ parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help=_("Show debug messages"))
137 (options, args) = parser.parse_args()
138
139 #set the logging level to show debug messages
140
141=== modified file 'data/ui/AboutAcireDialog.ui'
142--- data/ui/AboutAcireDialog.ui 2010-01-12 05:16:35 +0000
143+++ data/ui/AboutAcireDialog.ui 2010-02-26 13:54:17 +0000
144@@ -15,6 +15,7 @@
145 <property name="website_label" translatable="yes">Learn how to contribute your own snippets!</property>
146 <property name="authors">Jono Bacon &lt;jono@jonobacon.org&gt;</property>
147 <property name="artists">Martin Owens &lt;doctormo@ubuntu.com&gt;</property>
148+ <property name="translator-credits" translatable="yes">translator-credits</property>
149 <child internal-child="vbox">
150 <object class="GtkVBox" id="dialog-vbox1">
151 <property name="visible">True</property>
152
153=== modified file 'data/ui/PreferencesAcireDialog.ui'
154--- data/ui/PreferencesAcireDialog.ui 2009-12-29 12:07:58 +0000
155+++ data/ui/PreferencesAcireDialog.ui 2010-02-26 13:54:17 +0000
156@@ -22,7 +22,7 @@
157 <property name="layout_style">end</property>
158 <child>
159 <object class="GtkButton" id="button2">
160- <property name="label" translatable="yes">gtk-cancel</property>
161+ <property name="label">gtk-cancel</property>
162 <property name="visible">True</property>
163 <property name="can_focus">True</property>
164 <property name="receives_default">True</property>
165@@ -37,7 +37,7 @@
166 </child>
167 <child>
168 <object class="GtkButton" id="button1">
169- <property name="label" translatable="yes">gtk-ok</property>
170+ <property name="label">gtk-ok</property>
171 <property name="visible">True</property>
172 <property name="can_focus">True</property>
173 <property name="receives_default">True</property>
174
175=== modified file 'po/acire.pot'
176--- po/acire.pot 2010-01-08 21:07:00 +0000
177+++ po/acire.pot 2010-02-26 13:54:17 +0000
178@@ -8,7 +8,7 @@
179 msgstr ""
180 "Project-Id-Version: PACKAGE VERSION\n"
181 "Report-Msgid-Bugs-To: \n"
182-"POT-Creation-Date: 2010-01-08 12:48-0800\n"
183+"POT-Creation-Date: 2010-02-26 14:45+0100\n"
184 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
185 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
186 "Language-Team: LANGUAGE <LL@li.org>\n"
187@@ -16,20 +16,63 @@
188 "Content-Type: text/plain; charset=CHARSET\n"
189 "Content-Transfer-Encoding: 8bit\n"
190
191+#: ../acire.desktop.in.h:1 ../data/ui/AcireWindow.ui.h:1
192+msgid "Acire"
193+msgstr ""
194+
195+#: ../acire.desktop.in.h:2
196+msgid "Acire application"
197+msgstr ""
198+
199+#: ../bin/acire.py:128
200+msgid "Available Snippets"
201+msgstr ""
202+
203+#: ../bin/acire.py:167 ../bin/acire.py:381
204+msgid "All"
205+msgstr ""
206+
207+#: ../bin/acire.py:268
208+msgid "Please choose a snippet first."
209+msgstr ""
210+
211+#: ../bin/acire.py:274
212+msgid ""
213+"Sorry, PyGTK must be at least version 2.4 to display the Save As dialog!"
214+msgstr ""
215+
216+#: ../bin/acire.py:279
217+msgid "Save Snippet As..."
218+msgstr ""
219+
220+#: ../bin/acire.py:287
221+msgid "All files"
222+msgstr ""
223+
224+#: ../bin/acire.py:292
225+msgid "Python scripts"
226+msgstr ""
227+
228+#: ../bin/acire.py:377
229+msgid ""
230+"No snippets data has been found. Please install the python-snippets package "
231+"to get them."
232+msgstr ""
233+
234+#: ../bin/acire.py:473
235+msgid "Show debug messages"
236+msgstr ""
237+
238 #: ../data/ui/AboutAcireDialog.ui.h:1
239-msgid "Browse, run and learn from code snippets easily"
240-msgstr ""
241-
242-#: ../data/ui/PreferencesAcireDialog.ui.h:1
243-msgid "gtk-cancel"
244-msgstr ""
245-
246-#: ../data/ui/PreferencesAcireDialog.ui.h:2
247-msgid "gtk-ok"
248-msgstr ""
249-
250-#: ../data/ui/AcireWindow.ui.h:1
251-msgid "Acire"
252+msgid "Browse, run and learn from Python code snippets easily"
253+msgstr ""
254+
255+#: ../data/ui/AboutAcireDialog.ui.h:2
256+msgid "Learn how to contribute your own snippets!"
257+msgstr ""
258+
259+#: ../data/ui/AboutAcireDialog.ui.h:3
260+msgid "translator-credits"
261 msgstr ""
262
263 #: ../data/ui/AcireWindow.ui.h:2
264
265=== added file 'po/pl.po'
266--- po/pl.po 1970-01-01 00:00:00 +0000
267+++ po/pl.po 2010-02-26 13:54:17 +0000
268@@ -0,0 +1,93 @@
269+# Polish translation of Acire
270+# Copyright (C) 2010 Rosetta Contributors and Canonical Ltd 2010
271+# This file is distributed under the same license as the acire package.
272+#
273+# Łukasz Jernaś <deejay1@srem.org>, 2010.
274+#
275+msgid ""
276+msgstr ""
277+"Project-Id-Version: acire\n"
278+"Report-Msgid-Bugs-To: \n"
279+"POT-Creation-Date: 2010-02-26 14:45+0100\n"
280+"PO-Revision-Date: 2010-02-26 14:47+0100\n"
281+"Last-Translator: Łukasz Jernaś <deejay1@srem.org>\n"
282+"Language-Team: Polish <pl@li.org>\n"
283+"MIME-Version: 1.0\n"
284+"Content-Type: text/plain; charset=utf-8\n"
285+"Content-Transfer-Encoding: 8bit\n"
286+
287+#: ../acire.desktop.in.h:1 ../data/ui/AcireWindow.ui.h:1
288+msgid "Acire"
289+msgstr "Acire"
290+
291+#: ../acire.desktop.in.h:2
292+msgid "Acire application"
293+msgstr "Program Acire"
294+
295+#: ../bin/acire.py:128
296+msgid "Available Snippets"
297+msgstr "Dostępne wstawki"
298+
299+#: ../bin/acire.py:167 ../bin/acire.py:381
300+msgid "All"
301+msgstr "Wszystkie"
302+
303+#: ../bin/acire.py:268
304+msgid "Please choose a snippet first."
305+msgstr "Należy wybrać wstawkę."
306+
307+#: ../bin/acire.py:274
308+msgid ""
309+"Sorry, PyGTK must be at least version 2.4 to display the Save As dialog!"
310+msgstr "Biblioteka PyGTK musi być zainstalowana, aby można było wyświetlić okno dialogowe zapisywania."
311+
312+#: ../bin/acire.py:279
313+msgid "Save Snippet As..."
314+msgstr "Zapisz wstawkę jako…"
315+
316+#: ../bin/acire.py:287
317+msgid "All files"
318+msgstr "Wszystkie pliki"
319+
320+#: ../bin/acire.py:292
321+msgid "Python scripts"
322+msgstr "Skrypty języka Python"
323+
324+#: ../bin/acire.py:377
325+msgid ""
326+"No snippets data has been found. Please install the python-snippets package "
327+"to get them."
328+msgstr ""
329+"Nie znaleziono danych wstawek. Należy zainstalować pakiet python-snippets."
330+
331+#: ../bin/acire.py:473
332+msgid "Show debug messages"
333+msgstr "Wyświetla komunikaty dla programistów"
334+
335+#: ../data/ui/AboutAcireDialog.ui.h:1
336+msgid "Browse, run and learn from Python code snippets easily"
337+msgstr "Przeglądaj, uruchamiaj i ucz się ze wstawek języka Python"
338+
339+#: ../data/ui/AboutAcireDialog.ui.h:2
340+msgid "Learn how to contribute your own snippets!"
341+msgstr "Dowiedz się jak współtworzyć wstawki."
342+
343+#: ../data/ui/AboutAcireDialog.ui.h:3
344+msgid "translator-credits"
345+msgstr ""
346+
347+#: ../data/ui/AcireWindow.ui.h:2
348+msgid "No snippet loaded."
349+msgstr "Nie wczytano żadnych wstawek."
350+
351+#: ../data/ui/AcireWindow.ui.h:3
352+msgid "Terminal Output"
353+msgstr "Wyjście"
354+
355+#: ../data/ui/AcireWindow.ui.h:4
356+msgid "_File"
357+msgstr "_Plik"
358+
359+#: ../data/ui/AcireWindow.ui.h:5
360+msgid "_Help"
361+msgstr "Pomo_c"

Subscribers

People subscribed via source and target branches