Asciidoc translation: How to format entry for "//po4a: entry"?
by Mario Blättermann
Hello,
I'm trying to include an attribute string in the .pot file, but
haven't found the correct formatting yet. This is what I have in the
file header:
//po4a: entry :man manual:
= ionice(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: ionice
I like to translate the value of the "man manual" attribute, but it isn't
recognized. This is the command I use:
po4a-gettextize -f asciidoc -m ionice.1.adoc -p ionice.1.pot
Tried some other versions, with or without colons, with or without
citation, even the attribute entry instead of the attribute name. What
I have to do to get this into the .pot file?
Best Regards,
Mario
3 years, 7 months
english focus of po4a
by Marco Ciampa
Hello, devs,
I was translating the po4a docs when I stumbled into this:
#. type: textblock
#: doc/po4a.7.pod:13
msgid ""
"The idea is to reuse and adapt the gettext approach to this field. As with "
"gettext, texts are extracted from their original locations and presented to "
"translators as PO translation catalogs. The translators can leverage the "
"classical gettext tools to monitor the work to do, collaborate and organize "
"as teams. po4a then injects the translations directly into the documentation "
"structure to produce translated source files that can be processed and "
"distributed just like the English files. Any paragraph that is not "
"translated is left in English in the resulting document, ensuring that the "
"end users never see an outdated translation in the documentation."
I am wondering... would be possible, maybe in the future, to use po4a to
translate not only from english but also from another ausiliary language?
Why not, Esperanto, for instance?
--
Saluton,
Marco Ciampa
3 years, 7 months
Hugo/AsciiDoctor and po4a-translate
by Danilo G. Baio
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/documen...
PO:
https://github.com/doc-br/freebsd-doc-weblate/blob/main/documentation/con...
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)
3 years, 8 months
Asciidoc: How to format entry for "//po4a: entry"?
by mario.blaettermann@gmail.com
Hello,
I'm trying to include an attribute string in the .pot file, but
haven't found the correct formatting yet. This is what I have in the
file header:
//po4a: entry :man manual:
= ionice(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: ionice
I like to translate the value of the "man manual" attribute, but it isn't
recognized. This is the command I use:
po4a-gettextize -f asciidoc -m ionice.1.adoc -p ionice.1.pot
Tried some other versions, with or without colons, with or without
citation, even the attribute entry instead of the attribute name. What
I have to do to get this into the .pot file?
Best Regards,
Mario
3 years, 8 months
Re: translation clarification please help
by Marco Ciampa
On Tue, Mar 02, 2021 at 11:28:48PM +0300, Fat-Zer wrote:
> It's a debug message printed if XML module option `foldattributes` is
> specified i.e. with arguments `-o debug -o foldattributes`. When
> processing a non-inline tag. the rest is pretty much self-explanatory:
> In file foo.xml (first %s): "foldattributes" (setting name) setting is
> ignored because the tag '<bar>' (second %s) is not an inline tag".
>
> This can be helpful to debug why foldattributes is not kicking in when
> you want it to e.g. if you forgot to pass `-o inline='<bar>'`.
>
> For how "foldattributes" actually works and what inline tags are, see
> the module documentation:
> https://po4a.org/man/man3/Locale%3A%3APo4a%3A%3AXml.3pm.php
On second thought, I think that the option "folderattributes" should be
quoted to let it be clear for translators that that is the name of an
option and it should not be translated...
--
Saluton,
Marco Ciampa
3 years, 8 months
translation clarification please help
by Marco Ciampa
Hello devs,
would somebody be so kind to explain to me the meaning of this string I am willing to translate?
#: ../../lib/Locale/Po4a/Xml.pm:1589
#, perl-format
msgid "%s: foldattributes setting ignored since '%s' is not inline tag"
TIA!!!
--
Saluton,
Marco Ciampa
3 years, 8 months