mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-29 20:40:52 +01:00
fbd4487987
Enhanced the gettextize script to update mo files for windows and osx. This script should be run any time that a new language is added (don't for get to svn add the Data/Languages language subdirectory), and on occasion to update the language files with strings from the source code. Added the Hebrew mo file for windows and osx (and update the others). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6790 8ced0084-cf51-0410-be5f-012b33b47a6e
23 lines
712 B
Bash
Executable File
23 lines
712 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cd ${0/gettextize/}/..
|
|
SRCDIR=Source
|
|
CPP_FILE_LIST=$(find $SRCDIR \( -name '*.cpp' -o -name '*.h' -o -name '*.c' \) -a ! \
|
|
-path '*Debug*')
|
|
xgettext -d dolphin-emu -s --keyword=_ --keyword=wxTRANSLATE -p ./Languages -o dolphin-emu.pot $CPP_FILE_LIST \
|
|
--package-name="Dolphin Emu" --package-version="2.0"
|
|
|
|
POTFILE=./Languages/dolphin-emu.pot
|
|
PO_FILES=$(find ./Languages -name '*.po')
|
|
for PO in $PO_FILES
|
|
do
|
|
msgmerge --quiet --update --backup=none -s $PO $POTFILE
|
|
|
|
LANGUAGE=$(echo $PO | sed -e 's/^.*\/Languages\///' -e 's/\.po$//')
|
|
|
|
if [ ! -d ./Data/Languages/$LANGUAGE ]; then
|
|
mkdir ./Data/Languages/$LANGUAGE
|
|
fi
|
|
msgfmt -o ./Data/Languages/$LANGUAGE/$(basename ${POTFILE/pot/mo}) $PO
|
|
done
|