generatepot-rst.sh: Drop UUID filtering
tools/generatepot-rst.sh has an awk filter to drop UUID from POT files,
but it is unnecessary now. It was introduced to strip UUID information
which was added by default in Sphinx <1.3 [1]. Sphinx >=1.3 does not
output UUID information by default [2], so is is no longer needed.
In addition, (g)awk 5.0 or later (adopted in Ubuntu 20.04 or later)
complains the current awk regexp. I think it is the time to drop it
rather than fixing the regexp.
[1] 993647f316
[2] https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-gettext_uuid
Related-Bug: #2035226
Change-Id: Ie7babf5a815a8e0a602752e862fdb30814b0fbd1
This commit is contained in:
parent
4abe38f673
commit
05acdbc2ff
@ -66,8 +66,7 @@ if [[ "$REPOSITORY" = "openstack-manuals" && "$DOCNAME" = "common" ]] ; then
|
|||||||
# In case of common, we use the working directory 'common-work'.
|
# In case of common, we use the working directory 'common-work'.
|
||||||
# Copies the generated POT to common/source/locale
|
# Copies the generated POT to common/source/locale
|
||||||
# and finally removes the working directory.
|
# and finally removes the working directory.
|
||||||
msgcat ${DIRECTORY}/source/locale/common.pot | \
|
msgcat ${DIRECTORY}/source/locale/common.pot \
|
||||||
awk '$0 !~ /^\# [a-z0-9]+$/' \
|
|
||||||
> ${TOPDIR}common/source/locale/common.pot
|
> ${TOPDIR}common/source/locale/common.pot
|
||||||
rm -rf $DIRECTORY
|
rm -rf $DIRECTORY
|
||||||
else
|
else
|
||||||
@ -77,9 +76,8 @@ else
|
|||||||
# Take care of deleting all temporary files so that
|
# Take care of deleting all temporary files so that
|
||||||
# "git add ${DIRECTORY}/source/locale" will only add the
|
# "git add ${DIRECTORY}/source/locale" will only add the
|
||||||
# single pot file.
|
# single pot file.
|
||||||
# Remove UUIDs, those are not necessary and change too often
|
msgcat --sort-by-file ${DIRECTORY}/source/locale/*.pot \
|
||||||
msgcat --sort-by-file ${DIRECTORY}/source/locale/*.pot | \
|
> ${DIRECTORY}/source/$DOCNAME.pot
|
||||||
awk '$0 !~ /^\# [a-z0-9]+$/' > ${DIRECTORY}/source/$DOCNAME.pot
|
|
||||||
rm ${DIRECTORY}/source/locale/*.pot
|
rm ${DIRECTORY}/source/locale/*.pot
|
||||||
rm -rf ${DIRECTORY}/source/locale/.doctrees/
|
rm -rf ${DIRECTORY}/source/locale/.doctrees/
|
||||||
mv ${DIRECTORY}/source/$DOCNAME.pot ${DIRECTORY}/source/locale/$DOCNAME.pot
|
mv ${DIRECTORY}/source/$DOCNAME.pot ${DIRECTORY}/source/locale/$DOCNAME.pot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user