rpms/sugar-toolkit/OLPC-3 localedir.patch, NONE, 1.1 sugar-toolkit.spec, 1.24, 1.25
Marco Pesenti Gritti
mpg at fedoraproject.org
Wed Sep 24 22:53:46 UTC 2008
Author: mpg
Update of /cvs/pkgs/rpms/sugar-toolkit/OLPC-3
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24276
Modified Files:
sugar-toolkit.spec
Added Files:
localedir.patch
Log Message:
* Wed Sep 24 2008 Marco Pesenti Gritti <mpg at redhat.com> - 0.82.11-3
- Apply the patch with -p1
localedir.patch:
--- NEW FILE localedir.patch ---
diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py
index 99f8997..af6674e 100644
--- a/src/sugar/activity/activityfactory.py
+++ b/src/sugar/activity/activityfactory.py
@@ -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'
diff --git a/src/sugar/activity/main.py b/src/sugar/activity/main.py
index 28dfee3..0295bf9 100644
--- 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)
Index: sugar-toolkit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sugar-toolkit/OLPC-3/sugar-toolkit.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- sugar-toolkit.spec 24 Sep 2008 22:47:02 -0000 1.24
+++ sugar-toolkit.spec 24 Sep 2008 22:53:16 -0000 1.25
@@ -6,7 +6,7 @@
Summary: Sugar toolkit
Name: sugar-toolkit
Version: 0.82.11
-Release: 2%{?dist}
+Release: 3%{?dist}
#Release: 2.%{alphatag}%{?dist}
URL: http://wiki.laptop.org/go/Sugar
# git clone git://dev.laptop.org/sugar
@@ -46,7 +46,7 @@
%prep
%setup -q
-%patch1 -p0 -b .localedir
+%patch1 -p1 -b .localedir
%build
%configure
@@ -70,6 +70,9 @@
%{_sysconfdir}/rpm/macros.sugar
%changelog
+* Wed Sep 24 2008 Marco Pesenti Gritti <mpg at redhat.com> - 0.82.11-3
+- Apply the patch with -p1
+
* Wed Sep 24 2008 Marco Pesenti Gritti <mpg at redhat.com> - 0.82.11-2
- Add a patch to use system localedir for system installed bundles
More information about the fedora-extras-commits
mailing list