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
=== modified file 'po/pantheon-greeter.pot'
--- po/pantheon-greeter.pot 2016-12-01 15:23:46 +0000
+++ po/pantheon-greeter.pot 2017-01-08 23:34:29 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2016-12-01 09:23-0600\n"11"POT-Creation-Date: 2017-01-08 21:30-0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,12 +17,14 @@
17"Content-Type: text/plain; charset=CHARSET\n"17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
1919
20#: ../src/LoginOptions/GuestLogin.vala:4120#. / Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
21msgid "Guest session"21#: ../src/TimeLabel.vala:53
22msgid "%A, %B %e"
22msgstr ""23msgstr ""
2324
24#: ../src/LoginOptions/ManualLogin.vala:3525#. / 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.
25msgid "Manual Login"26#: ../src/TimeLabel.vala:55
27msgid "%l:%M %p"
26msgstr ""28msgstr ""
2729
28#: ../src/FingerprintIndicatorArea.vala:11730#: ../src/FingerprintIndicatorArea.vala:117
@@ -41,21 +43,14 @@
41msgid "Center your finger and try again."43msgid "Center your finger and try again."
42msgstr ""44msgstr ""
4345
44#: ../src/PasswordArea.vala:34 ../src/LoginButtonArea.vala:2646#: ../src/LoginButtonArea.vala:26 ../src/PasswordArea.vala:34
45msgid "Log In"47msgid "Log In"
46msgstr ""48msgstr ""
4749
48#. / Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details50#: ../src/LoginOptions/GuestLogin.vala:41
49#: ../src/TimeLabel.vala:5951msgid "Guest session"
50msgid "%A, %B %e"52msgstr ""
51msgstr ""53
5254#: ../src/LoginOptions/ManualLogin.vala:35
53#. / Time display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details55msgid "Manual Login"
54#: ../src/TimeLabel.vala:61
55msgid "%l:%M"
56msgstr ""
57
58#. / 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.
59#: ../src/TimeLabel.vala:63
60msgid " %p"
61msgstr ""56msgstr ""
6257
=== modified file 'src/TimeLabel.vala'
--- src/TimeLabel.vala 2016-12-31 19:51:56 +0000
+++ src/TimeLabel.vala 2017-01-08 23:34:29 +0000
@@ -21,7 +21,6 @@
21public class TimeLabel : GtkClutter.Actor {21public class TimeLabel : GtkClutter.Actor {
22 private Gtk.Label date_label;22 private Gtk.Label date_label;
23 private Gtk.Label time_label;23 private Gtk.Label time_label;
24 private Gtk.Label pm_label;
2524
26 public TimeLabel () {25 public TimeLabel () {
27 update_time ();26 update_time ();
@@ -40,13 +39,8 @@
40 time_label = new Gtk.Label ("");39 time_label = new Gtk.Label ("");
41 time_label.get_style_context ().add_class ("time");40 time_label.get_style_context ().add_class ("time");
4241
43 pm_label = new Gtk.Label ("");
44 pm_label.get_style_context ().add_class ("time");
45 pm_label.get_style_context ().add_class ("pm");
46
47 layout.attach (date_label, 0, 0, 2, 1);42 layout.attach (date_label, 0, 0, 2, 1);
48 layout.attach (time_label, 0, 1, 1, 1);43 layout.attach (time_label, 0, 1, 1, 1);
49 layout.attach (pm_label, 1, 1, 1, 1);
50 layout.show_all ();44 layout.show_all ();
5145
52 container_widget.add (layout);46 container_widget.add (layout);
@@ -57,14 +51,11 @@
5751
58 /// Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details52 /// Date display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details
59 var day_format = _("%A, %B %e");53 var day_format = _("%A, %B %e");
60 /// Time display, see http://valadoc.org/#!api=glib-2.0/GLib.DateTime.format for more details54 /// 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.
61 var time_format = _("%l:%M");55 var time_format = _("%l:%M %p");
62 /// 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.
63 var meridiem_format = _(" %p");
6456
65 date_label.label = date.format (day_format);57 date_label.label = date.format (day_format);
66 time_label.label = date.format (time_format);58 time_label.label = date.format (time_format);
67 pm_label.label = date.format (meridiem_format);
68 return true;59 return true;
69 }60 }
70}61}

Subscribers

People subscribed via source and target branches