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.
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| In Progress | BUG REPORT | cscott | T407379 Numbering in TOC is not localized when using Parsoid rendering | ||
| Resolved | PRODUCTION ERROR | cscott | T421194 TypeError: MediaWiki\Parser\Parser::localizeTOC(): Argument #2 ($lang) must be of type MediaWiki\Language\Language, null given, called in /srv/mediawiki/php-1.46.0-wmf.20/includes/OutputTransform/Stages/ParsoidLanguageConverter |
Event Timeline
Seems potentially related to parsoid?
- On https://my.wikipedia.org/wiki/လက်စွပ်များ၏_အရှင်သခင်?uselang=my&useskin=vector&useparsoid=0, the table of contents appears with localized numbering.
- On https://my.wikipedia.org/wiki/လက်စွပ်များ၏_အရှင်သခင်?uselang=my&useskin=vector&useparsoid=1, the table of contents doesn't have localized numbering (ie., as shown in the screenshot).
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).
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
Change #1198356 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/services/parsoid@master] SectionMetadata: update documentation
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
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.
Change #1198356 merged by jenkins-bot:
[mediawiki/services/parsoid@master] SectionMetadata: update documentation
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
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
Change #1238054 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a15
(^ 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
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
