Page MenuHomePhabricator

Generate Language-converted section anchors/ids
Open, Needs TriagePublic

Description

On MediaWiki, users are able to link to sections by using anchor/fragment links like [[Article#Section]]. This functionality, however, is seriously impaired on sites with LanguageConverter, as the parser only generates a section id attribute for the unconverted title. When editors want to link to sections on these wikis, they usually have to disable the conversion or peek into the raw wikitext to know what exactly they should write for #Section.

MediaWiki should probably generate ids for all (at least "major") variants defined for a wiki and put these invisible elements somewhere next to the <h2> (or h3, h4, etc.) Deduplication among variants for each title should be done, otherwise a simple == a == would be able to generate ids like a a_1 a_2 a_3 all by itself.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 20 2017, 8:56 PM
Arthur2e5 updated the task description. (Show Details)Mar 20 2017, 8:56 PM
Arthur2e5 updated the task description. (Show Details)Apr 21 2017, 3:25 PM
cscott added a subscriber: cscott.Dec 14 2017, 8:49 PM
cscott claimed this task.Dec 14 2017, 9:09 PM
Amire80 moved this task from Untriaged to Script conversion on the I18n board.Feb 4 2018, 10:45 AM

Now that MW generates unescaped ids, it might be a bit easier for the LC to work with -- just match the ids somehow and create new empty span elements nearby.