Merge lp:~nik90/podbird/fix-translation into lp:podbird

Proposed by Nekhelesh Ramananthan
Status: Merged
Merged at revision: 33
Proposed branch: lp:~nik90/podbird/fix-translation
Merge into: lp:podbird
Diff against target: 77 lines (+17/-8)
2 files modified
app/ui/EpisodesPage.qml (+9/-0)
po/com.mikeasoft.podbird.pot (+8/-8)
To merge this branch: bzr merge lp:~nik90/podbird/fix-translation
Reviewer Review Type Date Requested Status
David Planella (community) Approve
Michael Sheldon Pending
Review via email: mp+254233@code.launchpad.net

Commit message

Fixes the translation issue related to "%1m% string by specifying the no-c-format.

Description of the change

After the request by dpm to translate podbird, it seems there was a issue found by one of translators as pointed out at [1]. I had the same exact issue with clock app and fixed it by adding the translator comment //xgettext: no-c-format to fix it.

This should fix the issue in podbird as well.

[1] https://lists.ubuntu.com/archives/ubuntu-translators/2015-March/006817.html

To post a comment you must log in.
Revision history for this message
David Planella (dpm) wrote :

Looks good to me, IIRC we used the same fix for clock. The only thing I'd say is to leave a space between // and xgettext.

review: Approve
lp:~nik90/podbird/fix-translation updated
34. By Nekhelesh Ramananthan

Added space between // and xgettext as mentioned by dpm

35. By Nekhelesh Ramananthan

Commited the actual file changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/ui/EpisodesPage.qml'
2--- app/ui/EpisodesPage.qml 2015-03-01 20:54:58 +0000
3+++ app/ui/EpisodesPage.qml 2015-03-26 12:12:23 +0000
4@@ -288,18 +288,27 @@
5 var time = Podcasts.getTimeDiff(seconds)
6 var hour = time[0]
7 var minute = time[1]
8+ // TRANSLATORS: the first argument is the number of hours,
9+ // followed by minute (eg. 20h 3m)
10 if(hour > 0 && minute > 0) {
11+ // xgettext: no-c-format
12 return (i18n.tr("%1h %2m"))
13 .arg(hour)
14 .arg(minute)
15 }
16
17+ // TRANSLATORS: this string indicates the number of hours
18+ // eg. 20h (no plural state required)
19 else if(hour > 0 && minute === 0) {
20+ // xgettext: no-c-format
21 return (i18n.tr("%1h"))
22 .arg(hour)
23 }
24
25+ // TRANSLATORS: this string indicates the number of minutes
26+ // eg. 15m (no plural state required)
27 else if(hour === 0 && minute > 0) {
28+ // xgettext: no-c-format
29 return (i18n.tr("%1m"))
30 .arg(minute)
31 }
32
33=== modified file 'po/com.mikeasoft.podbird.pot'
34--- po/com.mikeasoft.podbird.pot 2015-03-01 21:27:01 +0000
35+++ po/com.mikeasoft.podbird.pot 2015-03-26 12:12:23 +0000
36@@ -8,7 +8,7 @@
37 msgstr ""
38 "Project-Id-Version: \n"
39 "Report-Msgid-Bugs-To: \n"
40-"POT-Creation-Date: 2015-03-01 21:21+0000\n"
41+"POT-Creation-Date: 2015-03-26 13:11+0100\n"
42 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
43 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
44 "Language-Team: LANGUAGE <LL@li.org>\n"
45@@ -64,18 +64,18 @@
46 msgid "No episodes found matching the search term."
47 msgstr ""
48
49-#: ../app/ui/EpisodesPage.qml:292
50-#, qt-format
51+#: ../app/ui/EpisodesPage.qml:295
52+#, no-c-format, qt-format
53 msgid "%1h %2m"
54 msgstr ""
55
56-#: ../app/ui/EpisodesPage.qml:298
57-#, qt-format
58+#: ../app/ui/EpisodesPage.qml:304
59+#, no-c-format, qt-format
60 msgid "%1h"
61 msgstr ""
62
63-#: ../app/ui/EpisodesPage.qml:303
64-#, c-format, qt-format
65+#: ../app/ui/EpisodesPage.qml:312
66+#, no-c-format, qt-format
67 msgid "%1m"
68 msgstr ""
69
70@@ -164,6 +164,6 @@
71 msgid "Subscribe"
72 msgstr ""
73
74-#: /home/mike/src/build-podbird-Ubuntu_Device3_GCC_armhf_ubuntu_sdk_14_10_utopic-Default/po/Podbird.desktop.in.h:1
75+#: /home/krnekhelesh/Documents/Ubuntu-Projects/MP-Reviews/builddir/build-fix-translation-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-Default/po/Podbird.desktop.in.h:1
76 msgid "Podbird"
77 msgstr ""

Subscribers

People subscribed via source and target branches