common/i18n.py
branch3.5
changeset 3117 32686ae66c75
parent 2476 1294a6bdf3bf
child 3118 9e7a155bc4e5
--- a/common/i18n.py	Mon Sep 07 12:23:42 2009 +0200
+++ b/common/i18n.py	Mon Sep 07 17:46:28 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,8 +75,8 @@
         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))
+            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 compile with *msgfmt*
             applmo = join(destdir, lang, 'LC_MESSAGES', 'cubicweb.mo')
             try: