anki/qt/i18n/build-mo-files
Damien Elmes cd8d1b5dcd merge po with pot before building mo
fixes errors in strings that have been removed from the template
2020-02-24 15:35:52 +10:00

18 lines
398 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
msgmerge --for-msgfmt $file po/desktop/anki.pot | msgfmt - --output-file=$outfile
done