2016-04-22 | Paul Boddie | raw annotate files changeset graph | Build the translation files when installing if they are absent. |
1 #!/bin/sh 2 3 if ! which msgfmt > /dev/null 2>&1 ; then 4 exit 1 5 fi 6 7 DOMAIN=imip-agent 8 9 for FILENAME in messages/*.po ; do 10 LOCALE_ID=`basename "$FILENAME" ".$DOMAIN.po"` 11 mkdir -p "locale/$LOCALE_ID/LC_MESSAGES" 12 msgfmt -o "locale/$LOCALE_ID/LC_MESSAGES/$DOMAIN.mo" "$FILENAME" 13 done