Fixed pot files being updated when only the timestamp changed
This commit is contained in:
parent
1d944471d3
commit
41bfaa189d
1 changed files with 14 additions and 2 deletions
|
@ -263,7 +263,13 @@ macro(GettextTranslate)
|
||||||
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
|
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
|
||||||
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
||||||
-o ${PO_FILE_NAME}.new
|
-o ${PO_FILE_NAME}.new
|
||||||
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
|
COMMAND if diff ${PO_FILE_NAME} ${PO_FILE_NAME}.new
|
||||||
|
--unchanged-line-format='' --old-line-format=''
|
||||||
|
| grep -v 'POT-Creation-Date' >/dev/null\; then
|
||||||
|
mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}\;
|
||||||
|
else
|
||||||
|
rm ${PO_FILE_NAME}.new\;
|
||||||
|
fi
|
||||||
DEPENDS ${TEMPLATE_FILE_ABS}
|
DEPENDS ${TEMPLATE_FILE_ABS}
|
||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
|
@ -271,7 +277,13 @@ macro(GettextTranslate)
|
||||||
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE}
|
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE}
|
||||||
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
|
||||||
-o ${PO_FILE_NAME}.new
|
-o ${PO_FILE_NAME}.new
|
||||||
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
|
COMMAND if diff ${PO_FILE_NAME} ${PO_FILE_NAME}.new
|
||||||
|
--unchanged-line-format='' --old-line-format=''
|
||||||
|
| grep -v 'POT-Creation-Date' >/dev/null\; then
|
||||||
|
mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}\;
|
||||||
|
else
|
||||||
|
rm ${PO_FILE_NAME}.new\;
|
||||||
|
fi
|
||||||
DEPENDS ${TEMPLATE_FILE_ABS}
|
DEPENDS ${TEMPLATE_FILE_ABS}
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue