altocompta/dev/extract_text.sh
Dany De Bontridder d5449d656c Translate
2018-11-20 22:32:48 +01:00

26 lines
703 B
Bash

#!/bin/bash
# Brief : extract strings from the file, in order to update a
# po file. It is used for the translation
#
#
# This file is a part of NOALYSS under GPL
# Author D. DE BONTRIDDER danydb@aevalys.eu
echo "Extract"
cd ..
FILE=/tmp/file-list.$$
find . -type f -name \*.php > $FILE
# CATALOG
xgettext -L PHP -j --from-code=UTF-8 -p html/lang -f $FILE
# For dutch
echo "Dutch"
msgmerge -U -s html/lang/nl_NL/LC_MESSAGES/messages.po html/lang/messages.po
#For english
echo "English"
msgmerge -U -s html/lang/en_US/LC_MESSAGES/messages.po html/lang/messages.po
#For new language
# export LOCAL=nl_NL
# msginit --locale=$LOCAL -i html/lang/messages.po -o html/lang/$LOCAL/LC_MESSAGES/messages.po