Locale::Po4a::AsciiDoc(3pm) | Po4a Tools | Locale::Po4a::AsciiDoc(3pm) |
Locale::Po4a::AsciiDoc - convert AsciiDoc documents from/to PO files
The po4a (PO for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like documentation.
Locale::Po4a::AsciiDoc is a module to help the translation of documentation in the AsciiDoc format.
These are this module's particular options:
In a definitions file, lines must not start by two slashes, but directly by po4a:.
By default, po4a will not wrap the produced AsciiDoc files because a manual inspection is mandated to ensure that the wrapping does not change the formatting. Consider for instance the following list item:
* a long sentence that is ending with a number 1. A second sentence.
If the wrapping leads to the following presentation, the item is split into a numbered sub-list. To make things worse, only the speakers of the language used in the translation can inspect the situation.
* a long sentence that is ending with a number 1. A second sentence.
Note that not wrapping the files produced by po4a should not be a problem since those files are meant to be processed automatically. They should not be regarded as source files anyway.
With this option, po4a will produce better-looking source files, that may lead to possibly erroneous formatted outputs.
The AsciiDoc module can be customized with lines starting by //po4a:. These lines are interpreted as commands to the parser. The following commands are recognized:
The attribute list argument is a comma separated list which contains information about translatable arguments. This list contains either numbers, to define positional parameters, or named attributes.
If a plus sign (+) is prepended to name, then the macro and its arguments are translated as a whole. There is no need to define attribute list in this case, but brackets must be present.
The attribute list argument is a comma separated list which contains information about translatable arguments. This list contains either numbers, to define positional parameters, or named attributes. The first attribute is the style name, it will not be translated.
If a plus sign (+) is prepended to the style name, then the attribute list is translated as a whole. There is no need to define translatable attributes.
If a minus sign (-) is prepended to the style name, then this attribute is not translated.
Tested successfully on simple AsciiDoc files.
Nicolas François <nicolas.francois@centraliens.net> Denis Barbier <barbier@linuxfr.org>
Copyright © 2005-2008 Nicolas FRANÇOIS <nicolas.francois@centraliens.net>. Copyright © 2012 Denis BARBIER <barbier@linuxfr.org>. Copyright © 2017 Martin Quinson <mquinson#debian.org>.
This program is free software; you may redistribute it and/or modify it under the terms of GPL (see the COPYING file).
__END__
# LocalWords: Charset charset AsciiDoc tablecells po UTF gettext msgid nostrip
2023-01-03 | Po4a Tools |