Page MenuHomePhabricator

Allow translate attribute in wikitext content
Open, Needs TriagePublic

Description

The translate attribute is a global attribute in HTML5 to indicate whether that part should be translated. E.g. this first sentence could be written as The <code translate="no">translate</code> attribute ... to prevent automated translators from translating the name of the attribute along with the text when presenting this in a different language. In particular, text containing source code when translated into right-to-left languages will often contain errors if the translate attribute is ignored. For documentation, see:

https://www.w3.org/tr/html/dom.html#the-translate-attribute

https://developer.mozilla.org/docs/web/html/global_attributes/translate/

As always with attributes, browsers without support will just ignore it, so there shouldn't be compatibility issues.

Currently the parser (well, the sanitizer) will reject this attribute as unknown. But allowing this attribute will enable editors to improve the content of a wiki for automated translation.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone