Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
b5e4aa43a9
@ -145,6 +145,19 @@ def _get_file_list(manifest):
|
|||||||
else:
|
else:
|
||||||
return _DefaultFileList()
|
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):
|
def cmd_dist(manifest):
|
||||||
cmd_genmo(manifest)
|
cmd_genmo(manifest)
|
||||||
file_list = _get_file_list(manifest)
|
file_list = _get_file_list(manifest)
|
||||||
@ -156,16 +169,8 @@ def cmd_dist(manifest):
|
|||||||
arcname = os.path.join(_get_bundle_name() + '.activity', filename)
|
arcname = os.path.join(_get_bundle_name() + '.activity', filename)
|
||||||
bundle_zip.write(filename, arcname)
|
bundle_zip.write(filename, arcname)
|
||||||
|
|
||||||
for langdir in os.listdir('locale'):
|
if os.path.exists('locale'):
|
||||||
if os.path.isdir(os.path.join('locale', langdir)):
|
_include_mo_in_bundle(bundle_zip)
|
||||||
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)
|
|
||||||
|
|
||||||
bundle_zip.close()
|
bundle_zip.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user