[Po4a-devel] XML: prevent some attributes from being translated

Yves Rutschle debian.anti-spam at rutschle.net
Tue Feb 24 09:23:35 UTC 2009


On Tue, Feb 24, 2009 at 12:59:30AM +0100, Nicolas François wrote:
> 
> I will need to identify the <link> by adding an ID (otherwise, I cannot
> support "<link>txt1</link> <link>txt2</link>" to be translated to
> "<link>txt2</link> <link>txt1</link>"
> 
> But in that case, <a href=... target=...> is probably much clearer.

Actually I think Poy's idea is great: when translating you
don't really care where the link goes, and all the
attributes end up being clutter more than anything else.

> The goal of placeholders was not to hide something, but to help splitting
> blocks, without loosing too much context.

BTW, I must be dense, but I can't understand the help in
Xml.pm about placeholders. Even through the discussion here
I'm not sure at all what they're for and how they work (I
have to admit I haven't followed the development of Po4a
much since 2006 or so, though).

> To hide attributes of tags, but keeping the tag's content inline, another
> option could be added.
> It could change <tag attributes=...> to <tag id=#>.
> This could be used to avoid typos to be introduced in attributes if they
> are known to be untranslatable, and to reduce the amount of data that need
> to be translated.

That'd be a nice thing to have in Xml, a list of 'foldable'
tags to hide away markup clutter.

Cheers,
Y.



More information about the Po4a-devel mailing list