mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00

# Conflicts: # .github/scripts/trailing-newlines.sh # Makefile # qt/tools/typecheck-setup.sh # react/Makefile # rspy/Makefile # svelte/Makefile # tslib/Makefile
21 lines
482 B
Bash
Executable file
21 lines
482 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# build mo files
|
|
#
|
|
|
|
set -eu -o pipefail ${SHELLFLAGS}
|
|
|
|
targetDir="../aqt_data/locale/gettext"
|
|
mkdir -p $targetDir
|
|
|
|
echo "Compiling *.po..."
|
|
for file in repo/desktop/*/anki.po
|
|
do
|
|
outdir=$(echo "$file" | \
|
|
perl -pe "s%repo/desktop/(.*)/anki.po%$targetDir/\1/LC_MESSAGES%")
|
|
outfile="$outdir/anki.mo"
|
|
mkdir -p $outdir
|
|
(msgmerge -q "$file" repo/desktop/anki.pot | msgfmt - --output-file="$outfile") || (
|
|
echo "error building $file"
|
|
)
|
|
done
|