Translate in html (related to issue-97)

Hi everyone,

Fredrik has found an interesting problem with the Translate data category and HTML5:
The ITS and HTML5 semantics don't match.


There are at least two issues:

-- 1) Empty string:

In HTML translate="" is the same as translate="yes"
That's probably not a big issue. We just have to make sure our processors handle this properly.
Probably a new test file could help for this.

-- 2) Translate and attributes:

"When an element is in the translate-enabled state, the element's attribute values and the values of its Text node children are to be translated when the page is localized."

So, if I got it right: <p translate='yes' class='text'>content<p> applies to both "content" and "yes" as well as "text".

First this doesn't match the ITS translate semantics where we exclude the attributes, and second, it's obviously not useable as both translate and class are not meant to be translated.

Note that in the current specification we don't explicitely say that HTML translate must be used in stead of its:translate, but we give an example ( and hints at the use of the HTML version here in the first paragraph of this section:

I think we really need to get our mapping between ITS and HTML clear and consistent. There is the open issue 97 for this ( but now I'm not sure we can map HTML translate with ITS translate.

The same goes for translate='no' by the way: in HTML it applies to both content and attributes.


Received on Friday, 22 February 2013 03:52:59 UTC