Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-12-03 22:48:29 (GMT)
committer Jonas Smedegaard <dr@jones.dk>2008-12-03 22:48:29 (GMT)
commite9acf86f3c05fe4cbcd061e407ec68f8067732cf (patch)
tree938511ef54975b31b80b7cdbf802785cef244d68
parent28e7f5ddbb14afa1dbecca96a18a06e1380857b4 (diff)
Add patch 0001 to fix locale path for system activities.
-rw-r--r--debian/patches/0001_fix_system_activity_locale_path.patch30
-rw-r--r--debian/patches/series1
2 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/0001_fix_system_activity_locale_path.patch b/debian/patches/0001_fix_system_activity_locale_path.patch
new file mode 100644
index 0000000..2dd0261
--- /dev/null
+++ b/debian/patches/0001_fix_system_activity_locale_path.patch
@@ -0,0 +1,30 @@
+diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py
+--- a/src/sugar/activity/activityfactory.py
++++ b/src/sugar/activity/activityfactory.py
+@@ -116,6 +116,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'
+diff --git a/src/sugar/activity/main.py b/src/sugar/activity/main.py
+--- a/src/sugar/activity/main.py
++++ b/src/sugar/activity/main.py
+@@ -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)
diff --git a/debian/patches/series b/debian/patches/series
index 61006dd..8f3f18a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+0001_fix_system_activity_locale_path.patch
1001_danish_l10n.patch
2001_sha1_on_older_python.patch
2002_ignore_debian_and_quilt-patches.patch