git: 8fd03d23ef - main - tools/translate: Use po4a-updatepo to extract strings from the source files
"Danilo G. Baio" <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.doc |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by dbaio: URL: https://cgit.FreeBSD.org/doc/commit/?id=8fd03d23efc4443ec6260bbff2520a2bc556c5a5 commit 8fd03d23efc4443ec6260bbff2520a2bc556c5a5 Author: Danilo G. Baio <[email protected]> AuthorDate: 2023-04-21 00:14:01 +0000 Commit: Danilo G. Baio <[email protected]> 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