Addshore added a comment.

@Jonas The uselang-hacks represent a legacy feature for the community, originally for Commons but probably other wikis as well. Examples:

Wow, those hacks are evil

I'm familiar with und but have not seen it before MediaWiki context.

I'm not sure it is used anywhere, but it just stands for "language undetermined", which is the case when a user passes random crap in there?

I may've missed it, but if it is true, then we should probably avoid introducing it in just one area like this – Under the "principle of least surprise", and more generally to reduce inconsistencies and things that can go wrong, or are different without significant benefit (given that consistency is a big benefit, one we would lose). If it is unused and Wikibase does use it, I would recommend documenting the reasoning of this trade-off and filing a task with plan for how/when to resolve the technical debt. You'll want to talk to Wikimedia's Language Engineering team about what the recommended alternatives would be.

Right now wikibase will try to parse the page in the language code provided by the parser, in relation to this ticket, uselang=%E2%A7%BClang%E2%A7%BD.
This makes it all the way through the mediawiki and wikibase code, even though it isn't a valid language.
This is because we have an assumption that ParserOptions::getUserLangObj would return a Language object with a valid language code, which isn't the case, it will give you whatever the user passes in.

Using und vs whatever invalid string the user passes around will have the same behaviour within wikibase, and will currently parse the page with no language defined.
The ParserCache will still be split in the same way as it was before, using whatever string for language the user passed into uselang (as this is handled by ParserOptions::getOption)

In further reviewing the patch, I noticed that it did not address the problem with SimpleCacheWithBagOStuff or NewItemIdFormatter. So I've disabled the log channel in production.

Fixed in another commit that is now merged.


TASK DETAIL
https://phabricator.wikimedia.org/T204791

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Addshore
Cc: Jonas, Stashbot, TerraCodes, Liuxinyu970226, Lucas_Werkmeister_WMDE, Lydia_Pintscher, gerritbot, Addshore, WMDE-leszek, Aklapper, Krinkle, CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Jdforrester-WMF, Mbch331, Jay8g, Krenair
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to