git: 8fd03d23ef - main - tools/translate: Use po4a-updatepo to extract strings from the source files

From: Danilo G. Baio <dbaio_at_FreeBSD.org>
Date: Fri, 21 Apr 2023 00:15:45 UTC
The branch main has been updated by dbaio:

URL: https://cgit.FreeBSD.org/doc/commit/?id=8fd03d23efc4443ec6260bbff2520a2bc556c5a5

commit 8fd03d23efc4443ec6260bbff2520a2bc556c5a5
Author:     Danilo G. Baio <dbaio@FreeBSD.org>
AuthorDate: 2023-04-21 00:14:01 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2023-04-21 00:14:01 +0000

    tools/translate: Use po4a-updatepo to extract strings from the source files
---
 tools/update_translate_template.sh | 37 ++++++++++++-------------------------
 1 file changed, 12 insertions(+), 25 deletions(-)

diff --git a/tools/update_translate_template.sh b/tools/update_translate_template.sh
index 00509a031b..d205decc38 100755
--- a/tools/update_translate_template.sh
+++ b/tools/update_translate_template.sh
@@ -76,31 +76,18 @@ for component in $COMPONENTS; do
 		dirbase=$(dirname "$document")
 		echo "$document"
 
-		if [ -f "$dirbase/$name.po" ]; then
-			po4a-updatepo \
-				--format asciidoc \
-				--option compat=asciidoctor \
-				--option tablecells=1 \
-				--option yfm_keys=title,part,description \
-				--master "$document" \
-				--master-charset "UTF-8" \
-				--copyright-holder "The FreeBSD Project" \
-				--package-name "FreeBSD Documentation" \
-				--po "$dirbase/$name.po"
-			if [ -f "$dirbase/$name.po~" ]; then
-				rm -f "$dirbase/$name.po~"
-			fi
-		else
-			po4a-gettextize \
-				--format asciidoc \
-				--option compat=asciidoctor \
-				--option tablecells=1 \
-				--option yfm_keys=title,part,description \
-				--master "$document" \
-				--master-charset "UTF-8" \
-				--copyright-holder "The FreeBSD Project" \
-				--package-name "FreeBSD Documentation" \
-				--po "$dirbase/$name.po"
+		po4a-updatepo \
+			--format asciidoc \
+			--option compat=asciidoctor \
+			--option tablecells=1 \
+			--option yfm_keys=title,part,description \
+			--master "$document" \
+			--master-charset "UTF-8" \
+			--copyright-holder "The FreeBSD Project" \
+			--package-name "FreeBSD Documentation" \
+			--po "$dirbase/$name.po"
+		if [ -f "$dirbase/$name.po~" ]; then
+			rm -f "$dirbase/$name.po~"
 		fi
 	done
 done