Merge lp:~dpm/ubuntu-calendar-app/rename into lp:ubuntu-calendar-app
- rename
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~dpm/ubuntu-calendar-app/rename |
Merge into: | lp:ubuntu-calendar-app |
Diff against target: |
180 lines (+41/-20) 11 files modified
calendar-app (+1/-1) calendar-app.desktop (+3/-3) calendar.qml (+1/-1) debian/calendar-app-autopilot.install (+1/-1) debian/calendar-app.install (+5/-5) debian/changelog (+12/-0) debian/control (+4/-4) debian/copyright (+1/-1) debian/rules (+9/-0) tests/autopilot/calendar_app/tests/__init__.py (+3/-3) tests/autopilot/calendar_app/tests/test_calendar.py (+1/-1) |
To merge this branch: | bzr merge lp:~dpm/ubuntu-calendar-app/rename |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Tilloy (community) | Needs Fixing | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+168982@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-06-17.
Commit message
Rename the project and add a build rule to generate and install compiled translations.
Description of the change
This merge proposal updates the qmake rule for creating the translation template (.pot file) and include translations from the .desktop file.
At the same time, it renames the project to calendar-app to follow the same naming convention as the system apps such as camera-app. The reason it's been done here is because parts of the project were already renamed, so I decided to go ahead and rename the rest to make the qmake rule for .desktop file translations work.
- 38. By David Planella
-
Merged from trunk, renamed autopilot tests to follow the same calendar-app naming convention
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:38
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
I’d rather have two separate merge requests: those changes are unrelated one with the other. Could you split this MR into two, one for the renaming, and one for the translations?
Olivier Tilloy (osomon) wrote : | # |
You might want to pass the -D flag to xgettext to ensure the paths in the pot file are relative to the root of the source tree.
Olivier Tilloy (osomon) wrote : | # |
So if I understand your code correctly, you’re injecting the "i18n.tr()" calls into a temporary copy of the desktop file. To mimick closer what we’re doing for the core apps using cmake, what about doing the reverse, i.e. having the calls to i18n.tr() already in a desktop.in file, and generating the desktop file from there by removing the calls to i18n.tr()? This would make for a more flexible solution, if in the future we need to translate more strings in the desktop file.
David Planella (dpm) wrote : | # |
Al 12/06/13 18:36, En/na Olivier Tilloy ha escrit:
> I’d rather have two separate merge requests: those changes are unrelated one with the other. Could you split this MR into two, one for the renaming, and one for the translations?
I would have preferred to do it this way as well, but the fact that the
calendar app is already a bit different in terms of naming conventions
than the rest of the apps made it more difficult.
To give some background, we're intending to rename all community core
apps to $APPNAME-app at some point, to bring them inline with the naming
convention of the apps you guys are developing. That means we'll be
dropping the 'ubuntu-' prefix from the apps.
While we haven't started doing this, it seems that the calendar app has
already some files where the 'ubuntu-' prefix was dropped, which brings
some inconsistency and makes the po/po.pro rules fail (e.g. it is
expected that the .desktop file is named the same as the project file)
I see LP lets specify a branch for a MP as being dependent from another.
I'll see if I can separate them.
David Planella (dpm) wrote : | # |
Al 12/06/13 18:43, En/na Olivier Tilloy ha escrit:
> You might want to pass the -D flag to xgettext to ensure the paths in the pot file are relative to the root of the source tree.
The current practice in gettext-based apps is to have the paths in the
.pot file be relative to the po/ folder instead of the root of the
source tree. I'd prefer sticking to that, which is what translators are
used to.
David Planella (dpm) wrote : | # |
Al 12/06/13 18:49, En/na Olivier Tilloy ha escrit:
> So if I understand your code correctly, you’re injecting the "i18n.tr()" calls into a temporary copy of the desktop file.
Yeah, more or less. I'm extracting the translatable strings from the
.desktop file and putting them into a temporary .js file, which I then
feed to xgettext. I'm essentially mimicking the behaviour of intltool
when dealing with .desktop files: it extracts the strings, puts them in
a temporary .h file and then adds this file to the list of files for
xgettext to process.
The only difference is that I've made this temp file a valid .js file
instead of a C .h file.
> To mimick closer what we’re doing for the core apps using cmake, what about doing the reverse, i.e. having the calls to i18n.tr() already in a desktop.in file, and generating the desktop file from there by removing the calls to i18n.tr()? This would make for a more flexible solution, if in the future we need to translate more strings in the desktop file.
The difference in the community core apps is that essentially we're not
using a build system. I've simply added a .pro file so that we can
execute qmake to update the .pot file, but the rest of the files don't
need any build step.
If I modify the .desktop file to include i18n.tr() calls, I'll be adding
a step whereby before running any of the apps, they will need to be
built to generate the .desktop file from the .desktop.in file. Which
will probably need to have another .pro file at the top of the source tree.
I wanted to make the change as unintrusive as possible, and keep the
.desktop file untouched. In this way:
- Apps are run as before and don't need a build step
- To update the .pot file one can just run 'qmake && make pot' from the
po/ folder
At some point, we'll probably need to standardize on the same build
system across all apps, which I guess will be CMake. At that point,
we'll also be standardizing on the way we extract .desktop translations,
and the qmake rules will need to be changed in any way. But we're not
there yet, and to me (for the qmake-based apps), .desktop file
generation would bring drawbacks at this point.
I hope that makes sense.
- 39. By David Planella
-
Reverted .desktop file translation changes, to be submitted in a separate branch
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:39
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
Updated the merge request to be separated in two as requested:
- MP for the renaming: this one
- MP for .desktop file support: https:/
Olivier Tilloy (osomon) wrote : | # |
> Al 12/06/13 18:43, En/na Olivier Tilloy ha escrit:
> > You might want to pass the -D flag to xgettext to ensure the paths in the
> pot file are relative to the root of the source tree.
> The current practice in gettext-based apps is to have the paths in the
> .pot file be relative to the po/ folder instead of the root of the
> source tree. I'd prefer sticking to that, which is what translators are
> used to.
Ok, that makes sense. I wasn’t aware of this practice. Thanks for explaining.
Olivier Tilloy (osomon) wrote : | # |
> Al 12/06/13 18:49, En/na Olivier Tilloy ha escrit:
> > So if I understand your code correctly, you’re injecting the "i18n.tr()"
> calls into a temporary copy of the desktop file.
> Yeah, more or less. I'm extracting the translatable strings from the
> .desktop file and putting them into a temporary .js file, which I then
> feed to xgettext. I'm essentially mimicking the behaviour of intltool
> when dealing with .desktop files: it extracts the strings, puts them in
> a temporary .h file and then adds this file to the list of files for
> xgettext to process.
>
> The only difference is that I've made this temp file a valid .js file
> instead of a C .h file.
>
> > To mimick closer what we’re doing for the core apps using cmake, what about
> doing the reverse, i.e. having the calls to i18n.tr() already in a desktop.in
> file, and generating the desktop file from there by removing the calls to
> i18n.tr()? This would make for a more flexible solution, if in the future we
> need to translate more strings in the desktop file.
> The difference in the community core apps is that essentially we're not
> using a build system. I've simply added a .pro file so that we can
> execute qmake to update the .pot file, but the rest of the files don't
> need any build step.
>
> If I modify the .desktop file to include i18n.tr() calls, I'll be adding
> a step whereby before running any of the apps, they will need to be
> built to generate the .desktop file from the .desktop.in file. Which
> will probably need to have another .pro file at the top of the source tree.
>
> I wanted to make the change as unintrusive as possible, and keep the
> .desktop file untouched. In this way:
>
> - Apps are run as before and don't need a build step
> - To update the .pot file one can just run 'qmake && make pot' from the
> po/ folder
>
> At some point, we'll probably need to standardize on the same build
> system across all apps, which I guess will be CMake. At that point,
> we'll also be standardizing on the way we extract .desktop translations,
> and the qmake rules will need to be changed in any way. But we're not
> there yet, and to me (for the qmake-based apps), .desktop file
> generation would bring drawbacks at this point.
>
> I hope that makes sense.
That makes complete sense, thanks for the detailed explanation. If this is the way intltool does it, then it’s definitely the way to go. And not requiring any additional step for running the app is a must-have too.
Olivier Tilloy (osomon) wrote : | # |
Project-Id-Version in po/calendar-app.pot needs to be updated too.
Olivier Tilloy (osomon) wrote : | # |
72 +ubuntu-
73 +
74 + * Updated packaging to install translations
75 +
76 + -- David Planella <email address hidden> Tue, 28 May 2013 13:53:10 +0200
Is this changelog entry really meant to be added?
Olivier Tilloy (osomon) wrote : | # |
> 72 +ubuntu-
> 73 +
> 74 + * Updated packaging to install translations
> 75 +
> 76 + -- David Planella <email address hidden> Tue, 28 May 2013
> 13:53:10 +0200
>
> Is this changelog entry really meant to be added?
Ah, ok, just saw that you’re adding the rules to generate and install the mo files. I think the two changelog entries could be merged into one.
- 40. By David Planella
-
Added required packaging changes for the rename
- 41. By David Planella
-
Merged from previous packaging translation changes branch
- 42. By David Planella
-
Merged from trunk
- 43. By David Planella
-
Found out a better way to replace a package
Unmerged revisions
Preview Diff
1 | === renamed file 'ubuntu-calendar-app' => 'calendar-app' |
2 | --- ubuntu-calendar-app 2013-02-12 16:27:52 +0000 |
3 | +++ calendar-app 2013-06-12 18:16:24 +0000 |
4 | @@ -1,2 +1,2 @@ |
5 | #!/bin/bash |
6 | -qmlscene /usr/share/ubuntu-calendar-app/calendar.qml |
7 | +qmlscene /usr/share/calendar-app/calendar.qml |
8 | |
9 | === renamed file 'ubuntu-calendar-app.desktop' => 'calendar-app.desktop' |
10 | --- ubuntu-calendar-app.desktop 2013-05-15 09:23:44 +0000 |
11 | +++ calendar-app.desktop 2013-06-12 18:16:24 +0000 |
12 | @@ -3,9 +3,9 @@ |
13 | Version=1.0 |
14 | Type=Application |
15 | Terminal=false |
16 | -Exec=qmlscene /usr/share/ubuntu-calendar-app/calendar.qml |
17 | -Icon=/usr/share/ubuntu-calendar-app/calendar64.png |
18 | +Exec=qmlscene /usr/share/calendar-app/calendar.qml |
19 | +Icon=/usr/share/calendar-app/calendar64.png |
20 | Name=Calendar |
21 | X-Ubuntu-Touch=true |
22 | X-Ubuntu-StageHint=SideStage |
23 | -X-Ubuntu-Gettext-Domain=ubuntu-calendar-app |
24 | +X-Ubuntu-Gettext-Domain=calendar-app |
25 | |
26 | === renamed file 'calendar.qmlproject' => 'calendar-app.qmlproject' |
27 | === modified file 'calendar.qml' |
28 | --- calendar.qml 2013-06-10 11:00:05 +0000 |
29 | +++ calendar.qml 2013-06-12 18:16:24 +0000 |
30 | @@ -6,7 +6,7 @@ |
31 | id: mainView |
32 | |
33 | objectName: "calendar" |
34 | - applicationName: "ubuntu-calendar-app" |
35 | + applicationName: "calendar-app" |
36 | |
37 | width: units.gu(45) |
38 | height: units.gu(80) |
39 | |
40 | === renamed file 'debian/ubuntu-calendar-app-autopilot.install' => 'debian/calendar-app-autopilot.install' |
41 | --- debian/ubuntu-calendar-app-autopilot.install 2013-05-27 15:12:42 +0000 |
42 | +++ debian/calendar-app-autopilot.install 2013-06-12 18:16:24 +0000 |
43 | @@ -1,1 +1,1 @@ |
44 | -tests/autopilot/ubuntu_calendar_app/* usr/lib/python2.7/dist-packages/ubuntu_calendar_app/ |
45 | +tests/autopilot/calendar_app/* usr/lib/python2.7/dist-packages/calendar_app/ |
46 | |
47 | === renamed file 'debian/ubuntu-calendar-app.install' => 'debian/calendar-app.install' |
48 | --- debian/ubuntu-calendar-app.install 2013-04-11 19:47:11 +0000 |
49 | +++ debian/calendar-app.install 2013-06-12 18:16:24 +0000 |
50 | @@ -1,5 +1,5 @@ |
51 | -ubuntu-calendar-app usr/bin/ |
52 | -ubuntu-calendar-app.desktop usr/share/applications/ |
53 | -*.qml usr/share/ubuntu-calendar-app/ |
54 | -*.png usr/share/ubuntu-calendar-app/ |
55 | -*.js usr/share/ubuntu-calendar-app/ |
56 | +calendar-app usr/bin/ |
57 | +calendar-app.desktop usr/share/applications/ |
58 | +*.qml usr/share/calendar-app/ |
59 | +*.png usr/share/calendar-app/ |
60 | +*.js usr/share/calendar-app/ |
61 | |
62 | === modified file 'debian/changelog' |
63 | --- debian/changelog 2013-04-04 21:27:58 +0000 |
64 | +++ debian/changelog 2013-06-12 18:16:24 +0000 |
65 | @@ -1,3 +1,15 @@ |
66 | +calendar-app (0.4) raring; urgency=low |
67 | + |
68 | + * Renamed package |
69 | + |
70 | + -- David Planella <david.planella@ubuntu.com> Wed, 12 Jun 2013 17:25:52 +0200 |
71 | + |
72 | +ubuntu-calendar-app (0.3) raring; urgency=low |
73 | + |
74 | + * Updated packaging to install translations |
75 | + |
76 | + -- David Planella <david.planella@ubuntu.com> Tue, 28 May 2013 13:53:10 +0200 |
77 | + |
78 | ubuntu-calendar-app (0.2) raring; urgency=low |
79 | |
80 | * Changing the app name so it can be closed by the hud (LP: #1164130). |
81 | |
82 | === modified file 'debian/control' |
83 | --- debian/control 2013-05-27 15:12:42 +0000 |
84 | +++ debian/control 2013-06-12 18:16:24 +0000 |
85 | @@ -1,4 +1,4 @@ |
86 | -Source: ubuntu-calendar-app |
87 | +Source: calendar-app |
88 | Priority: extra |
89 | Maintainer: Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net> |
90 | Build-Depends: debhelper (>= 9), |
91 | @@ -7,7 +7,7 @@ |
92 | Homepage: https://launchpad.net/ubuntu-calendar-app |
93 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-calendar-dev/ubuntu-calendar-app/trunk |
94 | |
95 | -Package: ubuntu-calendar-app |
96 | +Package: calendar-app |
97 | Architecture: all |
98 | Depends: ${misc:Depends}, |
99 | qmlscene, |
100 | @@ -23,11 +23,11 @@ |
101 | a diary, a planner, a journal, a life log; and the calendar will behave how |
102 | you need it to. |
103 | |
104 | -Package: ubuntu-calendar-app-autopilot |
105 | +Package: calendar-app-autopilot |
106 | Architecture: all |
107 | Depends: libautopilot-qt, |
108 | libqt5test5, |
109 | - ubuntu-calendar-app (= ${source:Version}), |
110 | + calendar-app (= ${source:Version}), |
111 | Description: Autopilot tests for Ubuntu Calendar Application |
112 | This package contains autopilot tests for the Ubuntu Calendar application. |
113 | |
114 | |
115 | === modified file 'debian/copyright' |
116 | --- debian/copyright 2013-04-11 19:47:11 +0000 |
117 | +++ debian/copyright 2013-06-12 18:16:24 +0000 |
118 | @@ -1,5 +1,5 @@ |
119 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ |
120 | -Upstream-Name: ubuntu-calendar-app |
121 | +Upstream-Name: calendar-app |
122 | Source: https://launchpad.net/ubuntu-calendar-app |
123 | |
124 | Files: * |
125 | |
126 | === modified file 'debian/rules' |
127 | --- debian/rules 2013-04-11 19:47:11 +0000 |
128 | +++ debian/rules 2013-06-12 18:16:24 +0000 |
129 | @@ -9,3 +9,12 @@ |
130 | |
131 | override_dh_install: |
132 | dh_install --fail-missing |
133 | + appname=calendar-app; \ |
134 | + for pofile in $(shell find ./po -name "*.po"); do \ |
135 | + pofilename="$${pofile##*/}"; \ |
136 | + langcode="$${pofilename%.*}"; \ |
137 | + localedir="debian/$$appname/usr/share/locale/$$langcode/LC_MESSAGES"; \ |
138 | + mkdir -p $$localedir; \ |
139 | + mofile="$$localedir/$$appname.mo"; \ |
140 | + msgfmt -o $$mofile $$pofile; \ |
141 | + done |
142 | |
143 | === renamed file 'po/ubuntu-calendar-app.pot' => 'po/calendar-app.pot' |
144 | === renamed directory 'tests/autopilot/ubuntu_calendar_app' => 'tests/autopilot/calendar_app' |
145 | === modified file 'tests/autopilot/calendar_app/tests/__init__.py' |
146 | --- tests/autopilot/ubuntu_calendar_app/tests/__init__.py 2013-05-29 15:38:29 +0000 |
147 | +++ tests/autopilot/calendar_app/tests/__init__.py 2013-06-12 18:16:24 +0000 |
148 | @@ -15,7 +15,7 @@ |
149 | from autopilot.testcase import AutopilotTestCase |
150 | from testtools.matchers import Equals |
151 | |
152 | -from ubuntu_calendar_app.emulators.main_window import MainWindow |
153 | +from calendar_app.emulators.main_window import MainWindow |
154 | |
155 | |
156 | class CalendarTestCase(AutopilotTestCase): |
157 | @@ -48,8 +48,8 @@ |
158 | def launch_test_installed(self): |
159 | self.app = self.launch_test_application( |
160 | "qmlscene", |
161 | - "/usr/share/ubuntu-calendar-app/calendar.qml", |
162 | - "--desktop_file_hint=/usr/share/applications/ubuntu-calendar-app.desktop", |
163 | + "/usr/share/calendar-app/calendar.qml", |
164 | + "--desktop_file_hint=/usr/share/applications/calendar-app.desktop", |
165 | app_type='qt') |
166 | |
167 | def reveal_toolbar(self): |
168 | |
169 | === modified file 'tests/autopilot/calendar_app/tests/test_calendar.py' |
170 | --- tests/autopilot/ubuntu_calendar_app/tests/test_calendar.py 2013-05-29 16:38:15 +0000 |
171 | +++ tests/autopilot/calendar_app/tests/test_calendar.py 2013-06-12 18:16:24 +0000 |
172 | @@ -12,7 +12,7 @@ |
173 | from autopilot.matchers import Eventually |
174 | from testtools.matchers import Equals |
175 | |
176 | -from ubuntu_calendar_app.tests import CalendarTestCase |
177 | +from calendar_app.tests import CalendarTestCase |
178 | |
179 | |
180 | class TestMainWindow(CalendarTestCase): |
PASSED: Continuous integration, rev:37 91.189. 93.125: 8080/job/ ubuntu- calendar- app-ci/ 21/ 91.189. 93.125: 8080/job/ ubuntu- calendar- app-quantal- amd64-ci/ 6 91.189. 93.125: 8080/job/ ubuntu- calendar- app-raring- amd64-ci/ 21
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.125: 8080/job/ ubuntu- calendar- app-ci/ 21/rebuild
http://