mirror of https://git.FreeBSD.org/doc.git
tools/translate: Use po4a-updatepo to extract strings from the source files
This commit is contained in:
parent
fa6e3fed47
commit
8fd03d23ef
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue