Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-03-23 17:18:42 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-03-23 17:18:42 (GMT)
commitaa8debb4cb500e526107e05c269d231ac54492ff (patch)
treecc751e4690a0152352766138578d29b5825d160f /sugar/activity
parente25c95ebafb858c89ae1eff5854661eebe6a479e (diff)
Fix up translations support
Diffstat (limited to 'sugar/activity')
-rw-r--r--sugar/activity/bundle.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py
index 3e46d10..8cb1945 100644
--- a/sugar/activity/bundle.py
+++ b/sugar/activity/bundle.py
@@ -26,7 +26,7 @@ class Bundle:
linfo_path = self._get_linfo_path()
if linfo_path and os.path.isfile(linfo_path):
- self._parse_locale_info(linfo_path)
+ self._parse_linfo(linfo_path)
def _parse_info(self, info_path):
cp = ConfigParser()
@@ -74,7 +74,9 @@ class Bundle:
cp = ConfigParser()
cp.read([linfo_path])
- if cp.has_option('Activity', 'name'):
+ section = 'Activity'
+
+ if cp.has_option(section, 'name'):
self._name = cp.get(section, 'name')
def _get_linfo_path(self):
@@ -82,7 +84,7 @@ class Bundle:
lang = locale.getdefaultlocale()[0]
if lang != None:
path = os.path.join(self.get_locale_path(), lang)
- if os.path.isdir(path):
+ if not os.path.isdir(path):
path = os.path.join(self._path, 'locale', lang[:2])
if not os.path.isdir(path):
path = None