anki/qt/i18n/build-mo-files
Damien Elmes 22e8b7cd84 use -q instead of --for-msgfmt so older gettext versions don't break
I was mainly using it to keep the output tidy anyway
2020-02-25 13:52:40 +10:00

19 lines
411 B
Bash
Executable File

#!/bin/bash
#
# build mo files
#
set -eo pipefail
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 -q "$file" po/desktop/anki.pot | msgfmt - --output-file="$outfile"
done