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

Proposed by Sebastien Bacher on 2014-04-04
Status: Merged
Approved by: Sebastien Bacher on 2014-04-07
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 2014-04-04 Approve on 2014-04-05
PS Jenkins bot (community) continuous-integration Approve on 2014-04-04
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.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/user-accounts/um-history-dialog.c'
2--- panels/user-accounts/um-history-dialog.c 2014-03-12 17:32:51 +0000
3+++ panels/user-accounts/um-history-dialog.c 2014-04-04 13:48:39 +0000
4@@ -92,15 +92,23 @@
5 }
6 else {
7 date = g_date_time_add_days (um->week, 6);
8- from = g_date_time_format (um->week, "%b %e");
9+ /* Translators: This is a date format string in the style of "Feb 18",
10+ shown as the first day of a week on login history dialog. */
11+ from = g_date_time_format (um->week, C_("login history week label","%b %e"));
12 if (g_date_time_get_year (um->week) == g_date_time_get_year (um->current_week)) {
13- to = g_date_time_format (date, "%b %e");
14+ /* Translators: This is a date format string in the style of "Feb 24",
15+ shown as the last day of a week on login history dialog. */
16+ to = g_date_time_format (date, C_("login history week label","%b %e"));
17 }
18 else {
19- to = g_date_time_format (date, "%b %e, %Y");
20+ /* Translators: This is a date format string in the style of "Feb 24, 2013",
21+ shown as the last day of a week on login history dialog. */
22+ to = g_date_time_format (date, C_("login history week label","%b %e, %Y"));
23 }
24
25- label = g_strconcat (from, " - ", to, NULL);
26+ /* Translators: This indicates a week label on a login history.
27+ The first %s is the first day of a week, and the second %s the last day. */
28+ label = g_strdup_printf(C_("login history week label", "%s - %s"), from, to);
29
30 g_date_time_unref (date);
31 g_free (from);
32@@ -182,8 +190,12 @@
33 GtkWidget *label;
34
35 date = get_smart_date (datetime);
36- time = g_date_time_format (datetime, "%k:%M");
37- str = g_strconcat (date, ", ", time, NULL);
38+ /* Translators: This is a time format string in the style of "22:58".
39+ It indicates a login time which follows a date. */
40+ time = g_date_time_format (datetime, C_("login date-time", "%k:%M"));
41+ /* Translators: This indicates a login date-time.
42+ The first %s is a date, and the second %s a time. */
43+ str = g_strdup_printf(C_("login date-time", "%s, %s"), date, time);
44 label = gtk_label_new (str);
45 gtk_widget_set_halign (label, GTK_ALIGN_START);
46 gtk_grid_attach (GTK_GRID (grid), label, 1, line, 1, 1);
47@@ -244,13 +256,13 @@
48
49 if (history.logout_time > 0 && history.logout_time < to) {
50 datetime = g_date_time_new_from_unix_local (history.logout_time);
51- add_record (grid, datetime, "Session Ended", line);
52+ add_record (grid, datetime, _("Session Ended"), line);
53 line++;
54 }
55
56 if (history.login_time >= from) {
57 datetime = g_date_time_new_from_unix_local (history.login_time);
58- add_record (grid, datetime, "Session Started", line);
59+ add_record (grid, datetime, _("Session Started"), line);
60 line++;
61 }
62 }
63
64=== modified file 'panels/user-accounts/um-user-panel.c'
65--- panels/user-accounts/um-user-panel.c 2014-02-21 15:48:18 +0000
66+++ panels/user-accounts/um-user-panel.c 2014-04-04 13:48:39 +0000
67@@ -619,9 +619,13 @@
68 else if (time > 0) {
69 date_time = g_date_time_new_from_unix_local (time);
70 date_str = get_smart_date (date_time);
71- time_str = g_date_time_format (date_time, "%k:%M");
72+ /* Translators: This is a time format string in the style of "22:58".
73+ It indicates a login time which follows a date. */
74+ time_str = g_date_time_format (date_time, C_("login date-time", "%k:%M"));
75
76- text = g_strconcat (date_str, ", ", time_str, NULL);
77+ /* Translators: This indicates a login date-time.
78+ The first %s is a date, and the second %s a time. */
79+ text = g_strdup_printf(C_("login date-time", "%s, %s"), date_str, time_str);
80
81 g_date_time_unref (date_time);
82 g_free (date_str);
83
84=== modified file 'panels/user-accounts/um-utils.c'
85--- panels/user-accounts/um-utils.c 2014-03-18 22:04:15 +0000
86+++ panels/user-accounts/um-utils.c 2014-04-04 13:48:39 +0000
87@@ -819,10 +819,12 @@
88 }
89 else {
90 if (g_date_time_get_year (date) == g_date_time_get_year (today)) {
91- label = g_date_time_format (date, "%b %e");
92+ /* Translators: This is a date format string in the style of "Feb 24". */
93+ label = g_date_time_format (date, _("%b %e"));
94 }
95 else {
96- label = g_date_time_format (date, "%b %e, %Y");
97+ /* Translators: This is a date format string in the style of "Feb 24, 2013". */
98+ label = g_date_time_format (date, _("%b %e, %Y"));
99 }
100 }
101

Subscribers

People subscribed via source and target branches