On Mon, Jan 14, 2008 at 01:42:06AM +0100, nicolas.francois(a)centraliens.net wrote:
Hello,
On Fri, Dec 28, 2007 at 09:11:48PM +0200, kaloian(a)doganov.org wrote:
> Using po4a to process XHTML documents, I have to turn of wrapping for a
> specific XHTML tag (<script>) still considering the containing text as
> translatable. Po4a's Xml module provides a way to specify this using
> the `W' character in the `tags' option:
>
> -o "tags=W<script>"
>
> Unfortunately this leads to skipping the containing text of <script> as
> non-translatable. I can avoid this by adding `tagsonly' option, but
> this way I practically have to list all possible XHTML tags in `tags',
> just to turn off wrapping for one of them.
>
> It would be much easier if there was a way to specify this wrap-flag
> individually for a tag, without having to deal with global
> skipping/non-skipping of all mentioned tags.
I agree that the current options are not intuitive and probably do not
permit what users want.
I will try to provide another set of options to configure the Xml module
(and derivative).
The idea could be to support options like:
-o translated="<tag1> w<tag2> W<tag3> <tag4><tag5>
i<tag6> I<tag7>"
-o verbatim="<tag8> <tag9><tag10>"
(And remove any tag from tags or inline lists if it is specified by one of
these options)
That should be OK in the current CVS.
I forgot the name of the second option, so it is not "verbatim", but
"untranslated".
The tags are not removed from the tags and inline lists, but the new
options have an higher priority over the old ones.
i<tag6> and I<tag7> are currently not allowed, but that should not be too
difficult to add.
Cheers,
--
Nekral