aboutsummaryrefslogtreecommitdiffstats
path: root/tools/po-compile.sh
blob: 2b4d36451f153cfa710ed2de52ecbf2c01bc8a4a (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/po/$language/LC_MESSAGES/isodumper.mo"
	/bin/mkdir --parents "$(dirname "$target")"
	/usr/bin/msgfmt \
		--check \
		--output-file="$target" \
		"$po_file"
done