Hello.

Facing another issue, now in the last step (po4a-translate).

I noted that the PO file is being generated ok, but when we are
translating it, some lines (that are not translatable) are different
from the original document.

Like these:
```
ifeval::["{backend}" == "html5"]
-->
ifeval::["{backend}",  == "html5"]

include::{chapters-path}porting-why/chapter.adoc[leveloffset=+1,
lines=7..21;32..-1]
-->
include::{chapters-path}porting-why/chapter.adoc[leveloffset=+1,,
lines=7..21;32..-1]
```

How to reproduce:

$ git clone https://github.com/doc-br/freebsd-doc-weblate.git && cd
freebsd-doc-weblate

$ po4a-updatepo \
  --format asciidoc \
  --option compat=asciidoctor \
  --option yfm_keys=title,part \
  --master "documentation/content/en/books/porters-handbook/_index.adoc" \
  --master-charset "UTF-8" \
  --copyright-holder "The FreeBSD Project" \
  --package-name "FreeBSD Documentation" \
  --po "documentation/content/pt_BR/books/porters-handbook/_index.po"

$ po4a-translate \
  --format asciidoc \
  --option debug=split_attributelist \
  --option verbose=1 \
  --option compat=asciidoctor \
  --option yfm_keys=title,part \
  --master "documentation/content/en/books/porters-handbook/_index.adoc" \
  --master-charset "UTF-8" \
  --po "documentation/content/pt_BR/books/porters-handbook/_index.po" \
  --localized "documentation/content/pt_BR/books/porters-handbook/_index.adoc" \
  --localized-charset "UTF-8" \
  --keep 0
po4a::transtractor::process: Read PO file
documentation/content/pt_BR/books/porters-handbook/_index.po
po4a::transtractor::process: Read document
documentation/content/en/books/porters-handbook/_index.adoc
po4a::transtractor::process: Call parse()
Splitting attributes in: "{backend}" == "html5"
  -> "{backend}"
  ->  == "html5"
Splitting attributes in: "{backend}" == "pdf"
  -> "{backend}"
  ->  == "pdf"
Splitting attributes in: "{backend}" == "epub3"
  -> "{backend}"
  ->  == "epub3"
Splitting attributes in: leveloffset=+1, lines=7..21;32..-1
  -> leveloffset=+1,
  ->  lines=7..21;32..-1
Splitting attributes in: leveloffset=+1, lines=7..21;32..-1
  -> leveloffset=+1,
  ->  lines=7..21;32..-1
Splitting attributes in: leveloffset=+1, lines=7..21;32..-1
  -> leveloffset=+1,
  ->  lines=7..21;32..-1
[...]
po4a::transtractor::process: Done parse()

Master document:
https://raw.githubusercontent.com/doc-br/freebsd-doc-weblate/main/documentation/content/en/books/porters-handbook/_index.adoc

PO:
https://github.com/doc-br/freebsd-doc-weblate/blob/main/documentation/content/pt_BR/books/porters-handbook/_index.po

Output of documentation/content/pt_BR/books/porters-handbook/_index.adoc:
https://gist.github.com/dbaio/0a925993afa6b8b3298c823d51d151c0


Is there a way to skip those lines when translating it or this is
something we need to handle in code?

Thanks in advance for any advice here.
-- 
Danilo G. Baio (dbaio)
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to