Page MenuHomePhabricator

Parsoid's linter doesn't know about localized upright parameter
Closed, InvalidPublic

Description

The upright parameter has the following format:

upright
upright=$1
upright $1

Localized for de.wp are shown as:

hochkant
hochkant=$1
hochkant_$1

But the last option (hochkant $1) is shown as linter error when written with space instead of underscore.

https://de.wikipedia.org/w/index.php?title=Fernfahrer&oldid=164516741&action=edit&lintid=13782

It is possible that there also other alias have different in underscore or space, because translations from translatewiki.net are always written with underscore

Event Timeline

Arlolra subscribed.

This seems like a general problem in Parsoid not recognizing the space separated format for parameters.

See around https://github.com/wikimedia/parsoid/blob/master/lib/config/WikitextConstants.js#L23-L60

ssastry triaged this task as High priority.Apr 14 2017, 6:23 PM
ssastry moved this task from Needs Triage to Next Up on the Parsoid board.

This seems like a general problem in Parsoid not recognizing the space separated format for parameters.

page and upright have this option

(needs parser tests/needs parser test additions)

Sorry, I had a chance to look into this today and these are indeed bogus. My comments above are wrong. Linter is reporting them correctly.

The uses on that page are [[Datei:Fernfahrermütze.jpg|miniatur|hochkant 1.2|Alte Fernfahrermütze]]

but, the supported format is actually with an underscore,

[[Datei:Fernfahrermütze.jpg|miniatur|hochkant_1.2|Alte Fernfahrermütze]]

It's the same with the page/seite option. Only in English, is a space supported.

See https://de.wikipedia.org/w/index.php?title=Benutzer:Arlolra/sandbox&oldid=164879000 where the PHP parser only recognizes the underscored option.

If this behaviour is undesirable, we'd need to work with the administrators of that wiki to change the configuration (and then re-run Linter across that wiki).