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

18 lines
358 B
Bash
Executable File

#!/bin/bash
#
# build mo files
#
targetDir="../anki-qt/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