1
0
mirror of https://git.FreeBSD.org/doc.git synced 2026-06-02 11:25:20 +00:00

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
+12 -25
View File
@@ -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