summaryrefslogtreecommitdiff
path: root/i18n.py
diff options
context:
space:
mode:
Diffstat (limited to 'i18n.py')
-rw-r--r--i18n.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/i18n.py b/i18n.py
index 8e2fd6404..ce28d25e9 100644
--- a/i18n.py
+++ b/i18n.py
@@ -2,6 +2,10 @@ import glob
import os
from waflib import Logs
+def command(c):
+ print c
+ os.system(c)
+
def pot(dir, sources, name):
s = ""
for f in sources.split('\n'):
@@ -16,8 +20,11 @@ def pot(dir, sources, name):
except:
pass
- os.system('xgettext -d %s -s --keyword=_ --add-comments=/ -p %s -o %s.pot %s' % (name, d, name, s))
-
+ command('xgettext -d %s -s --keyword=_ --add-comments=/ -p %s -o %s.pot %s' % (name, d, name, s))
+
+def pot_merge(dir, name):
+ for f in glob.glob(os.path.join(os.getcwd(), dir, 'po', '*.po')):
+ command('msgmerge %s %s.pot -o %s' % (f, os.path.join('build', dir, name), f))
def po_to_mo(dir, name, bld):
for f in glob.glob(os.path.join(os.getcwd(), dir, 'po', '*.po')):