[Po4a-devel] Translatable attributes in HTML

Nicolas François nicolas.francois at centraliens.net
Wed Aug 8 15:34:33 UTC 2007


Hello,

On Wed, Aug 08, 2007 at 03:20:24PM +0300, yavor at gnu.org wrote:
> On Wed, Aug 08, 2007 at 02:16:01PM +0200, Nicolas Franзois wrote:
> > IMO, if the #include thing does not do nasty things, like opening a 
> > tag in one file and closing it in another, there should be no problem. 
> 
> It does nasty things; here's an example:
> http://web.cvs.savannah.gnu.org/viewvc/www/philosophy/schools.html?revision=1.30&root=www&view=markup

Thanks for the pointer.

It seems it's a common feature (SSI), so I will consider implementing it
in the Xhtml module.

I can also add an option to support invalid Xml files (In this case, a div
section is closed but the parser do not see the opening tag since it is
in the included file).

Regarding file inclusion, here is how it works with the other po4a formats
which support file inclusion:
    When po4a parses the master file, it reads the other files when they
    are included and includes the file in the generated translation (i.e.
    the generated file will not have #include stanza).
Is it a problem? [0]

This may change the spirit of the translated header.html or banner.html
(e.g. header.bg.html), since they won't be used anymore (but the same
translation for every files may be enforced if they use the same PO file,
and the existing translation can be re-used quite easily using
po4a-gettextize).

Another option could be added to support reading the included file (to
build the tag tree), without really including it. (I currently don't see
the need for such an option, see also [0])

To use the current Xhtml module, you could move the opening <div>s from
the end of the banner to the beginning of school.html, and make a footer
which closes what the header opened.
(I understand that it may mean to change a lot files in this server)


[0] I don't think it is a problem. These #include are useful to avoid
rewriting always the same section and to enforce consistency between
pages. In the case of generated files, this is not a problem. The
documents will be a bit bigger, but we are just talking about a few
kilobytes.


Kind Regards,
-- 
Nekral



More information about the Po4a-devel mailing list