summaryrefslogtreecommitdiff
path: root/w18n.py
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-22 13:51:16 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-22 13:51:16 +0000
commit3b7230552d8aa6c36fd2fbc3ccc1cfb9109fc843 (patch)
tree9d838960d1cad7fca14957b5e5de3215cf938185 /w18n.py
parent272c1a40db7c965664b256f7f5487dd224bfd413 (diff)
make i18n build work ; add mackie dir back to build ; token work on amp for MIDI; don't try to subgroup route groups with MIDI (for now)
git-svn-id: svn://localhost/ardour2/branches/3.0@5412 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'w18n.py')
-rw-r--r--w18n.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/w18n.py b/w18n.py
new file mode 100644
index 0000000000..2605de3592
--- /dev/null
+++ b/w18n.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+
+import autowaf
+import os
+import glob
+
+def build_i18n(bld,dir,name,sources):
+ pwd = bld.get_curdir()
+ os.chdir(pwd)
+
+ pot_file = '%s.pot' % name
+
+ args = [ 'xgettext',
+ '--keyword=_',
+ '--keyword=N_',
+ '--from-code=UTF-8',
+ '-o', pot_file,
+ '--copyright-holder="Paul Davis"' ]
+ args += sources
+ print 'Updating ', pot_file
+ os.spawnvp (os.P_WAIT, 'xgettext', args)
+
+ po_files = glob.glob ('po/*.po')
+
+ for po_file in po_files:
+ args = [ 'msgmerge',
+ '--update',
+ po_file,
+ pot_file ]
+ print 'Updating ', po_file
+ os.spawnvp (os.P_WAIT, 'msgmerge', args)
+
+ for po_file in po_files:
+ mo_file = po_file.replace ('.po', '.mo')
+ args = [ 'msgfmt',
+ '-c',
+ '-o',
+ mo_file,
+ po_file ]
+ print 'Generating ', po_file
+ os.spawnvp (os.P_WAIT, 'msgfmt', args)