Merge lp:~larsu/indicator-datetime/dont-escape-unicode-chars into lp:indicator-datetime/13.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Charles Kerr
Approved revision: 373
Merged at revision: 374
Proposed branch: lp:~larsu/indicator-datetime/dont-escape-unicode-chars
Merge into: lp:indicator-datetime/13.10
Diff against target: 83 lines (+26/-20)
1 file modified
src/utils.c (+26/-20)
To merge this branch: bzr merge lp:~larsu/indicator-datetime/dont-escape-unicode-chars
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Charles Kerr (community) Approve
Sebastien Bacher Approve
Review via email: mp+233726@code.launchpad.net

Commit message

Use unicode characters directly instead of escaping them.

Description of the change

Use unicode characters directly instead of escaping them

Launchpad's xgettext seems too old to properly transform the escaped characters. It passes literal characters right through.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Lars. As discussed on IRC, that's probably the best we can do at the moment. Ideally we should fix launchpad to handle the \u<nnnn> chars properly, but that's not likely to be the case before rtm so we need a workaround. The solution listed there works, +1 from me

review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM. Thanks Lars!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/utils.c'
2--- src/utils.c 2014-04-08 10:23:02 +0000
3+++ src/utils.c 2014-09-08 14:18:14 +0000
4@@ -307,26 +307,29 @@
5 case DATE_PROXIMITY_TOMORROW:
6 /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
7 This format string is used for showing, on a 12-hour clock, events/appointments that happen tomorrow.
8- (\u2003 is a unicode em space which is slightly wider than a normal space.)
9- en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 1:00 PM" */
10- g_string_assign (ret, T_("Tomorrow\u2003%l:%M %p"));
11+ (Note: the space between the day and the time is an em space (unicode character 2003), which is
12+ slightly wider than a normal space.)
13+ en_US example: "Tomorrow %l:%M %p" --> "Tomorrow 1:00 PM" */
14+ g_string_assign (ret, T_("Tomorrow %l:%M %p"));
15 break;
16
17 case DATE_PROXIMITY_WEEK:
18 /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
19 This format string is used for showing, on a 12-hour clock, events/appointments that happen this week.
20- (\u2003 is a unicode em space which is slightly wider than a normal space.)
21- en_US example: "Tomorrow\u2003%l:%M %p" --> "Fri 1:00 PM" */
22- g_string_assign (ret, T_("%a\u2003%l:%M %p"));
23+ (Note: the space between the day and the time is an em space (unicode character 2003), which is
24+ slightly wider than a normal space.)
25+ en_US example: "Tomorrow %l:%M %p" --> "Fri 1:00 PM" */
26+ g_string_assign (ret, T_("%a %l:%M %p"));
27 break;
28
29 case DATE_PROXIMITY_FAR:
30 /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
31 This format string is used for showing, on a 12-hour clock, events/appointments that happen over a week from now.
32- (\u2003 is a unicode em space which is slightly wider than a normal space.)
33- en_US example: "%a %d %b\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
34- en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM" */
35- g_string_assign (ret, T_("%a %d %b\u2003%l:%M %p"));
36+ (Note: the space between the day and the time is an em space (unicode character 2003), which is
37+ slightly wider than a normal space.)
38+ en_US example: "%a %d %b %l:%M %p" --> "Fri Oct 31 1:00 PM"
39+ en_GB example: "%a %b %d %l:%M %p" --> "Fri 31 Oct 1:00 PM" */
40+ g_string_assign (ret, T_("%a %d %b %l:%M %p"));
41 break;
42 }
43 }
44@@ -344,26 +347,29 @@
45 case DATE_PROXIMITY_TOMORROW:
46 /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
47 This format string is used for showing, on a 24-hour clock, events/appointments that happen tomorrow.
48- (\u2003 is a unicode em space which is slightly wider than a normal space.)
49- en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 13:00" */
50- g_string_assign (ret, T_("Tomorrow\u2003%H:%M"));
51+ (Note: the space between the day and the time is an em space (unicode character 2003), which is
52+ slightly wider than a normal space.)
53+ en_US example: "Tomorrow %l:%M %p" --> "Tomorrow 13:00" */
54+ g_string_assign (ret, T_("Tomorrow %H:%M"));
55 break;
56
57 case DATE_PROXIMITY_WEEK:
58 /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
59 This format string is used for showing, on a 24-hour clock, events/appointments that happen this week.
60- (\u2003 is a unicode em space which is slightly wider than a normal space.)
61- en_US example: "%a\u2003%H:%M" --> "Fri 13:00" */
62- g_string_assign (ret, T_("%a\u2003%H:%M"));
63+ (Note: the space between the day and the time is an em space (unicode character 2003), which is
64+ slightly wider than a normal space.)
65+ en_US example: "%a %H:%M" --> "Fri 13:00" */
66+ g_string_assign (ret, T_("%a %H:%M"));
67 break;
68
69 case DATE_PROXIMITY_FAR:
70 /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
71 This format string is used for showing, on a 24-hour clock, events/appointments that happen over a week from now.
72- (\u2003 is a unicode em space which is slightly wider than a normal space.)
73- en_US example: "%a %d %b\u2003%H:%M" --> "Fri Oct 31 13:00"
74- en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00" */
75- g_string_assign (ret, T_("%a %d %b\u2003%H:%M"));
76+ (Note: the space between the day and the time is an em space (unicode character 2003), which is
77+ slightly wider than a normal space.)
78+ en_US example: "%a %d %b %H:%M" --> "Fri Oct 31 13:00"
79+ en_GB example: "%a %b %d %H:%M" --> "Fri 31 Oct 13:00" */
80+ g_string_assign (ret, T_("%a %d %b %H:%M"));
81 break;
82 }
83 }

Subscribers

People subscribed via source and target branches