Page MenuHomePhabricator

Numbering in TOC is not localized when using Parsoid rendering
Open, In Progress, MediumPublicBUG REPORT

Description

The numbering in TOC of Burmese Wiktionary and Wikipedia is still using Latin. But in Burmese Wikisource, they are already localized to Burmese. Please localize the TOC numbering in mywiki and mywikt like the mywikisource. Thanks.

image.png (684×557 px, 131 KB)

Event Timeline

A_smart_kitten changed the subtype of this task from "Task" to "Bug Report".
A_smart_kitten subscribed.

Seems potentially related to parsoid?

If Parsoid is the cause here, the reason it'd be affecting mywiki & mywiktionary but not mywikisource is probably because the former two wikis have pages rendered by Parsoid by default (while mywikisource currently doesn't).

A_smart_kitten renamed this task from Numbering in TOC should be localized in Burmese Wiktionary (mywikt) and Wikipedia (mywiki) to Numbering in TOC is not localized when using Parsoid rendering.Oct 19 2025, 12:21 PM

The issue comes from the fact that the legacy parser transforms the TOC numbering data before inserting it in the TOC to match the target language, and Parsoid does not.
The good news is that it's not something that got recently introduced in the DOM TOC patch as I initially thought.
The bad news is that a/ it's been a problem for a while and we only see it now (annoying, but thanks for reporting!!) b/ it may be a vaguely more annoying fix than I hoped because the OutputTransform will need to distinguish between these two cases and apply number localization or not.

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

[mediawiki/core@master] Localize TOC numbering on Parsoid content

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

Change #1198356 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] SectionMetadata: update documentation

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

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

[mediawiki/services/parsoid@master] Documents the difference of TOC numbering between legacy and parsoid

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

MSantos triaged this task as Medium priority.Nov 21 2025, 10:28 AM

Change #1199250 abandoned by C. Scott Ananian:

[mediawiki/services/parsoid@master] Documents the difference of TOC numbering between legacy and parsoid

Reason:

I apparently reinvented this in Ib51abd6c90bff40b6520a26c285e657364c7843f but it looks like we both agreed about how it should be updated.

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

Change #1198356 merged by jenkins-bot:

[mediawiki/services/parsoid@master] SectionMetadata: update documentation

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

Change #1197586 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/core@master] Localize TOC numbering on Parsoid content

Reason:

in favor of handling that via language converter earlier in the pipeline

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

Change #1238054 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a15

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

Change #1238054 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a15

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

(^ re the move to 'To Verify') I can still personally repro this from the instructions in T407379#11287964.

Change #1260264 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] ParsoidLanguageConverter: localize TOC even if conversion is disabled

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

cscott changed the task status from Open to In Progress.Wed, Mar 25, 3:52 AM

(^ re the move to 'To Verify') I can still personally repro this from the instructions in T407379#11287964.

This would be expected to be fixed with https://my.wikipedia.org/wiki/လက်စွပ်များ၏_အရှင်သခင်?uselang=my&useskin=vector&useparsoid=1&parsoidnewlc=1 (the new Parsoid language converter implementation) -- the &parsoidnewlc=1 is required (but will be the default shortly).

Unfortunately, I get a type error from that presently (T421194), so I guess not yet fixed!

Change #1260264 merged by jenkins-bot:

[mediawiki/core@master] ParsoidLanguageConverter: localize TOC even if conversion is disabled

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