translations are not bundled or used on osx

Bug #1074116 reported by Mike McCracken
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Control Panel
Status tracked in Trunk
Stable-4-2
Fix Released
Undecided
Unassigned
Trunk
Fix Released
High
Mike McCracken
Ubuntu One Windows Installer
Fix Released
High
Mike McCracken
Ubuntu Single Sign On Client
Status tracked in Trunk
Stable-4-2
Fix Released
Medium
Mike McCracken
Trunk
Fix Released
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

Tags: u1-darwin

Related branches

Mike McCracken (mikemc)
description: updated
Changed in ubuntuone-windows-installer:
assignee: nobody → Mike McCracken (mikemc)
Mike McCracken (mikemc)
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)
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)
Changed in ubuntuone-windows-installer:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.