summaryrefslogtreecommitdiff
path: root/gtk2_ardour/po
diff options
context:
space:
mode:
authorsolido <solido@dummy.example.com>2005-11-14 08:38:16 +0000
committersolido <solido@dummy.example.com>2005-11-14 08:38:16 +0000
commitf0416627d63d94cac80e7fc2e0e585b79a8147f0 (patch)
treef62292c10e578f85f259e22f036e609982fd0fa9 /gtk2_ardour/po
parent3c6f29ceeacc6bf2f393169792903a730dd84ad7 (diff)
support for glade and new new session dialog
git-svn-id: svn://localhost/trunk/ardour2@88 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/po')
-rw-r--r--gtk2_ardour/po/SConscript47
1 files changed, 47 insertions, 0 deletions
diff --git a/gtk2_ardour/po/SConscript b/gtk2_ardour/po/SConscript
new file mode 100644
index 0000000000..55a4642433
--- /dev/null
+++ b/gtk2_ardour/po/SConscript
@@ -0,0 +1,47 @@
+# -*- python -*-
+import os
+import os.path
+import glob
+
+Import ('env gtkardour install_prefix intl_files')
+
+potfiles_in = open('POTFILES.in', 'w')
+
+intl_files.sort()
+
+print "Generating POTFILES.in in gtk_ardour/po"
+
+potfiles_in.write("""# This file was automatically generated by a configuration script.
+# Contains a list of source files containing translatable
+# strings sorted alphabetically.
+[encoding: UTF-8]
+""")
+
+for f in intl_files[:]:
+ potfiles_in.write(f + '\n')
+
+potfiles_in.close()
+
+print "Updating pot file: "
+
+domain = gtkardour['DOMAIN']
+potfile = gtkardour['POTFILE']
+
+poaction = Action('intltool-update -p -g=' + domain)
+
+Execute(poaction)
+
+# this should probably be merged with the i18n builder somehow
+
+p_oze = [ os.path.basename (po) for po in glob.glob ('*.po') ]
+languages = [ po.replace ('.po', '') for po in p_oze ]
+m_oze = [ po.replace (".po", ".mo") for po in p_oze ]
+
+for mo in m_oze[:]:
+ po = mo.replace (".mo", ".po")
+ env.Alias ('install', gtkardour.MoBuild (mo, [ po, potfile ]))
+
+for lang in languages[:]:
+ modir = (os.path.join (install_prefix, 'share/locale/' + lang + '/LC_MESSAGES/'))
+ moname = domain + '.mo'
+ env.Alias('install', env.InstallAs (os.path.join (modir, moname), lang + '.mo'))