aboutsummaryrefslogtreecommitdiffstats
path: root/tools/po-compile.sh
blob: 3581fdf689ce2423d45339ee3ff3de1d4b279f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

cd "$(readlink -f "$(dirname "$0")/..")"

find "$PWD/po" -type f -name '*.po' | \
while read po_file; do
	language="$(basename "$po_file")"
	language="${language%.po}"
	target="$PWD/share/locale/$language/LC_MESSAGES/isodumper.mo"
	/bin/mkdir --parents "$(dirname "$target")"
	/usr/bin/msgfmt \
		--check \
		--output-file="$target" \
		"$po_file"
done