tools/translate: Use po4a-updatepo to extract strings from the source files

This commit is contained in:
Danilo G. Baio 2023-04-20 21:14:01 -03:00
parent fa6e3fed47
commit 8fd03d23ef
1 changed files with 12 additions and 25 deletions

View File

@ -76,31 +76,18 @@ for component in $COMPONENTS; do
dirbase=$(dirname "$document") dirbase=$(dirname "$document")
echo "$document" echo "$document"
if [ -f "$dirbase/$name.po" ]; then po4a-updatepo \
po4a-updatepo \ --format asciidoc \
--format asciidoc \ --option compat=asciidoctor \
--option compat=asciidoctor \ --option tablecells=1 \
--option tablecells=1 \ --option yfm_keys=title,part,description \
--option yfm_keys=title,part,description \ --master "$document" \
--master "$document" \ --master-charset "UTF-8" \
--master-charset "UTF-8" \ --copyright-holder "The FreeBSD Project" \
--copyright-holder "The FreeBSD Project" \ --package-name "FreeBSD Documentation" \
--package-name "FreeBSD Documentation" \ --po "$dirbase/$name.po"
--po "$dirbase/$name.po" if [ -f "$dirbase/$name.po~" ]; then
if [ -f "$dirbase/$name.po~" ]; then rm -f "$dirbase/$name.po~"
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"
fi fi
done done
done done