translations are not bundled or used on osx

Bug #1074116 reported by Mike McCracken on 2012-11-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Control Panel
Status tracked in Trunk
Stable-4-2
Undecided
Unassigned
Trunk
High
Mike McCracken
Ubuntu One Windows Installer
High
Mike McCracken
Ubuntu Single Sign On Client
Status tracked in Trunk
Stable-4-2
Medium
Mike McCracken
Trunk
High
Mike McCracken

Bug Description

We are currently not using the gettext translations on osx.

They are not included in the app bundle, and there's no code to get the locale or point gettext at the right files.

How to get the current preferred language from os x:
http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/ChoosingLocalizations.html

this is easy with pyobjc:

import gettext
from Cocoa import NSUserDefaults

su = NSUserDefaults.standardUserDefaults()
langs = su['AppleLanguages']
import os
path = os.path.abspath('build/mo') # or .app/Contents/Resources/translations/
l1 = gettext.translation('ubuntuone-control-panel', path, languages=langs)
l1.install()
print _("This device")
Este dispositivo

Related branches

Mike McCracken (mikemc) on 2012-11-01
description: updated
Changed in ubuntuone-windows-installer:
assignee: nobody → Mike McCracken (mikemc)
Mike McCracken (mikemc) on 2012-11-28
Changed in ubuntuone-windows-installer:
status: Confirmed → In Progress
importance: Wishlist → High
Changed in ubuntuone-control-panel:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Mike McCracken (mikemc)
Mike McCracken (mikemc) on 2012-11-28
Changed in ubuntu-sso-client:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Mike McCracken (mikemc)
Changed in ubuntu-sso-client:
status: In Progress → Fix Committed
Changed in ubuntuone-control-panel:
status: In Progress → Fix Committed
Mike McCracken (mikemc) on 2013-03-12
Changed in ubuntuone-windows-installer:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers