Merge lp:~nataliabidart/ubuntuone-control-panel/translations into lp:ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 110
Merged at revision: 108
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/translations
Merge into: lp:ubuntuone-control-panel
Diff against target: 53 lines (+10/-4)
3 files modified
bin/ubuntuone-control-panel-gtk (+7/-3)
ubuntuone/controlpanel/gtk/__init__.py (+1/-0)
ubuntuone/controlpanel/gtk/gui.py (+2/-1)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/translations
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Martin Albisetti (community) Approve
Review via email: mp+54412@code.launchpad.net

Commit message

- Added proper domain setting to the GTK UI (LP: #735957).

To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) wrote :

17 +# import the GUi after the translation domain has been set

(dumb change)
s/GUi/GUI

review: Approve
110. By Natalia Bidart

Typo.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-control-panel-gtk'
2--- bin/ubuntuone-control-panel-gtk 2011-03-17 14:57:38 +0000
3+++ bin/ubuntuone-control-panel-gtk 2011-03-22 21:30:58 +0000
4@@ -23,13 +23,17 @@
5 import sys
6
7 import dbus.mainloop.glib
8+import gettext
9
10 from optparse import OptionParser
11
12+from ubuntuone.controlpanel.gtk import DBUS_BUS_NAME, TRANSLATION_DOMAIN
13+
14+dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
15+gettext.textdomain(TRANSLATION_DOMAIN)
16+
17+# import the GUI after the translation domain has been set
18 from ubuntuone.controlpanel.gtk.gui import ControlPanelWindow
19-from ubuntuone.controlpanel.gtk import DBUS_BUS_NAME
20-
21-dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
22
23
24 def parser_options():
25
26=== modified file 'ubuntuone/controlpanel/gtk/__init__.py'
27--- ubuntuone/controlpanel/gtk/__init__.py 2011-03-17 14:27:06 +0000
28+++ ubuntuone/controlpanel/gtk/__init__.py 2011-03-22 21:30:58 +0000
29@@ -19,3 +19,4 @@
30 """The GTK graphical interface for the control panel for Ubuntu One."""
31
32 DBUS_BUS_NAME = "com.ubuntuone.controlpanel.gui"
33+TRANSLATION_DOMAIN = "ubuntuone-control-panel"
34
35=== modified file 'ubuntuone/controlpanel/gtk/gui.py'
36--- ubuntuone/controlpanel/gtk/gui.py 2011-03-21 21:18:11 +0000
37+++ ubuntuone/controlpanel/gtk/gui.py 2011-03-22 21:30:58 +0000
38@@ -52,7 +52,7 @@
39 from ubuntuone.controlpanel.logger import setup_logging, log_call
40 from ubuntuone.controlpanel.utils import get_data_file
41
42-from ubuntuone.controlpanel.gtk import package_manager
43+from ubuntuone.controlpanel.gtk import package_manager, TRANSLATION_DOMAIN
44
45 logger = setup_logging('gtk.gui')
46 _ = gettext.gettext
47@@ -119,6 +119,7 @@
48
49 if filename is not None:
50 builder = gtk.Builder()
51+ builder.set_translation_domain(TRANSLATION_DOMAIN)
52 builder.add_from_file(get_data_file(filename))
53 builder.connect_signals(self)
54

Subscribers

People subscribed via source and target branches