Set the correct locale path for system activities
This commit is contained in:
parent
89300c9173
commit
afb63981fa
@ -115,6 +115,9 @@ def get_environment(activity):
|
||||
environ['PATH'] = bin_path + ':' + environ['PATH']
|
||||
#environ['RAINBOW_STRACE_LOG'] = '1'
|
||||
|
||||
if activity.path.startswith(env.get_user_activities_path()):
|
||||
environ['SUGAR_LOCALEDIR'] = os.path.join(activity.path, 'locale')
|
||||
|
||||
if activity.bundle_id in [ 'org.laptop.WebActivity',
|
||||
'org.laptop.GmailActivity',
|
||||
'org.laptop.WikiBrowseActivity'
|
||||
|
@ -89,8 +89,11 @@ def main():
|
||||
|
||||
gtk.icon_theme_get_default().append_search_path(bundle.get_icons_path())
|
||||
|
||||
gettext.bindtextdomain(bundle.get_bundle_id(),
|
||||
bundle.get_locale_path())
|
||||
locale_path = None
|
||||
if 'SUGAR_LOCALEDIR' in os.environ:
|
||||
locale_path = os.environ['SUGAR_LOCALEDIR']
|
||||
|
||||
gettext.bindtextdomain(bundle.get_bundle_id(), locale_path)
|
||||
gettext.textdomain(bundle.get_bundle_id())
|
||||
|
||||
splitted_module = args[0].rsplit('.', 1)
|
||||
|
Loading…
Reference in New Issue
Block a user