Locale::Po4a::Sgml - convert SGML documents from/to PO files

NAME

Locale::Po4a::Sgml - convert SGML 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::Sgml is a module to help the translation of documentation in the SGML format into other [human] languages.

This module uses onsgmls(1) to parse the SGML files. Make sure it is installed. Also make sure that the DTD of the SGML files are installed in the system.

OPTIONS ACCEPTED BY THIS MODULE

debug

Space-separated list of keywords indicating which category of extra debug messages should be shown. Possible values are: entities, generic, onsgml, refs and tag.

verbose

Give more information about what's going on.

translate

Space-separated list of extra tags (beside the DTD provided ones) whose content should form an extra msgid, i.e that should be translated.

section

Space-separated list of extra tags (beside the DTD provided ones) containing other tags, some of them being of category translate.

indent

Space-separated list of tags which increase the indentation level. This will affect the identation in the resulting document.

verbatim

The layout within those tags should not be changed. The paragraph won't get wrapped, and no extra indentation space or new line will be added for cosmetic purpose.

empty

Tags not needing to be closed.

ignore

Tags ignored and considered as plain char data by po4a. That is to say that they can be part of an msgid. For example, <b> is a good candidate for this category since putting it in the translate section would create a msgids with only its content, (and it's ususally not a whole sentence), which is bad.

attributes

A space-separated list of attributes that need to be translated. You can specify the attributes by their name (for example, lang), but you can also prefix it with a tag hierarchy, to specify that this attribute will only be translated when it is into the specified tag. For example: <bbb><aaa>lang specifies that the lang attribute will only be translated if it is in an <aaa> tag, which is in a <bbb> tag. The tag names are actually regular expressions so you can also write things like <aaa|bbb>lang to only translate lang attributes that are in an <aaa> or a <bbb> tag.

qualify

A space-separated list of attributes for which the translation must be qualified by the attribute name, i.e. the text extracted for the transalation will include both the attributes name and it's value. e.g. for a tag like <aaa lang_en="foo"> translators will be presented with the string lang_en="foo". Note that this also automatically adds the given attribute into the attributes list too.

force

Proceed even if the DTD is unknown or if onsgmls finds errors in the input file.

include-all

By default, msgids containing only one entity (like &version;) are skipped for the translators' comfort. Activating this option prevents this optimisation. It can be useful if the document contains a construction like <title>&Aacute;</title>, even if I doubt such things to ever happen...

ignore-inclusion

Space-separated list of entities that won't be inlined. Use this option with caution: it may cause onsgmls (used internally) to add tags and render the output document invalid.

STATUS OF THIS MODULE

The result is perfect. I.e., the generated documents are exactly the same as the originals. But there are still some problems:

AUTHORS

This module is an adapted version of sgmlspl (SGML postprocessor for the ONSGMLS parser) which was:

Copyright © 1995 David Megginson <dmeggins@aix1.uottawa.ca>

The adaptation for po4a was done by:

Denis Barbier <barbier@linuxfr.org>
Martin Quinson (mquinson#debian.org)

COPYRIGHT AND LICENSE

Copyright © 1995 David Megginson <dmeggins@aix1.uottawa.ca>.
Copyright © 2002-2005 SPI, Inc.

This program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file).

 Locale::Po4a::Sgml - convert SGML documents from/to PO files