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

Re: ISSUE-97 html translate, and global rules and inheritance

From: Jirka Kosek <jirka@kosek.cz>
Date: Thu, 02 May 2013 09:56:23 +0200
Message-ID: <51821C27.3030700@kosek.cz>
To: Felix Sasaki <fsasaki@w3.org>
CC: "public-multilingualweb-lt@w3.org" <public-multilingualweb-lt@w3.org>
On 2.5.2013 6:47, Felix Sasaki wrote:

> Suppose I have
> 
> <p> ... <img alt="..."/>...</p>
> and this translate rule
> <its:translateRule selector="//h:p" translate=yes"/>
> 
> or just locally
> 
> <p translate="yes"> ... <img alt="..."/>...</p>
> 
> would both the "img" element and "img", including "alt" be translatable?

According to the current HTML5 spec, yes.

> Above definition talks about translatable elements like this
> "When an element is in the translate-enabled state, the element's
> translatable attributes and the values of its Text node children are to
> be translated when the page is localized."
> 
> This means no inheritance to elements, but only application to text nodes.

Translatability is inherited in HTML5, see:

"Otherwise, either the element's translate attribute is in the inherit
state, or the element is not an HTML element and thus does not have a
translate attribute; in either case, the element's translation mode is
in the same state as its parent element's, if any, or in the
translate-enabled state, if the element is a root element."

What might be confusing that HTML5 spec has "translation mode" for
elements which doesn't talks about inheritance. But this mode is derived
from the value of translate attribute which is inherited.

				Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------


Received on Thursday, 2 May 2013 07:56:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:08 UTC