Remove idiocy.
[ardour2.git] / w18n.py
blob2605de359296f8c29f50a42bac40f67a85c5acfe
1 #!/usr/bin/env python
3 import autowaf
4 import os
5 import glob
7 def build_i18n(bld,dir,name,sources):
8 pwd = bld.get_curdir()
9 os.chdir(pwd)
11 pot_file = '%s.pot' % name
13 args = [ 'xgettext',
14 '--keyword=_',
15 '--keyword=N_',
16 '--from-code=UTF-8',
17 '-o', pot_file,
18 '--copyright-holder="Paul Davis"' ]
19 args += sources
20 print 'Updating ', pot_file
21 os.spawnvp (os.P_WAIT, 'xgettext', args)
23 po_files = glob.glob ('po/*.po')
25 for po_file in po_files:
26 args = [ 'msgmerge',
27 '--update',
28 po_file,
29 pot_file ]
30 print 'Updating ', po_file
31 os.spawnvp (os.P_WAIT, 'msgmerge', args)
33 for po_file in po_files:
34 mo_file = po_file.replace ('.po', '.mo')
35 args = [ 'msgfmt',
36 '-c',
37 '-o',
38 mo_file,
39 po_file ]
40 print 'Generating ', po_file
41 os.spawnvp (os.P_WAIT, 'msgfmt', args)