Page MenuHomePhabricator

Parsoid cannot correctly handle language converter markup syntax
Closed, ResolvedPublicBUG REPORT

Description

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

  • Page wikitext 1: Text before -{zh-hans:Foo; zh-hant:Bar;}- text after
  • Page wikitext 2: Text before -{A|zh-hans:Foo; zh-hant:Bar;}- text after
  • Page language: zh
  • Not affected by site language (currently need useparsoid=1 on Wikipedia-zh as Parsoid was not being used by default)

What happens?:

Unexpected rendered result (all variants): Text before text after

What should have happened instead?:

The -{ language converter syntax without flag meant to show the converted result at the current position where the markup is placed.

The -{A| language converter flag meant to add the conversion rule while showing the converted result at the current position where the markup is placed.

Expecting rendered result (zh-hans, zh-cn, ... variants): Text before Foo text after

Expecting rendered result (zh-hant, zh-tw, ... variants): Text before Bar text after

Software version:

  • MediaWiki: 1.45.0-wmf.6 ( 809f76d ) 2025-06-16 23:59 (UTC)
  • wikimedia/parsoid: 0.22.0-a7

Other information:

Unexpected parsoid rendered:

圖片.png (3,072×1,408 px, 616 KB)

Expecting parser rendered:

圖片.png (3,072×1,408 px, 620 KB)


Steps to replicate the issue:

Screenshot 2025-07-28 at 11-10-15 偏好設定 - 維基百科,自由的百科全書.png (823×282 px, 22 KB)

What happens?:

The 臺灣(俗字寫作台灣) is missing from the article.

1753726424975.jpg (775×403 px, 186 KB)

The same issue happens when you request the endpoint here:
https://zh.wikipedia.org/w/rest.php/v1/page/臺灣/html

What should have happened instead?:

1753726496918.jpg (737×384 px, 162 KB)

Event Timeline

The given example sandbox(oldid:87910422) and page(oldid:94233008) is working as expected. Seems to be resolved by T417533.

Bewfip changed the task status from Duplicate to Resolved.Sat, Sep 12, 12:48 PM
Bewfip subscribed.