anki/qt/i18n/build-mo-files
Damien Elmes 97b9b94fc7 use new file locations for translations
- translation files are now stored in a separate repo, and
use a layout compatible with Pontoon
- normalize the language code in aqt, so that old config settings
and command line arguments are correctly handled
- store Qt and gettext translations in separate subfolders
- remove Crowdin scripts
2020-02-17 08:40:17 +10:00

18 lines
352 B
Bash
Executable File

#!/bin/bash
#
# build mo files
#
targetDir="../aqt_data/locale/gettext"
mkdir -p $targetDir
echo "Compiling *.po..."
for file in po/desktop/*/anki.po
do
outdir=$(echo $file | \
perl -pe "s%po/desktop/(.*)/anki.po%$targetDir/\1/LC_MESSAGES%")
outfile="$outdir/anki.mo"
mkdir -p $outdir
msgfmt $file --output-file=$outfile
done