summaryrefslogtreecommitdiff
path: root/pocompile.sh
blob: e9cf3b18fe957e20c03dce7571d901756d41ed9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Helper script to compile all .po files in the i18n directroy into .mo files.

# Copied from porthole :)
cd i18n
for ITEM in *.po; do
	LANG=${ITEM/.po/}

	if [ $1 == "-emerge" ]; then
		mkdir mo -p
		msgfmt ${ITEM} -o mo/${LANG}.mo
	else
		mkdir ${LANG}/LC_MESSAGES -p
		msgfmt ${ITEM} -o ${LANG}/LC_MESSAGES/portato.mo
	fi
done