Merge lp:~kelemeng/activity-log-manager/bug958483 into lp:~activity-log-manager/activity-log-manager/vala

Proposed by Gabor Kelemen
Status: Merged
Merged at revision: 103
Proposed branch: lp:~kelemeng/activity-log-manager/bug958483
Merge into: lp:~activity-log-manager/activity-log-manager/vala
Diff against target: 70 lines (+7/-7)
2 files modified
src/applications-widget.vala (+5/-5)
src/history-widget.vala (+2/-2)
To merge this branch: bzr merge lp:~kelemeng/activity-log-manager/bug958483
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Review via email: mp+98096@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

> var last_accessed = time.format(_("%e %B %Y"));

These are string formatting for how the time should be rendered. It doesn't get printed on the screen. It doesn't need to be translated.

> var date_string = date.format(_("%d %B %Y"));
Same

> var date_string = date.format(_("%d %B %Y"));
Same

review: Needs Fixing
Revision history for this message
Stefano Candori (cando) wrote :

Manish, those gettext changes are already in my branch.. could you review
my merge request?

Stefano Candori
Il giorno 18/mar/2012 19:47, "Manish Sinha (मनीष सिन्हा" <
<email address hidden>> ha scritto:

> Review: Needs Fixing
>
> > var last_accessed = time.format(_("%e %B %Y"));
>
> These are string formatting for how the time should be rendered. It
> doesn't get printed on the screen. It doesn't need to be translated.
>
> > var date_string = date.format(_("%d %B %Y"));
> Same
>
> > var date_string = date.format(_("%d %B %Y"));
> Same
> --
>
> https://code.launchpad.net/~kelemeng/activity-log-manager/bug958483/+merge/98096
> Your team Activity Log Manager is subscribed to branch
> lp:activity-log-manager.
>

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

>> var last_accessed = time.format(_("%e %B %Y"));

> These are string formatting for how the time should be rendered. It doesn't get printed on the
> screen. It doesn't need to be translated.

The date gets printed in a format specified by these strings. Preferred date formats are different in various languages, so formatting strings needs to be marked for translation.

This is covered here: http://www.gnu.org/software/gettext/manual/gettext.html#Aspects

As for Stefanoss branch: you missed the untranslated Name string in the ApplicationsTreeView class. This is not visible, but it is an accessible description of the blacklisted applications list, and can be heard when using Orca.

Also you should mark the time formatting strings for translation too. Also please avoid using string surgeries like:

time.format(today + ", %H:%M")

This won't look good in some languages, even if the two parts would be translatable individually. See: https://live.gnome.org/TranslationProject/DevGuidelines/Never%20split%20sentences

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

@Stefano

I reviewed yours. It's fine. Will merge it by end of the day

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

@Gabor
Cool. Looks fine. Will merge both the branches.

I just checked Stefano's diff. Will have a thorough look at the codebcase before making a release.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/applications-widget.vala'
2--- src/applications-widget.vala 2012-03-12 14:45:32 +0000
3+++ src/applications-widget.vala 2012-03-18 11:54:18 +0000
4@@ -328,7 +328,7 @@
5
6 private void set_up_ui () {
7 var column_pix_name = new TreeViewColumn ();
8- column_pix_name.set_title ("Name");
9+ column_pix_name.set_title (_("Name"));
10 this.treeview.append_column (column_pix_name);
11 var pix_rend = new CellRendererPixbuf ();
12 column_pix_name.pack_start (pix_rend, false);
13@@ -466,7 +466,7 @@
14
15 private void set_up_ui () {
16 var column_pix_name = new TreeViewColumn ();
17- column_pix_name.set_title ("Name");
18+ column_pix_name.set_title (_("Name"));
19 this.treeview.append_column (column_pix_name);
20 var pix_rend = new CellRendererPixbuf ();
21 column_pix_name.pack_start (pix_rend, false);
22@@ -480,7 +480,7 @@
23 column_pix_name.set_sort_column_id (0);
24
25 var column_used_name = new TreeViewColumn ();
26- column_used_name.set_title ("Last Used");
27+ column_used_name.set_title (_("Last Used"));
28 this.treeview.append_column (column_used_name);
29 var used_rend = new CellRendererText ();
30 used_rend.set_property ("ellipsize", Pango.EllipsizeMode.END);
31@@ -492,7 +492,7 @@
32 used_rend.set_property("xalign", 1);
33
34 var column_usage_name = new TreeViewColumn ();
35- column_usage_name.set_title ("Activity");
36+ column_usage_name.set_title (_("Activity"));
37 this.treeview.append_column (column_usage_name);
38 var usage_rend = new UsageCellRenderer ();
39 column_usage_name.pack_start (usage_rend, true);
40@@ -574,7 +574,7 @@
41 if(last_accessed_time != null)
42 {
43 var time = new DateTime.from_unix_local (last_accessed_time/1000);
44- var last_accessed = time.format("%e %B %Y");
45+ var last_accessed = time.format(_("%e %B %Y"));
46
47 insert_liststore(app_info, last_accessed, last_accessed_time,
48 0);
49
50=== modified file 'src/history-widget.vala'
51--- src/history-widget.vala 2012-03-03 12:09:23 +0000
52+++ src/history-widget.vala 2012-03-18 11:54:18 +0000
53@@ -343,7 +343,7 @@
54 calendar.get_date(out year, out month, out day);
55
56 DateTime date = new DateTime.local((int)year, (int)month+1, (int)day, 0, 0 ,0);
57- var date_string = date.format("%d %B %Y");
58+ var date_string = date.format(_("%d %B %Y"));
59 entry.set_text(date_string);
60 widget.set_sensitive(true);
61 dialog.hide();
62@@ -376,7 +376,7 @@
63 calendar.get_date(out year, out month, out day);
64
65 DateTime date = new DateTime.local((int)year, (int)month+1, (int)day, 0, 0 ,0);
66- var date_string = date.format("%d %B %Y");
67+ var date_string = date.format(_("%d %B %Y"));
68 entry.set_text(date_string);
69 widget.set_sensitive(true);
70 dialog.hide();

Subscribers

People subscribed via source and target branches