mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Build mo translation files on all platforms. Had to import msgfmt executable in the Externals to do this on windows.
Save wxLanguage enumeration value in ini file so that users are not surprised when a language is added and dolphin-emu is suddenly translated in a different language. Update Spanish, Korean, and Simplified Chinese translations. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6804 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -76,13 +76,18 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
|
||||
env.Install(env['data_dir'],
|
||||
'#Source/Core/DolphinWX/resources/Dolphin.icns')
|
||||
|
||||
mo_files = Glob('#Data/Languages/*/dolphin-emu.mo', strings=True)
|
||||
for mo in mo_files:
|
||||
index_lo = mo.find("Languages/") + len("Languages/")
|
||||
index_hi = mo.find("/dolphin-emu.mo")
|
||||
lang = mo[index_lo:index_hi]
|
||||
lproj = env['data_dir'] + '/' + lang + ".lproj/dolphin-emu.mo"
|
||||
env.InstallAs(lproj, mo)
|
||||
msgfmt = env.WhereIs('msgfmt')
|
||||
if not msgfmt == None:
|
||||
po_files = Glob('#Languages/*.po', strings=True)
|
||||
for po in po_files:
|
||||
index_lo = po.find('Languages/') + len('Languages/')
|
||||
index_hi = po.find('.po')
|
||||
lang = po[index_lo:index_hi]
|
||||
mo_dir = env['build_dir'] + '/Languages/' + lang + '.lproj'
|
||||
mo_file = mo_dir + '/dolphin-emu.mo'
|
||||
env.Command('#' + mo_file, po, 'mkdir -p ' + mo_dir +
|
||||
' && msgfmt -o ' + mo_file + ' ' + po)
|
||||
env.Install(env['data_dir'] + '/' + lang + '.lproj', '#' + mo_file)
|
||||
|
||||
from plistlib import writePlist
|
||||
def createPlist(target, source, env):
|
||||
|
Reference in New Issue
Block a user