25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Improve support for rebar3 in "make translations"

This commit is contained in:
Badlop 2021-02-16 18:46:27 +01:00
parent 7da033f733
commit 09f5e2aa03
2 changed files with 10 additions and 13 deletions

View File

@ -149,7 +149,7 @@ options: all
tools/opt_types.sh ejabberd_option $(EBINDIR)
translations:
tools/prepare-tr.sh
tools/prepare-tr.sh $(DEPSDIR)
edoc:
$(ERL) -noinput +B -eval \

View File

@ -10,7 +10,7 @@
extract_lang_src2pot ()
{
./tools/extract-tr.sh src deps/xmpp/src > $PO_DIR/ejabberd.pot
./tools/extract-tr.sh src $DEPS_DIR/xmpp/src > $PO_DIR/ejabberd.pot
}
extract_lang_popot2po ()
@ -103,19 +103,16 @@ extract_lang_updateall ()
EJA_DIR=`pwd`
PROJECT=ejabberd
DEPS_DIR=$1
MSGS_DIR=$EJA_DIR/priv/msgs
LOG=/tmp/ejabberd-translate-errors.log
if [ -f $EJA_DIR/deps/ejabberd_po/src/ejabberd.pot ]; then
PO_DIR=$EJA_DIR/deps/ejabberd_po/src/
else
if [ -f $EJA_DIR/_build/default/lib/ejabberd_po/src/ejabberd.pot ]; then
PO_DIR=$EJA_DIR/_build/default/lib/ejabberd_po/src
else
echo "Couldn't find the required ejabberd_po repository."
PO_DIR=$EJA_DIR/$DEPS_DIR/ejabberd_po/src/
if [ ! -f $EJA_DIR/$DEPS_DIR/ejabberd_po/src/ejabberd.pot ]; then
echo "Couldn't find the required ejabberd_po repository in"
echo " $PO_DIR"
echo "Run: ./configure --enable-tools; ./rebar get-deps"
exit 1
fi
fi
echo "Using PO files found in $PO_DIR."
echo "Using PO files from $PO_DIR."
extract_lang_updateall