Merge lp:~vthompson/ubuntu-filemanager-app/update-filemanager-translations into lp:ubuntu-filemanager-app

Proposed by Victor Thompson
Status: Merged
Approved by: Carlos Jose Mazieri
Approved revision: 103
Merged at revision: 105
Proposed branch: lp:~vthompson/ubuntu-filemanager-app/update-filemanager-translations
Merge into: lp:ubuntu-filemanager-app
Diff against target: 471 lines (+397/-31)
4 files modified
.bzrignore (+2/-0)
README.translations (+36/-0)
po/po.pro (+39/-31)
po/ubuntu-filemanager-app.pot (+320/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-filemanager-app/update-filemanager-translations
Reviewer Review Type Date Requested Status
Carlos Jose Mazieri Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+200199@code.launchpad.net

Commit message

Updated translation template and add .pot file

Description of the change

Updated translation template and add .pot file

To post a comment you must log in.
103. By Victor Thompson

Update README.translations

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

It looks OK to me even I have not done any test.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2013-04-04 11:05:43 +0000
3+++ .bzrignore 2013-12-30 20:40:22 +0000
4@@ -1,5 +1,7 @@
5 *.qmlproject.user
6
7+.build
8+po/Makefile
9 debian/files
10 debian/app-template/
11 debian/*.debhelper.log
12
13=== added file 'README.translations'
14--- README.translations 1970-01-01 00:00:00 +0000
15+++ README.translations 2013-12-30 20:40:22 +0000
16@@ -0,0 +1,36 @@
17+# Updating translations
18+
19+Translations for the Filemanager app happen in [Launchpad Translations][] and
20+are automatically committed daily on the trunk branch in the po/ folder.
21+
22+They are then built and installed as part of the package build, so that
23+developers don't really need to worry about them.
24+
25+However, there is one task that needs to be taken care of: exposing new
26+translatable messages to translators. So whenever you add new translatable
27+messages in the code, make sure to follow these steps:
28+
29+ 1. Change directory to the po/ folder: `cd po`
30+ 2. Update the translations template: `qmake && make pot`
31+ 3. Commit the generated .pot file: `bzr commit -m"Updated translation template"`
32+ 4. Push the branch and send a merge proposal as usual
33+
34+And that's it, once the branch lands Launchpad should take care of all the rest!
35+
36+# Behind the scenes
37+
38+Behind the scenes, whenever the po/*.pot file (also known as translations template)
39+is committed to trunk Launchpad reads it and updates the translatable strings
40+exposed in the web UI. This will enable translators to work on the new strings.
41+The translations template contains all translatable strings that have been
42+extracted from the source code files.
43+
44+Launchpad will then store translations in its database and will commit them daily
45+in the form of textual po/*.po files to trunk. The PO files are also usually
46+referred to as the translations files. You'll find a translation file for each
47+language the app has got at least a translated message available for.
48+
49+Translations for core apps follow the standard [gettext format].
50+
51+ [Launchpad Translations]: https://translations.launchpad.net/ubuntu-filemanager-app
52+ [gettext format]: https://www.gnu.org/software/gettext/
53
54=== modified file 'po/po.pro'
55--- po/po.pro 2013-02-12 16:18:48 +0000
56+++ po/po.pro 2013-12-30 20:40:22 +0000
57@@ -1,48 +1,56 @@
58+## This .pro file is used to create a Makefile with the necessary rules
59+## to create an initial translations template and to update it whenever
60+## there are new translatable strings in the project that are ready to be
61+## exposed to translators
62+##
63+## See the ../README.translations file for more information
64+
65 TEMPLATE = subdirs
66
67 PROJECTNAME = $$system(basename ../*.qmlproject)
68 PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,)
69
70+DESKTOPFILE = ../$${PROJECTNAME}.desktop
71+
72 SOURCECODE = ../*.qml
73
74+BUILDDIR = ../.build
75+DESKTOPFILETEMP = $${BUILDDIR}/$${PROJECTNAME}.desktop.js
76+
77 message("")
78 message(" Project Name: $$PROJECTNAME ")
79 message(" Source Code: $$SOURCECODE ")
80 message("")
81-message(" run 'make pot' to generate the pot file from source code. ")
82-message(" run 'make translate' to create a new translation (po) based on pot. ")
83-message(" run 'make mo' to generate the mo files from po files. ")
84-message(" run 'qmake; make install' to install the mo files. ")
85+message(" Run 'make pot' to generate the pot file from source code. ")
86 message("")
87
88-## generate pot file 'make pot'
89+## Generate pot file 'make pot'
90 potfile.target = pot
91-potfile.commands = xgettext -o $${PROJECTNAME}.pot --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr $${SOURCECODE}
92+potfile.commands = xgettext \
93+ -o $${PROJECTNAME}.pot \
94+ --copyright=\"Canonical Ltd. \" \
95+ --package-name $${PROJECTNAME} \
96+ --qt --c++ --add-comments=TRANSLATORS \
97+ --keyword=tr --keyword=tr:1,2 \
98+ $${SOURCECODE} $${DESKTOPFILETEMP}
99+potfile.depends = desktopfile
100 QMAKE_EXTRA_TARGETS += potfile
101
102-## poedit target for new translations 'make translate'
103-poedit.target = translate
104-poedit.commands = cp messages.pot new_language.po; poedit new_language.po
105-QMAKE_EXTRA_TARGETS += poedit
106-
107-## generate mo files 'make mo'
108-mofiles.target = mo
109-mofiles.commands = msgfmt *.po
110-QMAKE_EXTRA_TARGETS += mofiles
111-
112-## Installation steps for mo files. 'make install'
113-MO_FILES = $$system(ls *.mo)
114-
115-install_mo_commands =
116-for(mo_file, MO_FILES) {
117- mo_name = $$replace(mo_file,.mo,)
118- mo_targetpath = $(INSTALL_ROOT)/usr/share/locale/$${mo_name}/LC_MESSAGES
119- mo_target = $${mo_targetpath}/$${PROJECTNAME}.mo
120- !isEmpty(install_mo_commands): install_mo_commands += &&
121- install_mo_commands += test -d $$mo_targetpath || mkdir -p $$mo_targetpath
122- install_mo_commands += && cp $$mo_file $$mo_target
123-}
124-
125-install.commands = $$install_mo_commands
126-QMAKE_EXTRA_TARGETS += install
127+## Do not use this rule directly. It's a dependency rule to
128+## generate an intermediate .js file to extract translatable
129+## strings from the .desktop file
130+desktopfile.target = desktopfile
131+desktopfile.commands = awk \'BEGIN { FS=\"=\" }; /Name/ {print \"var s = i18n.tr(\42\" \$$2 \"\42);\"}\' $${DESKTOPFILE} > $${DESKTOPFILETEMP}
132+desktopfile.depends = makebuilddir
133+QMAKE_EXTRA_TARGETS += desktopfile
134+
135+## Dependency rule to create the temporary build dir
136+makebuilddir.target = makebuilddir
137+makebuilddir.commands = mkdir -p $${BUILDDIR}
138+QMAKE_EXTRA_TARGETS += makebuilddir
139+
140+## Rule to clean the products of the build
141+clean.target = clean
142+clean.commands = rm -Rf $${BUILDDIR}
143+QMAKE_EXTRA_TARGETS += clean
144
145
146=== added file 'po/ubuntu-filemanager-app.pot'
147--- po/ubuntu-filemanager-app.pot 1970-01-01 00:00:00 +0000
148+++ po/ubuntu-filemanager-app.pot 2013-12-30 20:40:22 +0000
149@@ -0,0 +1,320 @@
150+# Filemanager App Translations
151+# Copyright (C) 2013 Canonical Ltd.
152+# This file is distributed under the same license as the ubuntu-filemanager-app package.
153+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
154+#
155+#, fuzzy
156+msgid ""
157+msgstr ""
158+"Project-Id-Version: ubuntu-filemanager-app\n"
159+"Report-Msgid-Bugs-To: \n"
160+"POT-Creation-Date: 2013-12-30 14:24-0600\n"
161+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
162+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
163+"Language-Team: LANGUAGE <LL@li.org>\n"
164+"Language: \n"
165+"MIME-Version: 1.0\n"
166+"Content-Type: text/plain; charset=CHARSET\n"
167+"Content-Transfer-Encoding: 8bit\n"
168+
169+#: ../ConfirmDialog.qml:31 ../ConfirmDialogWithInput.qml:41
170+#: ../NotifyDialog.qml:25
171+msgid "Ok"
172+msgstr ""
173+
174+#: ../ConfirmDialog.qml:41 ../ConfirmDialogWithInput.qml:51
175+#: ../FileActionDialog.qml:45 ../FileOperationProgressDialog.qml:44
176+#: ../GoToDialog.qml:61
177+msgid "Cancel"
178+msgstr ""
179+
180+#: ../FileActionDialog.qml:30
181+msgid "Choose action"
182+msgstr ""
183+
184+#: ../FileActionDialog.qml:31
185+#, qt-format
186+msgid "For file: %1"
187+msgstr ""
188+
189+#: ../FileActionDialog.qml:35
190+msgid "Open"
191+msgstr ""
192+
193+#: ../FileDetailsPopover.qml:37
194+msgid "Readable"
195+msgstr ""
196+
197+#: ../FileDetailsPopover.qml:40
198+msgid "Writable"
199+msgstr ""
200+
201+#: ../FileDetailsPopover.qml:43
202+msgid "Executable"
203+msgstr ""
204+
205+#: ../FileDetailsPopover.qml:91
206+msgid "Path:"
207+msgstr ""
208+
209+#: ../FileDetailsPopover.qml:102
210+msgid "Contents:"
211+msgstr ""
212+
213+#: ../FileDetailsPopover.qml:103
214+msgid "Size:"
215+msgstr ""
216+
217+#: ../FileDetailsPopover.qml:112
218+msgid "Accessed:"
219+msgstr ""
220+
221+#: ../FileDetailsPopover.qml:121
222+msgid "Modified:"
223+msgstr ""
224+
225+#: ../FileDetailsPopover.qml:130
226+msgid "Permissions:"
227+msgstr ""
228+
229+#: ../FileOperationProgressDialog.qml:27
230+msgid "Operation in progress"
231+msgstr ""
232+
233+#: ../FolderListPage.qml:119
234+msgid "~/Desktop"
235+msgstr ""
236+
237+#: ../FolderListPage.qml:121
238+msgid "~/Documents"
239+msgstr ""
240+
241+#: ../FolderListPage.qml:123
242+msgid "~/Downloads"
243+msgstr ""
244+
245+#: ../FolderListPage.qml:125
246+msgid "~/Music"
247+msgstr ""
248+
249+#: ../FolderListPage.qml:127
250+msgid "~/Pictures"
251+msgstr ""
252+
253+#: ../FolderListPage.qml:129
254+msgid "~/Public"
255+msgstr ""
256+
257+#: ../FolderListPage.qml:131
258+msgid "~/Programs"
259+msgstr ""
260+
261+#: ../FolderListPage.qml:133
262+msgid "~/Templates"
263+msgstr ""
264+
265+#: ../FolderListPage.qml:135
266+msgid "~/Videos"
267+msgstr ""
268+
269+#: ../FolderListPage.qml:148
270+msgid "Home"
271+msgstr ""
272+
273+#: ../FolderListPage.qml:150
274+msgid "File System"
275+msgstr ""
276+
277+#: ../FolderListPage.qml:197
278+msgid "1 file"
279+msgstr ""
280+
281+#: ../FolderListPage.qml:198
282+#, qt-format
283+msgid "%1 files"
284+msgstr ""
285+
286+#: ../FolderListPage.qml:222
287+msgid "Create New Folder"
288+msgstr ""
289+
290+#: ../FolderListPage.qml:242
291+msgid "Paste"
292+msgstr ""
293+
294+#: ../FolderListPage.qml:244
295+#, qt-format
296+msgid "Paste %1 File"
297+msgstr ""
298+
299+#: ../FolderListPage.qml:245
300+#, qt-format
301+msgid "Paste %1 Files"
302+msgstr ""
303+
304+#: ../FolderListPage.qml:248
305+msgid "Paste files"
306+msgstr ""
307+
308+#: ../FolderListPage.qml:260
309+msgid "Open in Terminal"
310+msgstr ""
311+
312+#: ../FolderListPage.qml:272 ../FolderListView.qml:150
313+msgid "Properties"
314+msgstr ""
315+
316+#: ../FolderListPage.qml:307
317+msgid "Create folder"
318+msgstr ""
319+
320+#: ../FolderListPage.qml:308
321+msgid "Enter name for new folder"
322+msgstr ""
323+
324+#: ../FolderListPage.qml:324
325+msgid "Create file"
326+msgstr ""
327+
328+#: ../FolderListPage.qml:325
329+msgid "Enter name for new file"
330+msgstr ""
331+
332+#: ../FolderListPage.qml:360
333+msgid "Actions"
334+msgstr ""
335+
336+#: ../FolderListPage.qml:370
337+msgid "View"
338+msgstr ""
339+
340+#: ../FolderListPage.qml:385
341+msgid "Go To"
342+msgstr ""
343+
344+#: ../FolderListPage.qml:398 ../PlacesSidebar.qml:73
345+msgid "Places"
346+msgstr ""
347+
348+#: ../FolderListPage.qml:465
349+msgid "No files"
350+msgstr ""
351+
352+#: ../FolderListPage.qml:486
353+msgid "File operation error"
354+msgstr ""
355+
356+#: ../FolderListView.qml:34
357+#, qt-format
358+msgid "%1 (1 file)"
359+msgstr ""
360+
361+#: ../FolderListView.qml:35
362+#, qt-format
363+msgid "%1 (%2 files)"
364+msgstr ""
365+
366+#: ../FolderListView.qml:43 ../FolderListView.qml:124
367+msgid "Delete"
368+msgstr ""
369+
370+#: ../FolderListView.qml:44
371+#, qt-format
372+msgid "Are you sure you want to permanently delete '%1'?"
373+msgstr ""
374+
375+#: ../FolderListView.qml:67 ../FolderListView.qml:137
376+msgid "Rename"
377+msgstr ""
378+
379+#: ../FolderListView.qml:68
380+msgid "Enter a new name"
381+msgstr ""
382+
383+#: ../FolderListView.qml:77
384+msgid "Could not rename"
385+msgstr ""
386+
387+#: ../FolderListView.qml:78
388+msgid "Insufficient permissions or name already exists?"
389+msgstr ""
390+
391+#: ../FolderListView.qml:101
392+msgid "Cut"
393+msgstr ""
394+
395+#: ../FolderListView.qml:112
396+msgid "Copy"
397+msgstr ""
398+
399+#: ../FolderListView.qml:175
400+msgid "Folder not accessible"
401+msgstr ""
402+
403+#: ../FolderListView.qml:176
404+msgid "Can not access "
405+msgstr ""
406+
407+#: ../GoToDialog.qml:25
408+msgid "Go To Location"
409+msgstr ""
410+
411+#: ../GoToDialog.qml:27
412+msgid "Enter a location to go to:"
413+msgstr ""
414+
415+#: ../GoToDialog.qml:39 ../PlacesPopover.qml:84
416+msgid "Location..."
417+msgstr ""
418+
419+#: ../GoToDialog.qml:48 ../PlacesPopover.qml:99
420+msgid "Go"
421+msgstr ""
422+
423+#: ../SettingsPage.qml:32 ../ubuntu-filemanager-app.qml:51
424+msgid "Settings"
425+msgstr ""
426+
427+#: ../SettingsPage.qml:38
428+msgid "Show Advanced Features"
429+msgstr ""
430+
431+#: ../ViewPopover.qml:39
432+msgid "Show Hidden Files"
433+msgstr ""
434+
435+#: ../ViewPopover.qml:59
436+msgid "Sort By"
437+msgstr ""
438+
439+#: ../ViewPopover.qml:70
440+msgid "Name"
441+msgstr ""
442+
443+#: ../ViewPopover.qml:71
444+msgid "Date"
445+msgstr ""
446+
447+#: ../ViewPopover.qml:81
448+msgid "Sort Order"
449+msgstr ""
450+
451+#: ../ViewPopover.qml:92 ../ViewPopover.qml:97
452+msgid "Ascending"
453+msgstr ""
454+
455+#: ../ViewPopover.qml:93
456+msgid "Descending"
457+msgstr ""
458+
459+#: ../ViewPopover.qml:105
460+msgid "Filter"
461+msgstr ""
462+
463+#: ../ubuntu-filemanager-app.qml:52
464+msgid "Change app settings"
465+msgstr ""
466+
467+#: ../.build/ubuntu-filemanager-app.desktop.js:1
468+msgid "File Manager"
469+msgstr ""
470
471=== renamed file 'filemanager.qmlproject' => 'ubuntu-filemanager-app.qmlproject'

Subscribers

People subscribed via source and target branches