Merge lp:~dobey/ubuntuone-client/fix-translations into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Natalia Bidart
Approved revision: 764
Merged at revision: 765
Proposed branch: lp:~dobey/ubuntuone-client/fix-translations
Merge into: lp:ubuntuone-client
Diff against target: 32 lines (+3/-4)
2 files modified
libsyncdaemon/syncdaemon-authentication.c (+1/-1)
ubuntuone/clientdefs.py.in (+2/-3)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-translations
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Rick McBride (community) Approve
Review via email: mp+42990@code.launchpad.net

Commit message

Use the dgettext call for translating the SSO description

Description of the change

This can be tested by installing the language-pack-gnome-tr-base package, and then doing the following, inside the branch:

./autogen.sh --enable-debug --enable-gtk-doc && make ubuntuone/clientdefs.py
PYTHONPATH=. LANG=tr_TK.UTF-8 python -c "from ubuntuone.clientdefs import DESCRIPTION; print DESCRIPTION"

You can also use this same test against trunk or the installed packages, to see that it fails with them, by running the command without setting PYTHONPATH=. in another directory.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) wrote :

This works. Thanks for the excellent test example.

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Works indeed, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libsyncdaemon/syncdaemon-authentication.c'
2--- libsyncdaemon/syncdaemon-authentication.c 2010-10-05 13:52:09 +0000
3+++ libsyncdaemon/syncdaemon-authentication.c 2010-12-07 19:09:04 +0000
4@@ -258,7 +258,7 @@
5 dbus_g_proxy_call_no_reply (auth->priv->proxy, "login_or_register_to_get_credentials",
6 G_TYPE_STRING, SSO_APP_NAME,
7 G_TYPE_STRING, SSO_TC_URL,
8- G_TYPE_STRING, _("Ubuntu One requires an Ubuntu Single Sign On (SSO) account. This process will allow you to create a new account, if you do not yet have one."),
9+ G_TYPE_STRING, Q_("Ubuntu One requires an Ubuntu Single Sign On (SSO) account. This process will allow you to create a new account, if you do not yet have one."),
10 G_TYPE_INT64, 0, /* FIXME */
11 G_TYPE_INVALID,
12 G_TYPE_INVALID);
13
14=== modified file 'ubuntuone/clientdefs.py.in'
15--- ubuntuone/clientdefs.py.in 2010-10-07 16:04:50 +0000
16+++ ubuntuone/clientdefs.py.in 2010-12-07 19:09:04 +0000
17@@ -24,8 +24,7 @@
18 import gettext
19
20
21-_ = gettext.gettext
22-
23+Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string)
24
25 # pylint: disable-msg=C0301
26 VERSION = "@VERSION@"
27@@ -36,4 +35,4 @@
28 APP_NAME = "@SSO_APP_NAME@"
29 TC_URL = "@SSO_TC_URL@"
30 PING_URL = "@SSO_PING_URL@"
31-DESCRIPTION = _("Ubuntu One requires an Ubuntu Single Sign On (SSO) account. This process will allow you to create a new account, if you do not yet have one.")
32+DESCRIPTION = Q_("Ubuntu One requires an Ubuntu Single Sign On (SSO) account. This process will allow you to create a new account, if you do not yet have one.")

Subscribers

People subscribed via source and target branches