mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
re-enable i18n as a build target for translations
git-svn-id: svn://localhost/ardour2/branches/3.0@7995 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b8da7d196c
commit
71df3719d4
4 changed files with 42 additions and 3 deletions
39
autowaf.py
39
autowaf.py
|
|
@ -11,6 +11,8 @@ import misc
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import glob
|
||||||
|
|
||||||
from TaskGen import feature, before, after
|
from TaskGen import feature, before, after
|
||||||
|
|
||||||
global g_is_child
|
global g_is_child
|
||||||
|
|
@ -436,3 +438,40 @@ def shutdown():
|
||||||
try: os.popen("/sbin/ldconfig")
|
try: os.popen("/sbin/ldconfig")
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
|
def build_i18n(bld,srcdir,dir,name,sources):
|
||||||
|
pwd = bld.get_curdir()
|
||||||
|
os.chdir(os.path.join (srcdir, dir))
|
||||||
|
|
||||||
|
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')
|
||||||
|
languages = [ po.replace ('.po', '') for po in po_files ]
|
||||||
|
|
||||||
|
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)
|
||||||
|
os.chdir (pwd)
|
||||||
|
|
|
||||||
|
|
@ -478,5 +478,5 @@ def build(bld):
|
||||||
bld.install_as (os.path.join (bld.env['PREFIX'], 'share', 'locale', lang, 'LC_MESSAGES', APPNAME + '.mo'), mo)
|
bld.install_as (os.path.join (bld.env['PREFIX'], 'share', 'locale', lang, 'LC_MESSAGES', APPNAME + '.mo'), mo)
|
||||||
|
|
||||||
def i18n(bld):
|
def i18n(bld):
|
||||||
autowaf.build_i18n (bld, 'gtk2_ardour', APPNAME, gtk2_ardour_sources)
|
autowaf.build_i18n (bld, srcdir, 'gtk2_ardour', APPNAME, gtk2_ardour_sources)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,4 +372,4 @@ def shutdown():
|
||||||
autowaf.shutdown()
|
autowaf.shutdown()
|
||||||
|
|
||||||
def i18n(bld):
|
def i18n(bld):
|
||||||
autowaf.build_i18n (bld, 'libs/ardour', APPNAME, libardour_sources)
|
autowaf.build_i18n (bld, '..', 'libs/ardour', APPNAME, libardour_sources)
|
||||||
|
|
|
||||||
2
wscript
2
wscript
|
|
@ -6,6 +6,7 @@ import re
|
||||||
import string
|
import string
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import glob
|
||||||
|
|
||||||
# Variables for 'waf dist'
|
# Variables for 'waf dist'
|
||||||
VERSION = '3.0pre0'
|
VERSION = '3.0pre0'
|
||||||
|
|
@ -31,7 +32,6 @@ children = [
|
||||||
'gtk2_ardour'
|
'gtk2_ardour'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
i18n_children = [
|
i18n_children = [
|
||||||
'gtk2_ardour',
|
'gtk2_ardour',
|
||||||
'libs/ardour'
|
'libs/ardour'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue