anki/qt/i18n/build-mo-files

18 lines
350 B
Plaintext
Raw Normal View History

2020-01-02 22:59:00 +01:00
#!/bin/bash
#
# build mo files
#
2020-01-02 23:24:59 +01:00
targetDir="../aqt_data/locale"
2020-01-02 22:59:00 +01:00
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