Merge lp://staging/~rodrigo-moya/ubuntuone-client/enable-translations into lp://staging/ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: dobey
Approved revision: 11
Merged at revision: not available
Proposed branch: lp://staging/~rodrigo-moya/ubuntuone-client/enable-translations
Merge into: lp://staging/ubuntuone-client
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~rodrigo-moya/ubuntuone-client/enable-translations
Reviewer Review Type Date Requested Status
dobey (community) Approve
Elliot Murphy (community) Approve
Review via email: mp+6496@code.staging.launchpad.net

Commit message

[r=statik, r=dobey] Add gettext usage in applet and nautilus UI for translation support

To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Marked some strings to be translated and added .pot file so that translations can be done in LP

7. By Rodrigo Moya

Fixed typo

Revision history for this message
dobey (dobey) wrote :

I think it would be better to do:

from gettext import gettext as _

rather than assigning a variable later.

Also, the rest of the strings should also be marked for translation. (Connected, Disconnected, the different status tooltip messages, and the notification messages)

review: Needs Fixing
8. By Rodrigo Moya

* bin/ubuntuone-client-applet: fixed gettext import and marked missing strings
  for translation.

* canonical/ubuntuone/nautilus/storage.py: marked strings for translation.

9. By Rodrigo Moya

Added new translations to .pot file

10. By Rodrigo Moya

Added missing file to POTFILES.in

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

> I think it would be better to do:
>
> from gettext import gettext as _
>
> rather than assigning a variable later.
>
> Also, the rest of the strings should also be marked for translation.
> (Connected, Disconnected, the different status tooltip messages, and the
> notification messages)

Fixed both things in the last commits (up to revision 10)

Revision history for this message
Elliot Murphy (statik) wrote :

Looks good.

review: Approve
Revision history for this message
dobey (dobey) wrote :

You put a closing paren to the gettext call in the wrong place. It needs to be between the closing quote and comma on the line above (ubuntuone-client-offline is an icon name):

                         "applet icon to upgrade.",
- "ubuntuone-client-offline")
+ "ubuntuone-client-offline"))
                   n.set_urgency(pynotify.URGENCY_CRITICAL)
                   n.show()

review: Approve
Revision history for this message
dobey (dobey) wrote :

You put a closing paren to the gettext call in the wrong place. It needs to be between the closing quote and comma on the line above (ubuntuone-client-offline is an icon name):

                         "applet icon to upgrade.",
- "ubuntuone-client-offline")
+ "ubuntuone-client-offline"))
                   n.set_urgency(pynotify.URGENCY_CRITICAL)
                   n.show()

review: Needs Fixing
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Fixed

11. By Rodrigo Moya

Fixed misplaced paren

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2009-05-12 13:36:05 +0000
3+++ .bzrignore 2009-05-12 22:31:18 +0000
4@@ -3,5 +3,4 @@
5 _trial_temp
6 *_pb2.py
7 *.pyc
8-*.pot
9
10
11=== modified file 'bin/ubuntuone-client-applet'
12--- bin/ubuntuone-client-applet 2009-05-12 13:36:05 +0000
13+++ bin/ubuntuone-client-applet 2009-05-12 22:31:18 +0000
14@@ -27,9 +27,12 @@
15 import os
16 import subprocess
17 import sys
18+import gettext
19
20 import dbus.service
21
22+_ = t.ugettext
23+
24 # pylint: disable-msg=F0401
25 import pynotify
26
27@@ -383,19 +386,19 @@
28 menu.append(sep)
29 sep.show()
30
31- self.__items["bug"] = gtk.MenuItem(label="_Report a Problem")
32+ self.__items["bug"] = gtk.MenuItem(label=_("_Report a Problem"))
33 menu.append(self.__items["bug"])
34 self.__items["bug"].connect("activate", self.__open_website,
35 "https://bugs.launchpad.net/ubuntuone-client/+filebug")
36 self.__items["bug"].show()
37
38- self.__items["open"] = gtk.MenuItem(label="_Open Folder")
39+ self.__items["open"] = gtk.MenuItem(label=_("_Open Folder"))
40 menu.append(self.__items["open"])
41 self.__items["open"].connect("activate", self.__open_folder)
42 self.__items["open"].set_sensitive(False)
43 self.__items["open"].show()
44
45- self.__items["web"] = gtk.MenuItem(label="_Go to Web")
46+ self.__items["web"] = gtk.MenuItem(label=_("_Go to Web"))
47 menu.append(self.__items["web"])
48 self.__items["web"].connect("activate", self.__open_website)
49 self.__items["web"].show()
50
51=== modified file 'po/POTFILES.in'
52--- po/POTFILES.in 2009-05-12 13:36:05 +0000
53+++ po/POTFILES.in 2009-05-12 22:31:18 +0000
54@@ -2,3 +2,4 @@
55 data/emblem-ubuntuone-unsynchronized.icon.in
56 data/emblem-ubuntuone-uploading.icon.in
57 data/ubuntuone-client-applet.desktop.in
58+bin/ubuntuone-client-applet
59
60=== added file 'po/ubuntuone-client.pot'
61--- po/ubuntuone-client.pot 1970-01-01 00:00:00 +0000
62+++ po/ubuntuone-client.pot 2009-05-12 22:31:18 +0000
63@@ -0,0 +1,45 @@
64+# SOME DESCRIPTIVE TITLE.
65+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
66+# This file is distributed under the same license as the PACKAGE package.
67+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
68+#
69+#, fuzzy
70+msgid ""
71+msgstr ""
72+"Project-Id-Version: PACKAGE VERSION\n"
73+"Report-Msgid-Bugs-To: \n"
74+"POT-Creation-Date: 2009-05-12 18:31+0200\n"
75+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
76+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
77+"Language-Team: LANGUAGE <LL@li.org>\n"
78+"MIME-Version: 1.0\n"
79+"Content-Type: text/plain; charset=CHARSET\n"
80+"Content-Transfer-Encoding: 8bit\n"
81+
82+#: ../data/emblem-ubuntuone-downloading.icon.in.h:1
83+msgid "Downloading"
84+msgstr ""
85+
86+#: ../data/emblem-ubuntuone-unsynchronized.icon.in.h:1
87+msgid "Unsynchronized"
88+msgstr ""
89+
90+#: ../data/emblem-ubuntuone-uploading.icon.in.h:1
91+msgid "Uploading"
92+msgstr ""
93+
94+#: ../data/ubuntuone-client-applet.desktop.in.h:1
95+msgid "Control applet for Ubuntu One"
96+msgstr ""
97+
98+#: ../bin/ubuntuone-client-applet:389
99+msgid "_Report a Problem"
100+msgstr ""
101+
102+#: ../bin/ubuntuone-client-applet:395
103+msgid "_Open Folder"
104+msgstr ""
105+
106+#: ../bin/ubuntuone-client-applet:401
107+msgid "_Go to Web"
108+msgstr ""

Subscribers

People subscribed via source and target branches