Locale::Po4a::Text(3pm) | Po4a Tools | Locale::Po4a::Text(3pm) |
NAME¶
Locale::Po4a::Text - convert text documents from/to PO files
DESCRIPTION¶
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::Text is a module to help the translation of text documents into other [human] languages.
Paragraphs are split on empty lines (or lines containing only spaces or tabulations).
If a paragraph contains a line starting by a space (or tabulation), this paragraph won't be rewrapped.
OPTIONS ACCEPTED BY THIS MODULE¶
These are this module's particular options:
- keyvalue
- Treat paragraphs that look like a key value pair as verbatim (with the no-wrap flag in the PO file). Key value pairs are defined as a line containing one or more non-colon and non-space characters followed by a colon followed by at least one non-space character before the end of the line.
- nobullets
- Deactivate the detection of bullets.
By default, when a bullet is detected, the bullet paragraph is not considered as a verbatim paragraph (with the no-wrap flag in the PO file). Instead, the corresponding paragraph is rewrapped in the translation.
- tabs=mode
- Specify how tabulations shall be handled. The mode can be any of:
By default, tabulations are considered as spaces.
- breaks=regex
- A regular expression matching lines which introduce breaks. The regular expression will be anchored so that the whole line must match.
- debianchangelog
- Handle the header and footer of released versions, which only contain non translatable informations.
- fortunes
- Handle the fortunes format, which separate fortunes with a line which consists in '%' or '%%', and use '%%' as the beginning of a comment.
- markdown
- Handle some special markup in Markdown-formatted texts.
- yfm_keys (markdown-only)
- Comma-separated list of keys to process for translation in the YAML Front Matter section. All other keys are skipped. Keys are matched with a case-insensitive match. Array values are always translated, unless the yfm_skip_array option is provided.
- yfm_skip_array (markdown-only)
- Do not translate array values in the YAML Front Matter section.
- control[=taglist]
- Handle control files. A comma-separated list of tags to be translated can be provided.
- neverwrap
- Prevent po4a from wrapping any lines. This means that every content is handled verbatim, even simple paragraphs.
STATUS OF THIS MODULE¶
Tested successfully on simple text files and NEWS.Debian files.
AUTHORS¶
Nicolas François <nicolas.francois@centraliens.net>
COPYRIGHT AND LICENSE¶
Copyright © 2005-2008 Nicolas FRANÇOIS <nicolas.francois@centraliens.net>. Copyright © 2008-2009, 2018 Jonas Smedegaard <dr@jones.dk>. Copyright © 2020 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).
2022-01-09 | Po4a Tools |