Page MenuHomePhabricator

Rendering difference between legacy and Parsoid with <translate> tags around a heading
Open, Needs TriagePublicBUG REPORT




When rendered with the legacy parser, "test" is a heading (since the translate tags are stripped by the translate extension).
When rendered with Parsoid, we get

<p data-parsoid='{"dsr":[0,31,0,0]}'><meta typeof="mw:Annotation/translate" data-parsoid='{"dsr":[0,11,null,null]}' data-mw='{"rangeId":"mwa0","extendedRange":false,"wtOffsets":[0,11]}'/>==test==<meta typeof="mw:Annotation/translate/End" data-parsoid='{"dsr":[19,31,null,null]}' data-mw='{"wtOffsets":[19,31]}'/></p>

in which ==test== is a paragraph.

Event Timeline

This syntax is discouraged, even with legacy parser, because it breaks section editing.
So I think Parsoid doesn’t need to support it.

Aha ... okay then!

@Nikerabbit, @Pols12, why is == <translate>Culture</translate> == discouraged? If anything, to me, that seems like the ideal way to mark a section title for translation.

The page seems to indicate




Right. I am asking why the inline form ==<translate>foo</translate>== is discouraged.

Two reasons:

  1. It used to break edit section links - this might have been fixed these days
  2. In "page translation view" you can see the headings as such. See e.g.