--- a/common/i18n.py Tue Sep 08 15:30:49 2009 +0200
+++ b/common/i18n.py Tue Sep 08 15:59:20 2009 +0200
@@ -44,9 +44,10 @@
status != 0
"""
print cmd.replace(os.getcwd() + os.sep, '')
- status = os.system(cmd)
+ from subprocess import call
+ status = call(cmd)
if status != 0:
- raise Exception()
+ raise Exception('status = %s' % status)
def available_catalogs(i18ndir=None):
@@ -74,15 +75,15 @@
mergedpo = join(destdir, '%s_merged.po' % lang)
try:
# merge instance/cubes messages catalogs with the stdlib's one
- execute('msgcat --use-first --sort-output --strict %s > %s'
- % (' '.join(pofiles), mergedpo))
- # make sure the .mo file is writeable and compile with *msgfmt*
+ execute('msgcat --use-first --sort-output --strict -o "%s" %s'
+ % (mergedpo, ' '.join('"%s"' % f for f in pofiles)))
+ # make sure the .mo file is writeable and compiles with *msgfmt*
applmo = join(destdir, lang, 'LC_MESSAGES', 'cubicweb.mo')
try:
ensure_fs_mode(applmo)
except OSError:
pass # suppose not exists
- execute('msgfmt %s -o %s' % (mergedpo, applmo))
+ execute('msgfmt "%s" -o "%s"' % (mergedpo, applmo))
except Exception, ex:
errors.append('while handling language %s: %s' % (lang, ex))
try: