[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Po4a wraps the <script> of the FSF widget

From: Kaloian Doganov
Subject: Re: Po4a wraps the <script> of the FSF widget
Date: Fri, 28 Dec 2007 22:37:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gNewSense gnu/linux)

Yavor Doganov <address@hidden> writes:

    > If it is, we should fix Po4a not to wrap it's text while incliding
    > it in the POT file.

    Hmm, is that easy to do?

Po4a has such machinery, but it is not straightforward for us to use it.
I wrote a message on this subject in the po4a-devel mailing list [1]


    Wrapping is annoying, but it is not a problem.  The widget appears
    to work when wrapped (translated or not) provided that the comment
    is absent.

The <script> tag of the original widget contains a valid ECMAScript code
fragment.  The comment, as part of the code, is valid ECMAScript too.
Wrapping the comment by the way Po4a does it, breaks the ECMAScript
syntax and renders the code fragment invalid.  Therefore, wrapping is
the problem.

(We are a bit lucky with ECMAScript on this matter, because it's syntax
almost ignores the whitespace.  But in theory a <script> tag can contain
other languages as well, for example Python or Basic, where whitespace
is even more significiant.  Of course, we do not expect this to happen
on the GNU website, but the point is that Po4a should not try to
rearange a character sequence when it does not understand it's syntax.
The <script> tag contains such character sequence by definition.)

If we manage to turn of the wrapping for the <script> tag, everything
will be OK for the ECMAScript interpreters, the widget will work, and
translation of non-wrapped ECMAScript code will be more easier for

reply via email to

[Prev in Thread] Current Thread [Next in Thread]