*#!/bin/bash WORKDIR="$(dirname $(readlink -f $0))" function generate_locale() { echo "--- Begin : $1" if [ -f $1.po ] then msgmerge --update --backup=none $1.po messages.pot else msginit --no-translator --input=messages.pot --locale=$1 fi echo "--- Check : $1" msgfmt $1.po --check echo "--- End : $1" } ORIGIN=$PWD cd $WORKDIR ####################### # LIST LANGUAGE : START ####################### generate_locale fr generate_locale en ###################### # LIST LANGUAGE : END ###################### cd $ORIGIN