anki/qt/i18n/build-mo-files
2020-01-03 08:24:59 +10:00

18 lines
350 B
Bash
Executable File

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