Support ITS's translateRule for amending the DOM localization whitelists

RESOLVED INCOMPLETE

Status

L20n
HTML Bindings
RESOLVED INCOMPLETE
5 years ago
2 years ago

People

(Reporter: stas, Unassigned)

Tracking

unspecified
Next
x86_64
Linux

Details

(Reporter)

Description

5 years ago
Developers should be able to take advantage of ITS translateRules to amend the whitelist of elements and attributes allowed in translations.  As of ITS 2.0, the rules can be linked
 
    <link href="translateRules.xml" rel="its-rules">

or inlined:

    <script type=application/its+xml id=ru1>
      <its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its"
                 xmlns:h="http://www.w3.org/1999/xhtml">
        <its:translateRule selector="@*[starts-with(name(), 'data-')]"
                           translate="yes"/>
      </its:rules>
    </script>

Cf. http://www.w3.org/TR/its20/#html5-global-approach.
Is there any simpler way to do it? The ITS syntax is not easy to parse by humans.
(Reporter)

Comment 2

5 years ago
Well, it's CSS or XPath.  For attributes, you can only use XPath though.  It's also a standard, so I don't see why we'd want to implement a custom way of achieving this.  And it's really for edge cases, the default set should be good 95% of cases.
Target Milestone: --- → Next
I'm punting this into INCOMPLETE, I don't think we'll work on this anytime soon.

We should reopen this if we come across a concrete use case.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.