Merge lp:~nik90/ubuntu-clock-app/fix-translation-plural-forms into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: David Planella
Approved revision: 219
Merged at revision: 219
Proposed branch: lp:~nik90/ubuntu-clock-app/fix-translation-plural-forms
Merge into: lp:ubuntu-clock-app
Diff against target: 108 lines (+19/-15)
3 files modified
app/alarm/AlarmSettingsPage.qml (+10/-10)
debian/changelog (+2/-1)
po/com.ubuntu.clock.pot (+7/-4)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/fix-translation-plural-forms
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+252838@code.launchpad.net

Commit message

- Added plural translation forms to strings in the AlarmSettings.qml file.
- Updated pot file to also include the corrected city name "Simferopol" that was missed in rev 212.

Description of the change

- Added plural translation forms to strings in the AlarmSettings.qml file.
- Updated pot file to also include the corrected city name "Simferopol" that was missed in rev 212.

To post a comment you must log in.
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, just added two notes.

review: Approve
Revision history for this message
Phillip Sz (phillip-sz) wrote :

thanks a lot!

Revision history for this message
SirVer (sirver) wrote :

Sorry to interject in this code review, but the Widelands team is currently investigating using test bots on Launchpad that check pull requests. Your team seem to have managed to do that, could you share some insights/configuration hints/documentation about the process? Are you using a self-hosted build bot or are you integrating with something like travis?

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

We're using Jenkins which is hosted by the Canonical team which essentially runs the necessary autopilot and qml unit tests to check for any regressions. This infrastructure was set up by the canonical team and as such I do not have much knowledge about its documentation. I would recommend coming by the #ubuntu-app-devel or #ubuntu-touch and contacting popey, dpm or fginther for more information.

Revision history for this message
SirVer (sirver) wrote :

Nik, thanks for your information. I forgot to set notifications for this merge request so I didn't see it till now. Much appreciated.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmSettingsPage.qml'
2--- app/alarm/AlarmSettingsPage.qml 2014-10-16 19:03:51 +0000
3+++ app/alarm/AlarmSettingsPage.qml 2015-03-12 23:25:02 +0000
4@@ -50,10 +50,10 @@
5 Component.onCompleted: initialise()
6
7 function initialise() {
8- durationModel.append({ "duration": 10, "text": i18n.tr("%1 minutes").arg(10) })
9- durationModel.append({ "duration": 20, "text": i18n.tr("%1 minutes").arg(20) })
10- durationModel.append({ "duration": 30, "text": i18n.tr("%1 minutes").arg(30) })
11- durationModel.append({ "duration": 60, "text": i18n.tr("%1 minutes").arg(60) })
12+ durationModel.append({ "duration": 10, "text": i18n.tr("%1 minute", "%1 minutes", 10).arg(10) })
13+ durationModel.append({ "duration": 20, "text": i18n.tr("%1 minute", "%1 minutes", 20).arg(20) })
14+ durationModel.append({ "duration": 30, "text": i18n.tr("%1 minute", "%1 minutes", 30).arg(30) })
15+ durationModel.append({ "duration": 60, "text": i18n.tr("%1 minute", "%1 minutes", 60).arg(60) })
16 }
17 }
18
19@@ -62,10 +62,10 @@
20 Component.onCompleted: initialise()
21
22 function initialise() {
23- snoozeModel.append({ "duration": 2, "text": i18n.tr("%1 minutes").arg(2) })
24- snoozeModel.append({ "duration": 4, "text": i18n.tr("%1 minutes").arg(4) })
25- snoozeModel.append({ "duration": 5, "text": i18n.tr("%1 minutes").arg(5) })
26- snoozeModel.append({ "duration": 10, "text": i18n.tr("%1 minutes").arg(10) })
27+ snoozeModel.append({ "duration": 2, "text": i18n.tr("%1 minute", "%1 minutes", 2).arg(2) })
28+ snoozeModel.append({ "duration": 4, "text": i18n.tr("%1 minute", "%1 minutes", 4).arg(4) })
29+ snoozeModel.append({ "duration": 5, "text": i18n.tr("%1 minute", "%1 minutes", 5).arg(5) })
30+ snoozeModel.append({ "duration": 10, "text": i18n.tr("%1 minute", "%1 minutes", 10).arg(10) })
31 }
32 }
33
34@@ -143,7 +143,7 @@
35 SubtitledListItem {
36 id: _header
37 text: i18n.tr("Silence after")
38- subText: i18n.tr("%1 minutes").arg(alarmSettings.duration)
39+ subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
40 onClicked: _alarmDuration.expanded = true
41
42 Icon {
43@@ -212,7 +212,7 @@
44 SubtitledListItem {
45 id: _snoozeHeader
46 text: i18n.tr("Snooze for")
47- subText: i18n.tr("%1 minutes").arg(alarmSettings.snoozeDuration)
48+ subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
49 onClicked: _alarmSnooze.expanded = true
50
51 Icon {
52
53=== modified file 'debian/changelog'
54--- debian/changelog 2015-03-06 17:12:24 +0000
55+++ debian/changelog 2015-03-12 23:25:02 +0000
56@@ -10,7 +10,8 @@
57 * Fixed predefined cities and countries not being translatable in the timezone
58 selection dialog (LP: #1354466)
59 * Fixed empty state description not wrapping (LP: #1428165)
60- * Fixed edit alarm crash issue in vivid (thanks to Zsombor)
61+ * Fixed edit alarm crash issue in vivid (thanks to Zsombor) (LP: #1429273)
62+ * Fixed strings not following gettext-style plural forms. (LP: #1431446)
63
64 [Brendan Donegan]
65 * Fixed AP failure by waiting for the bottom edge tip visible property to be true
66
67=== modified file 'po/com.ubuntu.clock.pot'
68--- po/com.ubuntu.clock.pot 2015-03-06 17:11:42 +0000
69+++ po/com.ubuntu.clock.pot 2015-03-12 23:25:02 +0000
70@@ -8,7 +8,7 @@
71 msgstr ""
72 "Project-Id-Version: \n"
73 "Report-Msgid-Bugs-To: \n"
74-"POT-Creation-Date: 2015-03-06 17:09+0000\n"
75+"POT-Creation-Date: 2015-03-13 00:18+0100\n"
76 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
77 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
78 "Language-Team: LANGUAGE <LL@li.org>\n"
79@@ -16,6 +16,7 @@
80 "MIME-Version: 1.0\n"
81 "Content-Type: text/plain; charset=UTF-8\n"
82 "Content-Transfer-Encoding: 8bit\n"
83+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
84
85 #: ../app/alarm/AlarmLabel.qml:30 ../app/alarm/AlarmLabel.qml:56
86 #: ../app/alarm/EditAlarmPage.qml:291
87@@ -71,8 +72,10 @@
88 #: ../app/alarm/AlarmSettingsPage.qml:146
89 #: ../app/alarm/AlarmSettingsPage.qml:215
90 #, qt-format
91-msgid "%1 minutes"
92-msgstr ""
93+msgid "%1 minute"
94+msgid_plural "%1 minutes"
95+msgstr[0] ""
96+msgstr[1] ""
97
98 #: ../app/alarm/AlarmSettingsPage.qml:92
99 msgid "Alarm volume"
100@@ -1786,7 +1789,7 @@
101 msgstr ""
102
103 #: ../backend/modules/Timezone/statictimezonemodel.cpp:306
104-msgid "Simferopol’"
105+msgid "Simferopol"
106 msgstr ""
107
108 #: ../backend/modules/Timezone/statictimezonemodel.cpp:307

Subscribers

People subscribed via source and target branches