Merge lp:~leonardolemos/switchboard-plug-parental-controls/fix-1605981 into lp:~elementary-pantheon/switchboard-plug-parental-controls/trunk

Proposed by Leonardo Lemos
Status: Merged
Approved by: Danielle Foré
Approved revision: 205
Merged at revision: 205
Proposed branch: lp:~leonardolemos/switchboard-plug-parental-controls/fix-1605981
Merge into: lp:~elementary-pantheon/switchboard-plug-parental-controls/trunk
Diff against target: 191 lines (+50/-53)
2 files modified
po/pantheon-parental-controls-plug.pot (+44/-47)
src/client/Client.vala (+6/-6)
To merge this branch: bzr merge lp:~leonardolemos/switchboard-plug-parental-controls/fix-1605981
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+301583@code.launchpad.net

Commit message

* Fix strings plural form.
* Update translation template.

Description of the change

This branch fixes the strings plural form implementation, as described by the bug lp:1605981

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/pantheon-parental-controls-plug.pot'
2--- po/pantheon-parental-controls-plug.pot 2016-07-29 22:19:28 +0000
3+++ po/pantheon-parental-controls-plug.pot 2016-07-31 00:21:08 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: PACKAGE VERSION\n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2016-07-29 15:18-0700\n"
9+"POT-Creation-Date: 2016-07-30 21:16-0300\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -16,6 +16,7 @@
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
18
19 #. //launchpad.net/switchboard-plug-parental-controls)
20 #. *
21@@ -44,16 +45,8 @@
22 msgid "Authentication is required to change parental control settings"
23 msgstr ""
24
25-#: ../src/Widgets/ControlPage.vala:74
26-msgid "General"
27-msgstr ""
28-
29-#: ../src/Widgets/ControlPage.vala:75
30-msgid "Internet"
31-msgstr ""
32-
33-#: ../src/Widgets/ControlPage.vala:76
34-msgid "Applications"
35+#: ../src/Widgets/AppChooser.vala:71
36+msgid "Search Applications"
37 msgstr ""
38
39 #: ../src/Widgets/UserList.vala:42
40@@ -64,30 +57,6 @@
41 msgid "Other Accounts"
42 msgstr ""
43
44-#: ../src/Widgets/WeekSpinBox.vala:44
45-msgid "From:"
46-msgstr ""
47-
48-#: ../src/Widgets/WeekSpinBox.vala:46
49-msgid "To:"
50-msgstr ""
51-
52-#: ../src/Widgets/InternetBox.vala:78
53-msgid "Prevent %s from visiting these websites:"
54-msgstr ""
55-
56-#: ../src/Widgets/InternetBox.vala:91
57-msgid "Add URL"
58-msgstr ""
59-
60-#: ../src/Widgets/InternetBox.vala:100
61-msgid "Add a new URL, for example: google.com"
62-msgstr ""
63-
64-#: ../src/Widgets/InternetBox.vala:101
65-msgid "Invalid URL"
66-msgstr ""
67-
68 #: ../src/Widgets/GeneralBox.vala:62
69 msgid "Allow this user to:"
70 msgstr ""
71@@ -124,8 +93,24 @@
72 msgid "Weekends"
73 msgstr ""
74
75-#: ../src/Widgets/AppChooser.vala:71
76-msgid "Search Applications"
77+#: ../src/Widgets/WeekSpinBox.vala:44
78+msgid "From:"
79+msgstr ""
80+
81+#: ../src/Widgets/WeekSpinBox.vala:46
82+msgid "To:"
83+msgstr ""
84+
85+#: ../src/Widgets/ControlPage.vala:74
86+msgid "General"
87+msgstr ""
88+
89+#: ../src/Widgets/ControlPage.vala:75
90+msgid "Internet"
91+msgstr ""
92+
93+#: ../src/Widgets/ControlPage.vala:76
94+msgid "Applications"
95 msgstr ""
96
97 #: ../src/Widgets/AppsBox.vala:97
98@@ -148,6 +133,22 @@
99 msgid "Allow access to these apps with admin permission:"
100 msgstr ""
101
102+#: ../src/Widgets/InternetBox.vala:78
103+msgid "Prevent %s from visiting these websites:"
104+msgstr ""
105+
106+#: ../src/Widgets/InternetBox.vala:91
107+msgid "Add URL"
108+msgstr ""
109+
110+#: ../src/Widgets/InternetBox.vala:100
111+msgid "Add a new URL, for example: google.com"
112+msgstr ""
113+
114+#: ../src/Widgets/InternetBox.vala:101
115+msgid "Invalid URL"
116+msgstr ""
117+
118 #: ../src/Plug.vala:72
119 msgid "Some settings require administrator rights to be changed"
120 msgstr ""
121@@ -187,19 +188,15 @@
122
123 #: ../src/client/Client.vala:129
124 msgid "%ld hour"
125-msgstr ""
126-
127-#: ../src/client/Client.vala:129
128-msgid "%ld hours"
129-msgstr ""
130+msgid_plural "%ld hours"
131+msgstr[0] ""
132+msgstr[1] ""
133
134 #: ../src/client/Client.vala:133
135 msgid "%ld minute"
136-msgstr ""
137-
138-#: ../src/client/Client.vala:133
139-msgid "%ld minutes"
140-msgstr ""
141+msgid_plural "%ld minutes"
142+msgstr[0] ""
143+msgstr[1] ""
144
145 #: ../src/client/Client.vala:136
146 msgid "This computer will lock after %s %s. %s"
147
148=== modified file 'src/client/Client.vala'
149--- src/client/Client.vala 2016-02-25 18:47:22 +0000
150+++ src/client/Client.vala 2016-07-31 00:21:08 +0000
151@@ -64,7 +64,7 @@
152
153 private void on_show_app_lock_dialog () {
154 var app_lock_dialog = new AppLock.AppLockDialog ();
155- app_lock_dialog.show_all ();
156+ app_lock_dialog.show_all ();
157 }
158
159 private void on_authorize (string user_name, string action_id) {
160@@ -93,7 +93,7 @@
161 warning ("%s\n", e.message);
162 }
163 }
164- });
165+ });
166 }
167
168 private void on_launch (string[] args) {
169@@ -126,12 +126,12 @@
170 }
171
172 if (hours > 0) {
173- hours_str = ngettext (_("%ld hour"), _("%ld hours"), (ulong)hours).printf ((ulong)hours);
174+ hours_str = ngettext ("%ld hour", "%ld hours", (ulong)hours).printf ((ulong)hours);
175 }
176
177 if (minutes > 0) {
178- minutes_str = ngettext (_("%ld minute"), _("%ld minutes"), (ulong)minutes).printf ((ulong)minutes);
179- }
180+ minutes_str = ngettext ("%ld minute", "%ld minutes", (ulong)minutes).printf ((ulong)minutes);
181+ }
182
183 string body = _("This computer will lock after %s %s. %s".printf (hours_str, minutes_str, info));
184
185@@ -143,4 +143,4 @@
186 send_notification (null, notification);
187 }
188 }
189- }
190\ No newline at end of file
191+ }

Subscribers

People subscribed via source and target branches