Merge lp:~seb128/unity-control-center/user-accounts-translatable into lp:unity-control-center

Proposed by Sebastien Bacher
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 12769
Merged at revision: 12773
Proposed branch: lp:~seb128/unity-control-center/user-accounts-translatable
Merge into: lp:unity-control-center
Diff against target: 100 lines (+30/-12)
3 files modified
panels/user-accounts/um-history-dialog.c (+20/-8)
panels/user-accounts/um-user-panel.c (+6/-2)
panels/user-accounts/um-utils.c (+4/-2)
To merge this branch: bzr merge lp:~seb128/unity-control-center/user-accounts-translatable
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+214247@code.launchpad.net

Commit message

user-accounts: Mark some strings as translatable

Description of the change

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'panels/user-accounts/um-history-dialog.c'
--- panels/user-accounts/um-history-dialog.c 2014-03-12 17:32:51 +0000
+++ panels/user-accounts/um-history-dialog.c 2014-04-04 13:48:39 +0000
@@ -92,15 +92,23 @@
92 }92 }
93 else {93 else {
94 date = g_date_time_add_days (um->week, 6);94 date = g_date_time_add_days (um->week, 6);
95 from = g_date_time_format (um->week, "%b %e");95 /* Translators: This is a date format string in the style of "Feb 18",
96 shown as the first day of a week on login history dialog. */
97 from = g_date_time_format (um->week, C_("login history week label","%b %e"));
96 if (g_date_time_get_year (um->week) == g_date_time_get_year (um->current_week)) {98 if (g_date_time_get_year (um->week) == g_date_time_get_year (um->current_week)) {
97 to = g_date_time_format (date, "%b %e");99 /* Translators: This is a date format string in the style of "Feb 24",
100 shown as the last day of a week on login history dialog. */
101 to = g_date_time_format (date, C_("login history week label","%b %e"));
98 }102 }
99 else {103 else {
100 to = g_date_time_format (date, "%b %e, %Y");104 /* Translators: This is a date format string in the style of "Feb 24, 2013",
105 shown as the last day of a week on login history dialog. */
106 to = g_date_time_format (date, C_("login history week label","%b %e, %Y"));
101 }107 }
102108
103 label = g_strconcat (from, " - ", to, NULL);109 /* Translators: This indicates a week label on a login history.
110 The first %s is the first day of a week, and the second %s the last day. */
111 label = g_strdup_printf(C_("login history week label", "%s - %s"), from, to);
104112
105 g_date_time_unref (date);113 g_date_time_unref (date);
106 g_free (from);114 g_free (from);
@@ -182,8 +190,12 @@
182 GtkWidget *label;190 GtkWidget *label;
183191
184 date = get_smart_date (datetime);192 date = get_smart_date (datetime);
185 time = g_date_time_format (datetime, "%k:%M");193 /* Translators: This is a time format string in the style of "22:58".
186 str = g_strconcat (date, ", ", time, NULL);194 It indicates a login time which follows a date. */
195 time = g_date_time_format (datetime, C_("login date-time", "%k:%M"));
196 /* Translators: This indicates a login date-time.
197 The first %s is a date, and the second %s a time. */
198 str = g_strdup_printf(C_("login date-time", "%s, %s"), date, time);
187 label = gtk_label_new (str);199 label = gtk_label_new (str);
188 gtk_widget_set_halign (label, GTK_ALIGN_START);200 gtk_widget_set_halign (label, GTK_ALIGN_START);
189 gtk_grid_attach (GTK_GRID (grid), label, 1, line, 1, 1);201 gtk_grid_attach (GTK_GRID (grid), label, 1, line, 1, 1);
@@ -244,13 +256,13 @@
244256
245 if (history.logout_time > 0 && history.logout_time < to) {257 if (history.logout_time > 0 && history.logout_time < to) {
246 datetime = g_date_time_new_from_unix_local (history.logout_time);258 datetime = g_date_time_new_from_unix_local (history.logout_time);
247 add_record (grid, datetime, "Session Ended", line);259 add_record (grid, datetime, _("Session Ended"), line);
248 line++;260 line++;
249 }261 }
250262
251 if (history.login_time >= from) {263 if (history.login_time >= from) {
252 datetime = g_date_time_new_from_unix_local (history.login_time);264 datetime = g_date_time_new_from_unix_local (history.login_time);
253 add_record (grid, datetime, "Session Started", line);265 add_record (grid, datetime, _("Session Started"), line);
254 line++;266 line++;
255 }267 }
256 }268 }
257269
=== modified file 'panels/user-accounts/um-user-panel.c'
--- panels/user-accounts/um-user-panel.c 2014-02-21 15:48:18 +0000
+++ panels/user-accounts/um-user-panel.c 2014-04-04 13:48:39 +0000
@@ -619,9 +619,13 @@
619 else if (time > 0) {619 else if (time > 0) {
620 date_time = g_date_time_new_from_unix_local (time);620 date_time = g_date_time_new_from_unix_local (time);
621 date_str = get_smart_date (date_time);621 date_str = get_smart_date (date_time);
622 time_str = g_date_time_format (date_time, "%k:%M");622 /* Translators: This is a time format string in the style of "22:58".
623 It indicates a login time which follows a date. */
624 time_str = g_date_time_format (date_time, C_("login date-time", "%k:%M"));
623625
624 text = g_strconcat (date_str, ", ", time_str, NULL);626 /* Translators: This indicates a login date-time.
627 The first %s is a date, and the second %s a time. */
628 text = g_strdup_printf(C_("login date-time", "%s, %s"), date_str, time_str);
625629
626 g_date_time_unref (date_time);630 g_date_time_unref (date_time);
627 g_free (date_str);631 g_free (date_str);
628632
=== modified file 'panels/user-accounts/um-utils.c'
--- panels/user-accounts/um-utils.c 2014-03-18 22:04:15 +0000
+++ panels/user-accounts/um-utils.c 2014-04-04 13:48:39 +0000
@@ -819,10 +819,12 @@
819 }819 }
820 else {820 else {
821 if (g_date_time_get_year (date) == g_date_time_get_year (today)) {821 if (g_date_time_get_year (date) == g_date_time_get_year (today)) {
822 label = g_date_time_format (date, "%b %e");822 /* Translators: This is a date format string in the style of "Feb 24". */
823 label = g_date_time_format (date, _("%b %e"));
823 }824 }
824 else {825 else {
825 label = g_date_time_format (date, "%b %e, %Y");826 /* Translators: This is a date format string in the style of "Feb 24, 2013". */
827 label = g_date_time_format (date, _("%b %e, %Y"));
826 }828 }
827 }829 }
828830

Subscribers

People subscribed via source and target branches