Simplify translation sync
Since we do not store any pot files in git anymore, the optimization to only push to the translation server if strings have changed, is not possible anymore. Remove this code now, this includes removing some git adds for pot files. Change-Id: I28ad9edc49b0f840cd51354334d7ae08aadab87a
This commit is contained in:
@@ -196,14 +196,11 @@ function setup_manuals {
|
||||
fi
|
||||
if [ ${IS_RST} -eq 1 ] ; then
|
||||
tox -e generatepot-rst -- ${DOCNAME}
|
||||
git add ${DocFolder}/${DOCNAME}/source/locale/${DOCNAME}.pot
|
||||
ZANATA_RULES="$ZANATA_RULES -r ${ZanataDocFolder}/${DOCNAME}/source/locale/${DOCNAME}.pot ${DocFolder}/${DOCNAME}/source/locale/{locale_with_underscore}/LC_MESSAGES/${DOCNAME}.po"
|
||||
else
|
||||
# Update the .pot file
|
||||
./tools/generatepot ${DOCNAME}
|
||||
if [ -f ${DocFolder}/${DOCNAME}/locale/${DOCNAME}.pot ]; then
|
||||
# Add all changed files to git
|
||||
git add ${DocFolder}/${DOCNAME}/locale/${DOCNAME}.pot
|
||||
ZANATA_RULES="$ZANATA_RULES -r ${ZanataDocFolder}/${DOCNAME}/locale/${DOCNAME}.pot ${DocFolder}/${DOCNAME}/locale/{locale_with_underscore}.po"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -100,25 +100,13 @@ case "$PROJECT" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add all changed files to git.
|
||||
# Note that setup_manuals did the git add already, so we can skip it
|
||||
# here.
|
||||
if [[ ! $PROJECT =~ api-site|ha-guide|openstack-manuals|operations-guide|security-doc ]]; then
|
||||
git add */locale/*
|
||||
fi
|
||||
if [ -d releasenotes/source/locale ] ; then
|
||||
git add releasenotes/source/locale
|
||||
fi
|
||||
# The Zanata client works out what to send based on the zanata.xml file.
|
||||
# Do not copy translations from other files for this change.
|
||||
zanata-cli -B -e push --copy-trans False
|
||||
# Move pot files to translation-source directory for publishing
|
||||
copy_pot "$ALL_MODULES"
|
||||
|
||||
if [ $(git diff --cached | egrep -v "(POT-Creation-Date|^[\+\-]#|^\+{3}|^\-{3})" | egrep -c "^[\-\+]") -gt 0 ]; then
|
||||
# The Zanata client works out what to send based on the zanata.xml file.
|
||||
# Do not copy translations from other files for this change.
|
||||
zanata-cli -B -e push --copy-trans False
|
||||
# Move pot files to translation-source directory for publishing
|
||||
copy_pot "$ALL_MODULES"
|
||||
|
||||
mv .translation-source translation-source
|
||||
fi
|
||||
mv .translation-source translation-source
|
||||
|
||||
# Tell finish function that everything is fine.
|
||||
ERROR_ABORT=0
|
||||
|
||||
Reference in New Issue
Block a user