1.1 --- a/tools/i18n_format.sh Fri Apr 22 23:38:31 2016 +0200
1.2 +++ b/tools/i18n_format.sh Fri Apr 22 23:57:47 2016 +0200
1.3 @@ -1,5 +1,9 @@
1.4 #!/bin/sh
1.5
1.6 +if ! which msgfmt > /dev/null 2>&1 ; then
1.7 + exit 1
1.8 +fi
1.9 +
1.10 DOMAIN=imip-agent
1.11
1.12 for FILENAME in messages/*.po ; do
2.1 --- a/tools/install.sh Fri Apr 22 23:38:31 2016 +0200
2.2 +++ b/tools/install.sh Fri Apr 22 23:57:47 2016 +0200
2.3 @@ -130,11 +130,22 @@
2.4
2.5 # Locale directory.
2.6
2.7 -if [ ! "$NO_LOCALE_DIR" ] && [ -e "locale" ]; then
2.8 - for DIR in "locale/"*"/LC_MESSAGES" ; do
2.9 - mkdir -p "$INSTALL_DIR/$DIR"
2.10 - cp "$DIR/"*.mo "$INSTALL_DIR/$DIR/"
2.11 - done
2.12 +if [ ! "$NO_LOCALE_DIR" ]; then
2.13 +
2.14 + # Make the locale directory if it does not exist.
2.15 +
2.16 + if [ ! -e "locale" ]; then
2.17 + "tools/i18n_format.sh"
2.18 + fi
2.19 +
2.20 + # Only copy the translations if they do now exist.
2.21 +
2.22 + if [ -e "locale" ]; then
2.23 + for DIR in "locale/"*"/LC_MESSAGES" ; do
2.24 + mkdir -p "$INSTALL_DIR/$DIR"
2.25 + cp "$DIR/"*.mo "$INSTALL_DIR/$DIR/"
2.26 + done
2.27 + fi
2.28 fi
2.29
2.30 # Run the scheduling module update tool to regenerate the manifest module.