Closed Bug 922573 Opened 11 years ago Closed 8 years ago

Support ITS's translateRule for amending the DOM localization whitelists

Categories

(L20n :: HTML Bindings, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: stas, Unassigned)

References

Details

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.
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
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.