Page MenuHomePhabricator

Annotations enclosing the template name are not rendered correctly in Parsoid
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Parse the following wikitext with the Translate extension activated:

echo "{{<translate>1x|hello</translate> stuff}}" |php bin/parse.php --integrated

What happens?:

The template is not expanded:

<p data-parsoid='{"dsr":[0,41,0,0]}'>{{<meta typeof="mw:Annotation/translate" data-parsoid='{"dsr":[2,13,null,null]}' data-mw='{"rangeId":"mwa0","extendedRange":false,"wtOffsets":[2,13]}'/>1x|hello<meta typeof="mw:Annotation/translate/End" data-parsoid='{"dsr":[21,33,null,null]}' data-mw='{"wtOffsets":[21,33]}'/> stuff}}</p>

What should have happened instead?:

The template should be expanded so that only "hello stuff" is displayed to the user (and not {{1x|hello stuff}}); the structure should round-trip correctly.

Note

This was observed on https://www.mediawiki.org/wiki/Wikimedia_Language_engineering/Newsletter/2023/October?useparsoid=1

Event Timeline

Change 966649 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Annotations in template targets

https://gerrit.wikimedia.org/r/966649

Arlolra triaged this task as Medium priority.
Arlolra moved this task from Backlog to Code Review on the Content-Transform-Team-WIP board.
Arlolra added a project: Essential-Work.

Change 966649 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Annotations in template targets

https://gerrit.wikimedia.org/r/966649

Change 969688 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.19.0-a4

https://gerrit.wikimedia.org/r/969688

Change 969688 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.19.0-a4

https://gerrit.wikimedia.org/r/969688