W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > February 2013

Translate in html (related to issue-97)

From: Yves Savourel <ysavourel@enlaso.com>
Date: Thu, 21 Feb 2013 20:52:28 -0700
To: <public-multilingualweb-lt@w3.org>
Message-ID: <002b01ce10b0$096c63f0$1c452bd0$@com>
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

This archive was generated by hypermail 2.3.1 : Sunday, 9 June 2013 00:25:08 UTC