All pastes #243323 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-11-08 09:37 UTC
rendered paste body
Multilanguage constructs in Blocklayout
---------------------------------------

This change consists of a number of parts:
    1. xar:mlvar deprecation
    2. xar:mlstring deprecation
    3. change of MLS notion in general in templates 'translate, unless'
    4. removal of the special placeholders from the template space

The easiest way to explain is to list the old vs the new constructs

Old:
    <p><xar:mlstring>A paragraph which should be translated</xar:mlstring></p>
New:
    <p>A paragraph which should be translated</p>

Old:
    <p>A paragraph which should NOT be translated</p>
New:
    <p xml:lang="en">A paragraph which should NOT be translated</p> or
    <p xml:lang="nl">Deze paragraaf moet niet worden vertaald</p>

Old:
    <xar:ml>
      <xar:mlstring>Some text with #(1) and #(2) or #(3)</xar:mlstring>
      <xar:mlvar>$first</xar:mlvar>
      <xar:mlvar>#$second#</xar:mlvar>
      <xar:mlvar><xar:var name="third" /></xar:mlvar>
     </xar:ml>
New:
    <xar:ml>
      Some text with <xar:var name="first"/> and <xar:var name="second"/> or <xar:var name="third"/>
    </xar:ml>
or
    <p>
        Some text with <xar:var name="first"/> and <xar:var name="second"/> or <xar:var name="third"/>
    </p>

The latter sounds more attractive, but the first gives more control, for example:
This:
    <p>
        Some <span class="bummer">text</span> with <xar:var name="first"/> and <xar:var name="second"/> or <xar:var name="third"/>
    </p>
would cause problems (as we cant forbid the span) but this:
    <xar:ml>
        Some <span class="bummer">text</span> with <xar:var name="first"/> and <xar:var name="second"/> or <xar:var name="third"/>
    </xar:ml>
Can check for any tags NOT in xar: namespace and just ignore them or error out