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.

See:
http://www.w3.org/html/wg/drafts/html/master/dom.html#the-translate-attribute

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 (http://www.w3.org/TR/2012/WD-its20-20121206/#translatability-implementation) and hints at the use of the HTML version here in the first paragraph of this section: http://www.w3.org/TR/2012/WD-its20-20121206/#html5-markup

I think we really need to get our mapping between ITS and HTML clear and consistent. There is the open issue 97 for this (https://www.w3.org/International/multilingualweb/lt/track/issues/97) 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.

cheers,
-yves

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