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) tools/opt_types.sh ejabberd_option $(EBINDIR)
translations: translations:
tools/prepare-tr.sh tools/prepare-tr.sh $(DEPSDIR)
edoc: edoc:
$(ERL) -noinput +B -eval \ $(ERL) -noinput +B -eval \

View File

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