Merge lp:~leonardolemos/pantheon-greeter/fix-1624217 into lp:~elementary-pantheon/pantheon-greeter/trunk

Proposed by Leonardo Lemos
Status: Work in progress
Proposed branch: lp:~leonardolemos/pantheon-greeter/fix-1624217
Merge into: lp:~elementary-pantheon/pantheon-greeter/trunk
Diff against target: 103 lines (+16/-30)
2 files modified
po/pantheon-greeter.pot (+14/-19)
src/TimeLabel.vala (+2/-11)
To merge this branch: bzr merge lp:~leonardolemos/pantheon-greeter/fix-1624217
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+314298@code.launchpad.net

Commit message

* Remove AM/PM label;
* Move AM/PM label content to Time label;
* Update translation template.

Description of the change

This branch removes the AM/PM label and moves that label content to time's label to introduce a better translation and internationalization support.

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

there's a problem here because we're using style classes for the AM/PM label. So we'll have to figure out how we're going to handle those styles

Unmerged revisions

521. By Leonardo Lemos

Update translation template

520. By Leonardo Lemos

Remove pm label; Move pm label content to time label

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/pantheon-greeter.pot'
2--- po/pantheon-greeter.pot 2016-12-01 15:23:46 +0000
3+++ po/pantheon-greeter.pot 2017-01-08 23:34:29 +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-12-01 09:23-0600\n"
9+"POT-Creation-Date: 2017-01-08 21:30-0200\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@@ -17,12 +17,14 @@
14 "Content-Type: text/plain; charset=CHARSET\n"
15 "Content-Transfer-Encoding: 8bit\n"
16
17-#: ../src/LoginOptions/GuestLogin.vala:41
18-msgid "Guest session"
19+#. / Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
20+#: ../src/TimeLabel.vala:53
21+msgid "%A, %B %e"
22 msgstr ""
23
24-#: ../src/LoginOptions/ManualLogin.vala:35
25-msgid "Manual Login"
26+#. / Time display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details. If you translate in a language that has no equivalent for AM/PM, keep the '%p' string.
27+#: ../src/TimeLabel.vala:55
28+msgid "%l:%M %p"
29 msgstr ""
30
31 #: ../src/FingerprintIndicatorArea.vala:117
32@@ -41,21 +43,14 @@
33 msgid "Center your finger and try again."
34 msgstr ""
35
36-#: ../src/PasswordArea.vala:34 ../src/LoginButtonArea.vala:26
37+#: ../src/LoginButtonArea.vala:26 ../src/PasswordArea.vala:34
38 msgid "Log In"
39 msgstr ""
40
41-#. / Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
42-#: ../src/TimeLabel.vala:59
43-msgid "%A, %B %e"
44-msgstr ""
45-
46-#. / Time display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
47-#: ../src/TimeLabel.vala:61
48-msgid "%l:%M"
49-msgstr ""
50-
51-#. / AM/PM display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details. If you translate in a language that has no equivalent for AM/PM, keep the original english string.
52-#: ../src/TimeLabel.vala:63
53-msgid " %p"
54+#: ../src/LoginOptions/GuestLogin.vala:41
55+msgid "Guest session"
56+msgstr ""
57+
58+#: ../src/LoginOptions/ManualLogin.vala:35
59+msgid "Manual Login"
60 msgstr ""
61
62=== modified file 'src/TimeLabel.vala'
63--- src/TimeLabel.vala 2016-12-31 19:51:56 +0000
64+++ src/TimeLabel.vala 2017-01-08 23:34:29 +0000
65@@ -21,7 +21,6 @@
66 public class TimeLabel : GtkClutter.Actor {
67 private Gtk.Label date_label;
68 private Gtk.Label time_label;
69- private Gtk.Label pm_label;
70
71 public TimeLabel () {
72 update_time ();
73@@ -40,13 +39,8 @@
74 time_label = new Gtk.Label ("");
75 time_label.get_style_context ().add_class ("time");
76
77- pm_label = new Gtk.Label ("");
78- pm_label.get_style_context ().add_class ("time");
79- pm_label.get_style_context ().add_class ("pm");
80-
81 layout.attach (date_label, 0, 0, 2, 1);
82 layout.attach (time_label, 0, 1, 1, 1);
83- layout.attach (pm_label, 1, 1, 1, 1);
84 layout.show_all ();
85
86 container_widget.add (layout);
87@@ -57,14 +51,11 @@
88
89 /// Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
90 var day_format = _("%A, %B %e");
91- /// Time display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
92- var time_format = _("%l:%M");
93- /// AM/PM display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details. If you translate in a language that has no equivalent for AM/PM, keep the original english string.
94- var meridiem_format = _(" %p");
95+ /// Time display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details. If you translate in a language that has no equivalent for AM/PM, keep the '%p' string.
96+ var time_format = _("%l:%M %p");
97
98 date_label.label = date.format (day_format);
99 time_label.label = date.format (time_format);
100- pm_label.label = date.format (meridiem_format);
101 return true;
102 }
103 }

Subscribers

People subscribed via source and target branches