Merge lp:~rpadovani/ubuntu-clock-app/1362093 into lp:ubuntu-clock-app

Proposed by Riccardo Padovani
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 79
Merged at revision: 82
Proposed branch: lp:~rpadovani/ubuntu-clock-app/1362093
Merge into: lp:ubuntu-clock-app
Diff against target: 215 lines (+41/-63)
6 files modified
README.translations (+1/-1)
app/worldclock/UserWorldCityDelegate.qml (+9/-23)
backend/modules/Timezone/timezonemodel.cpp (+1/-4)
backend/modules/Timezone/timezonemodel.h (+0/-1)
debian/changelog (+4/-0)
po/com.ubuntu.clock.pot (+26/-34)
To merge this branch: bzr merge lp:~rpadovani/ubuntu-clock-app/1362093
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Nekhelesh Ramananthan Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+233069@code.launchpad.net

Commit message

Changed design for world clock - fixed bug #1362093

Description of the change

Changed design for world clock - fixed bug #1362093

To post a comment you must log in.
77. By Riccardo Padovani

Updated debian/changelog

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

I sent a screenshot of this MP to the designers who proposed the following change,

- Change the time string to "3h 20m ahead" instead of "3 h 20 m ahead"
- It would be nice to make the "h" and "m" to be FontWeight Medium instead of light.

Otherwise it looks good.

review: Needs Fixing
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
78. By Riccardo Padovani

modified hours formattation

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
79. By Riccardo Padovani

merged from trunk and resolved conflicts

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
Nekhelesh Ramananthan (nik90) wrote :

lgtm!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.translations'
2--- README.translations 2014-08-13 05:07:39 +0000
3+++ README.translations 2014-09-04 21:13:06 +0000
4@@ -1,6 +1,6 @@
5 # Updating translations
6
7-Translations for the Music app happen in [Launchpad Translations][] and
8+Translations for the Clock app happen in [Launchpad Translations][] and
9 are automatically committed daily on the trunk branch in the po/ folder.
10
11 They are then built and installed as part of the package build, so that
12
13=== modified file 'app/worldclock/UserWorldCityDelegate.qml'
14--- app/worldclock/UserWorldCityDelegate.qml 2014-08-24 12:47:50 +0000
15+++ app/worldclock/UserWorldCityDelegate.qml 2014-09-04 21:13:06 +0000
16@@ -135,18 +135,6 @@
17 text: {
18 var day;
19
20- if(model.daysTo === 0) {
21- day = i18n.tr("Today")
22- }
23-
24- else if(model.daysTo === 1) {
25- day = i18n.tr("Tomorrow")
26- }
27-
28- else if(model.daysTo === -1) {
29- day = i18n.tr("Yesterday")
30- }
31-
32 // TRANSLATORS: this indicates if the time in a world clock
33 // is behind or ahead of the time at the current location
34 var isBehind = model.timeTo > 0 ? i18n.tr("behind")
35@@ -157,35 +145,33 @@
36 var hour = timediff[0]
37
38 if(hour > 0 && minute > 0) {
39- // TRANSLATORS: the first argument is a day, followed by hour, minute and the
40- // translation for either 'behind' or 'ahead'
41- return (i18n.tr("%1\n%2 h %3 m %4"))
42- .arg(day)
43+ // TRANSLATORS: the first argument is hour, followed by
44+ // minute, and the translation for either 'behind' or
45+ // 'ahead'
46+ return (i18n.tr("%1h %2m %3"))
47 .arg(hour)
48 .arg(minute)
49 .arg(isBehind)
50 }
51
52 else if(hour > 0 && minute === 0) {
53- // TRANSLATORS: the first argument is a day, followed by hour and the
54+ // TRANSLATORS: the first argument is hour, followed by the
55 // translation for either 'behind' or 'ahead'
56- return (i18n.tr("%1\n%2 h %3"))
57- .arg(day)
58+ return (i18n.tr("%1h %2"))
59 .arg(hour)
60 .arg(isBehind)
61 }
62
63 else if(hour === 0 && minute > 0) {
64- // TRANSLATORS: the first argument is a day, followed by minute and the
65+ // TRANSLATORS: the first argument is minute, followed by the
66 // translation for either 'behind' or 'ahead'
67- return ("%1\n%2 m %3")
68- .arg(day)
69+ return (i18n.tr("%1m %2"))
70 .arg(minute)
71 .arg(isBehind)
72 }
73
74 else {
75- return i18n.tr("No Time Difference")
76+ return i18n.tr("Same time")
77 }
78 }
79 }
80
81=== modified file 'backend/modules/Timezone/timezonemodel.cpp'
82--- backend/modules/Timezone/timezonemodel.cpp 2014-08-16 12:46:46 +0000
83+++ backend/modules/Timezone/timezonemodel.cpp 2014-09-04 21:13:06 +0000
84@@ -86,8 +86,6 @@
85 is fixed, we will have to return a string.
86 */
87 return worldCityTime.toString("hh:mm");
88- case RoleDaysTo:
89- return currentDateTime.daysTo(worldCityTime);
90 case RoleTimeTo:
91 /*
92 FIXME: Workaround for currentDateTime.secsTo(worldCityTime) which returns
93@@ -110,7 +108,6 @@
94 roles.insert(RoleCountryName, "country");
95 roles.insert(RoleTimeZoneId, "timezoneID");
96 roles.insert(RoleTimeString, "localTime");
97- roles.insert(RoleDaysTo, "daysTo");
98 roles.insert(RoleTimeTo, "timeTo");
99 return roles;
100 }
101@@ -148,7 +145,7 @@
102 QModelIndex startIndex = index(0);
103 QModelIndex endIndex = index(m_timeZones.count() - 1);
104 QVector<int> roles;
105- roles << RoleTimeString << RoleDaysTo << RoleTimeTo;
106+ roles << RoleTimeString << RoleTimeTo;
107 emit dataChanged(startIndex, endIndex, roles);
108 }
109
110
111=== modified file 'backend/modules/Timezone/timezonemodel.h'
112--- backend/modules/Timezone/timezonemodel.h 2014-08-16 12:46:46 +0000
113+++ backend/modules/Timezone/timezonemodel.h 2014-09-04 21:13:06 +0000
114@@ -53,7 +53,6 @@
115 RoleCountryName,
116 RoleTimeZoneId,
117 RoleTimeString,
118- RoleDaysTo,
119 RoleTimeTo,
120 };
121
122
123=== modified file 'debian/changelog'
124--- debian/changelog 2014-09-04 20:21:00 +0000
125+++ debian/changelog 2014-09-04 21:13:06 +0000
126@@ -34,6 +34,10 @@
127 [David Planella]
128 * Added internationalization support (LP: #1354522)
129
130+ [Riccardo Padovani]
131+ * Removed 'Today/Tomorow/Yesterday' text string from world clock, replaced
132+ 'No time difference' with 'Same time' (LP: #1362093)
133+
134 -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Wed, 13 Aug 2014 15:46:12 +0200
135
136 ubuntu-clock-app (3.0-0ubuntu1) utopic; urgency=medium
137
138=== modified file 'po/com.ubuntu.clock.pot'
139--- po/com.ubuntu.clock.pot 2014-09-02 15:13:45 +0000
140+++ po/com.ubuntu.clock.pot 2014-09-04 21:13:06 +0000
141@@ -125,48 +125,40 @@
142 msgid "City"
143 msgstr ""
144
145-#: ../app/worldclock/UserWorldCityDelegate.qml:139
146-msgid "Today"
147-msgstr ""
148-
149-#: ../app/worldclock/UserWorldCityDelegate.qml:143
150-msgid "Tomorrow"
151-msgstr ""
152-
153-#: ../app/worldclock/UserWorldCityDelegate.qml:147
154-msgid "Yesterday"
155-msgstr ""
156-
157 #. TRANSLATORS: this indicates if the time in a world clock
158 #. is behind or ahead of the time at the current location
159-#: ../app/worldclock/UserWorldCityDelegate.qml:152
160+#: ../app/worldclock/UserWorldCityDelegate.qml:140
161 msgid "behind"
162 msgstr ""
163
164-#: ../app/worldclock/UserWorldCityDelegate.qml:153
165+#: ../app/worldclock/UserWorldCityDelegate.qml:141
166 msgid "ahead"
167 msgstr ""
168
169-#. TRANSLATORS: the first argument is a day, followed by hour, minute and the
170-#. translation for either 'behind' or 'ahead'
171-#: ../app/worldclock/UserWorldCityDelegate.qml:162
172-#, qt-format
173-msgid ""
174-"%1\n"
175-"%2 h %3 m %4"
176-msgstr ""
177-
178-#. TRANSLATORS: the first argument is a day, followed by hour and the
179-#. translation for either 'behind' or 'ahead'
180-#: ../app/worldclock/UserWorldCityDelegate.qml:172
181-#, qt-format
182-msgid ""
183-"%1\n"
184-"%2 h %3"
185-msgstr ""
186-
187-#: ../app/worldclock/UserWorldCityDelegate.qml:188
188-msgid "No Time Difference"
189+#. TRANSLATORS: the first argument is hour, followed by
190+#. minute, and the translation for either 'behind' or
191+#. 'ahead'
192+#: ../app/worldclock/UserWorldCityDelegate.qml:151
193+#, qt-format
194+msgid "%1 h %2 m %3"
195+msgstr ""
196+
197+#. TRANSLATORS: the first argument is hour, followed by the
198+#. translation for either 'behind' or 'ahead'
199+#: ../app/worldclock/UserWorldCityDelegate.qml:160
200+#, qt-format
201+msgid "%1 h %2"
202+msgstr ""
203+
204+#. TRANSLATORS: the first argument is minute, followed by the
205+#. translation for either 'behind' or 'ahead'
206+#: ../app/worldclock/UserWorldCityDelegate.qml:168
207+#, qt-format
208+msgid "%1 m %2"
209+msgstr ""
210+
211+#: ../app/worldclock/UserWorldCityDelegate.qml:174
212+msgid "Same time"
213 msgstr ""
214
215 #: ../app/worldclock/WorldCityList.qml:40

Subscribers

People subscribed via source and target branches