Merge lp:~vthompson/ubuntu-terminal-app/fix-1290492-terminal into lp:ubuntu-terminal-app

Proposed by Victor Thompson
Status: Merged
Approved by: David Planella
Approved revision: 45
Merged at revision: 48
Proposed branch: lp:~vthompson/ubuntu-terminal-app/fix-1290492-terminal
Merge into: lp:ubuntu-terminal-app
Diff against target: 152 lines (+95/-35)
2 files modified
po/po.pro (+44/-35)
po/ubuntu-terminal-app.pot (+51/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-terminal-app/fix-1290492-terminal
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+210331@code.launchpad.net

Commit message

* Fix po.pro file correct source files and options
* Update translation strings

Description of the change

* Fix po.pro file correct source files and options
* Update translation strings

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

Add additional source files

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
David Planella (dpm) wrote :

Looks good to me. It needs to add the README.translations file that's missing, but as we'll need to update the .pro files to cmake soon, we can take care of that then.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/po.pro'
2--- po/po.pro 2013-02-12 16:18:48 +0000
3+++ po/po.pro 2014-03-11 03:15:27 +0000
4@@ -1,48 +1,57 @@
5+## This .pro file is used to create a Makefile with the necessary rules
6+## to create an initial translations template and to update it whenever
7+## there are new translatable strings in the project that are ready to be
8+## exposed to translators
9+##
10+## See the ../README.translations file for more information
11+
12 TEMPLATE = subdirs
13
14-PROJECTNAME = $$system(basename ../*.qmlproject)
15-PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,)
16-
17-SOURCECODE = ../*.qml
18+PROJECTNAME = ubuntu-terminal-app
19+
20+DESKTOPFILE = ../com.ubuntu.terminal_terminal.desktop.in
21+
22+SOURCECODE = ../*.qml \
23+ ../config/*.qml \
24+ ../extraPanel/*.qml
25+
26+BUILDDIR = ../.build
27+DESKTOPFILETEMP = $${BUILDDIR}/com.ubuntu.terminal_terminal.desktop.in
28
29 message("")
30 message(" Project Name: $$PROJECTNAME ")
31 message(" Source Code: $$SOURCECODE ")
32 message("")
33-message(" run 'make pot' to generate the pot file from source code. ")
34-message(" run 'make translate' to create a new translation (po) based on pot. ")
35-message(" run 'make mo' to generate the mo files from po files. ")
36-message(" run 'qmake; make install' to install the mo files. ")
37+message(" Run 'make pot' to generate the pot file from source code. ")
38 message("")
39
40-## generate pot file 'make pot'
41+## Generate pot file 'make pot'
42 potfile.target = pot
43-potfile.commands = xgettext -o $${PROJECTNAME}.pot --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr $${SOURCECODE}
44+potfile.commands = xgettext \
45+ -o $${PROJECTNAME}.pot \
46+ --copyright=\"Canonical Ltd. \" \
47+ --package-name $${PROJECTNAME} \
48+ --qt --c++ --add-comments=TRANSLATORS \
49+ --keyword=tr --keyword=tr:1,2 \
50+ $${SOURCECODE} $${DESKTOPFILETEMP}
51+potfile.depends = desktopfile
52 QMAKE_EXTRA_TARGETS += potfile
53
54-## poedit target for new translations 'make translate'
55-poedit.target = translate
56-poedit.commands = cp messages.pot new_language.po; poedit new_language.po
57-QMAKE_EXTRA_TARGETS += poedit
58-
59-## generate mo files 'make mo'
60-mofiles.target = mo
61-mofiles.commands = msgfmt *.po
62-QMAKE_EXTRA_TARGETS += mofiles
63-
64-## Installation steps for mo files. 'make install'
65-MO_FILES = $$system(ls *.mo)
66-
67-install_mo_commands =
68-for(mo_file, MO_FILES) {
69- mo_name = $$replace(mo_file,.mo,)
70- mo_targetpath = $(INSTALL_ROOT)/usr/share/locale/$${mo_name}/LC_MESSAGES
71- mo_target = $${mo_targetpath}/$${PROJECTNAME}.mo
72- !isEmpty(install_mo_commands): install_mo_commands += &&
73- install_mo_commands += test -d $$mo_targetpath || mkdir -p $$mo_targetpath
74- install_mo_commands += && cp $$mo_file $$mo_target
75-}
76-
77-install.commands = $$install_mo_commands
78-QMAKE_EXTRA_TARGETS += install
79+## Do not use this rule directly. It's a dependency rule to
80+## generate an intermediate .js file to extract translatable
81+## strings from the .desktop file
82+desktopfile.target = desktopfile
83+desktopfile.commands = awk \'BEGIN { FS=\"=\" }; /Name/ {print \"var s = i18n.tr(\42\" \$$2 \"\42);\"}\' $${DESKTOPFILE} > $${DESKTOPFILETEMP}
84+desktopfile.depends = makebuilddir
85+QMAKE_EXTRA_TARGETS += desktopfile
86+
87+## Dependency rule to create the temporary build dir
88+makebuilddir.target = makebuilddir
89+makebuilddir.commands = mkdir -p $${BUILDDIR}
90+QMAKE_EXTRA_TARGETS += makebuilddir
91+
92+## Rule to clean the products of the build
93+clean.target = clean
94+clean.commands = rm -Rf $${BUILDDIR}
95+QMAKE_EXTRA_TARGETS += clean
96
97
98=== added file 'po/ubuntu-terminal-app.pot'
99--- po/ubuntu-terminal-app.pot 1970-01-01 00:00:00 +0000
100+++ po/ubuntu-terminal-app.pot 2014-03-11 03:15:27 +0000
101@@ -0,0 +1,51 @@
102+# Terminal App Translations
103+# Copyright (C) 2014 Canonical Ltd.
104+# This file is distributed under the same license as the ubuntu-terminal-app package.
105+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
106+#
107+#, fuzzy
108+msgid ""
109+msgstr ""
110+"Project-Id-Version: ubuntu-terminal-app\n"
111+"Report-Msgid-Bugs-To: \n"
112+"POT-Creation-Date: 2014-03-10 22:08-0500\n"
113+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
114+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
115+"Language-Team: LANGUAGE <LL@li.org>\n"
116+"Language: \n"
117+"MIME-Version: 1.0\n"
118+"Content-Type: text/plain; charset=CHARSET\n"
119+"Content-Transfer-Encoding: 8bit\n"
120+
121+#: ../Configs.qml:48
122+msgid "Color scheme"
123+msgstr ""
124+
125+#: ../Configs.qml:64
126+msgid "Font size"
127+msgstr ""
128+
129+#: ../ubuntu-terminal-app.qml:24
130+msgid "Control keys"
131+msgstr ""
132+
133+#: ../ubuntu-terminal-app.qml:29
134+msgid "Function keys"
135+msgstr ""
136+
137+#: ../ubuntu-terminal-app.qml:34
138+msgid "Text ctrl keys"
139+msgstr ""
140+
141+#: ../ubuntu-terminal-app.qml:39
142+msgid "Hide extra panel"
143+msgstr ""
144+
145+#: ../ubuntu-terminal-app.qml:58
146+#: ../.build/com.ubuntu.terminal_terminal.desktop.in:1
147+msgid "Terminal"
148+msgstr ""
149+
150+#: ../ubuntu-terminal-app.qml:98
151+msgid "Settings"
152+msgstr ""

Subscribers

People subscribed via source and target branches