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-26 10:42:17 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-03-26 10:42:17 (GMT)
commitb5e4aa43a9ea13bf21324cacb8f9e6d7ea772806 (patch)
treeea511e538d80a8067fb39e7f50b9ba415e41defd /sugar/activity
parent7267047ce66ea3016c1100a6693e7444b179bfea (diff)
parentad23ceac8dea78801cde836a25bd00614ef69658 (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
Diffstat (limited to 'sugar/activity')
-rw-r--r--sugar/activity/bundlebuilder.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/sugar/activity/bundlebuilder.py b/sugar/activity/bundlebuilder.py
index 6086de3..67bbe73 100644
--- a/sugar/activity/bundlebuilder.py
+++ b/sugar/activity/bundlebuilder.py
@@ -145,6 +145,19 @@ def _get_file_list(manifest):
else:
return _DefaultFileList()
+def _include_mo_in_bundle(bundle_zip):
+ for langdir in os.listdir('locale'):
+ if os.path.isdir(os.path.join('locale', langdir, 'LC_MESSAGES')):
+ for filename in os.listdir(os.path.join('locale', langdir,
+ 'LC_MESSAGES')):
+ if filename.endswith('.mo'):
+ arcname = os.path.join(_get_bundle_name() + '.activity',
+ 'locale', langdir, 'LC_MESSAGES',
+ filename)
+ bundle_zip.write(
+ os.path.join('locale', langdir, 'LC_MESSAGES', filename),
+ arcname)
+
def cmd_dist(manifest):
cmd_genmo(manifest)
file_list = _get_file_list(manifest)
@@ -156,16 +169,8 @@ def cmd_dist(manifest):
arcname = os.path.join(_get_bundle_name() + '.activity', filename)
bundle_zip.write(filename, arcname)
- for langdir in os.listdir('locale'):
- if os.path.isdir(os.path.join('locale', langdir)):
- for filename in os.listdir(os.path.join('locale', langdir, 'LC_MESSAGES')):
- if filename.endswith('.mo'):
- arcname = os.path.join(_get_bundle_name() + '.activity',
- 'locale', langdir, 'LC_MESSAGES',
- filename)
- bundle_zip.write(
- os.path.join('locale', langdir, 'LC_MESSAGES', filename),
- arcname)
+ if os.path.exists('locale'):
+ _include_mo_in_bundle(bundle_zip)
bundle_zip.close()