Use msginit to initialize translation files (rather than bare cp)

master
Sandro Santilli 2022-01-10 14:57:07 +01:00
parent 9dd9650279
commit e9a1847709
2 changed files with 7 additions and 1 deletions

View File

@ -197,6 +197,11 @@ if test "x$MSGMERGE" = "x"; then
AC_MSG_WARN([msgmerge is not installed so translations cannot be updated])
fi
AC_PATH_PROG([MSGINIT], [msginit], [])
if test "x$MSGINIT" = "x"; then
AC_MSG_WARN([msginit is not installed so new translations cannot be initialized])
fi
CAN_BUILD_PDF=${CAN_BUILD_COMMENTS}
AC_PATH_PROG([CONVERT], [convert], [])

View File

@ -81,6 +81,7 @@ DBLATEX=@DBLATEX@
# Gettext for translated documentation
MSGMERGE=@MSGMERGE@
MSGINIT=@MSGINIT@
# XML gettext tools
XML2POT=@XML2POT@
@ -199,7 +200,7 @@ update-po: $(XML_INPUTS_POT)
if test -f $$po; then \
$(MSGMERGE) --update $$po $$pot; \
else \
cp $$pot $$po; \
$(MSGINIT) -i $$pot -o $$po -l $$lang --no-translator; \
fi; \
done; \
done