raspap-webgui/locale/pocompile.sh

15 lines
380 B
Bash
Raw Permalink Normal View History

2019-03-05 00:15:00 +01:00
#!/bin/bash
# Compiles portable object (.po) files into machine object (.mo) files
# Requires GNU gettext
# Install with: apt-get install gettext
2019-03-05 00:15:00 +01:00
arrLocales=($PWD/*/);
# compiles message catalogs to binary format
for f in "${arrLocales[@]}"; do
echo -n `msgfmt -o ${f}LC_MESSAGES/messages.mo ${f}LC_MESSAGES/messages.po`
echo "Compiled ${f}LC_MESSAGES/messages.po"
done