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] in openstack-manuals.
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: I54180d12de0cfdd618f6789b6cf9ec66d3276a40
This commit is contained in:
Akihiro Motoki 2023-09-18 17:00:23 +09:00
parent 456dcb52e9
commit 4c4712865b

View File

@ -34,9 +34,8 @@ rm $DOCNAME/source/locale/common.pot
# Take care of deleting all temporary files so that git add
# doc/$DOCNAME/source/locale will only add the single pot file.
# Remove UUIDs, those are not necessary and change too often
msgcat --sort-by-file $DOCNAME/source/locale/*.pot | \
awk '$0 !~ /^\# [a-z0-9]+$/' > $DOCNAME/source/$DOCNAME.pot
msgcat --sort-by-file $DOCNAME/source/locale/*.pot \
> $DOCNAME/source/$DOCNAME.pot
rm $DOCNAME/source/locale/*.pot
rm -rf $DOCNAME/source/locale/.doctrees/
mv $DOCNAME/source/$DOCNAME.pot $DOCNAME/source/locale/$DOCNAME.pot