From 4c4712865b2b29c804a4b94d105359da8fb1673d Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Mon, 18 Sep 2023 17:00:23 +0900 Subject: [PATCH] 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] https://opendev.org/openstack/openstack-manuals/commit/993647f316fbe33a513baffb5cc4ad156355da8a [2] https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-gettext_uuid Related-Bug: #2035226 Change-Id: I54180d12de0cfdd618f6789b6cf9ec66d3276a40 --- tools/generatepot-rst.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/generatepot-rst.sh b/tools/generatepot-rst.sh index c3b6d1a7..ca1bcf01 100755 --- a/tools/generatepot-rst.sh +++ b/tools/generatepot-rst.sh @@ -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