Trim obsolete translations from PO files. These are translations for

text which does not exist in the original English document any more.
This commit is contained in:
Warren Block 2017-08-14 21:08:28 +00:00
parent f51fb1c52d
commit 502f6e6848
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50677
2 changed files with 3 additions and 1 deletions

View file

@ -82,6 +82,7 @@ ITSTOOL?= ${PREFIX}/bin/itstool
JING?= ${PREFIX}/bin/jing
MSGATTRIB?= ${PREFIX}/bin/msgattrib
MSGFMT?= ${PREFIX}/bin/msgfmt
MSGMERGE?= ${PREFIX}/bin/msgmerge

View file

@ -366,7 +366,8 @@ ${PO_LANG}.po: ${DOC}.translate.xml
@${ITSTOOL} -o ${PO_LANG}.po.tmp ${DOC}.translate.xml
@( if [ -f "${PO_LANG}.po" ]; then \
echo "${PO_LANG}.po exists, merging" ; \
${MSGMERGE} -o ${PO_LANG}.po.new ${PO_LANG}.po ${PO_LANG}.po.tmp ;\
${MSGMERGE} -o ${PO_LANG}.po.new ${PO_LANG}.po ${PO_LANG}.po.tmp ; \
${MSGATTRIB} --no-obsolete -o ${PO_LANG}.po.new ${PO_LANG}.po ; \
${MV} ${PO_LANG}.po.new ${PO_LANG}.po ; \
${RM} ${PO_LANG}.po.tmp ; \
else \