6 Import ('env gtkardour install_prefix intl_files')
8 potfiles_in = open('POTFILES.in', 'w')
12 print "Generating POTFILES.in in gtk_ardour/po"
14 potfiles_in.write("""# This file was automatically generated by a configuration script.
15 # Contains a list of source files containing translatable
16 # strings sorted alphabetically.
20 for f in intl_files[:]:
21 potfiles_in.write(f + '\n')
25 print "Updating pot file: "
27 domain = gtkardour['DOMAIN']
28 potfile = gtkardour['POTFILE']
30 poaction = Action('intltool-update -p -g=' + domain)
34 # this should probably be merged with the i18n builder somehow
36 p_oze = [ os.path.basename (po) for po in glob.glob ('*.po') ]
37 languages = [ po.replace ('.po', '') for po in p_oze ]
38 m_oze = [ po.replace (".po", ".mo") for po in p_oze ]
41 po = mo.replace (".mo", ".po")
42 env.Alias ('install', gtkardour.MoBuild (mo, [ po, potfile ]))
44 for lang in languages[:]:
45 modir = (os.path.join (install_prefix, 'share/locale/' + lang + '/LC_MESSAGES/'))
46 moname = domain + '.mo'
47 env.Alias('install', env.InstallAs (os.path.join (modir, moname), lang + '.mo'))