Lucas_Werkmeister_WMDE added a comment.
I started looking a bit through the related code, and it seems we’re not the first to notice that squashing the interwiki prefix and title into one string is not the best way to store this data: name=LinksUpdate::__construct( Title $title, ParserOutput $parserOutput, $recursive = true ) # Convert the format of the interlanguage links # I didn't want to change it in the ParserOutput, because that array is passed all # the way back to the skin, so either a skin API break would be required, or an # inefficient back-conversion. $ill = $parserOutput->getLanguageLinks(); $this->mInterlangs = []; foreach ( $ill as $link ) { list( $key, $title ) = explode( ':', $link, 2 ); $this->mInterlangs[$key] = $title; } That “I didn’t want to change it in the `ParserOutput`” comment dates back to **2006 <https://gerrit.wikimedia.org/g/mediawiki/core/+/fb97cc3078ab3c3ef1c3ee77d773f693f929d943%5E!/>**, when the `langlinks` table was first introduced. (This also suggests a way to fix this issue without breaking `ParserOutput` compatibility: use `explode( ':', $link, 2 )` instead of `Title::newFromText( $languageLinkText )` wherever the links are used, such as in `Skin::getLanguages()`. I’m not sure if that’s a good idea, though… it’s probably better to add a list of `languageLinkTitles` to the `ParserOutput` and fix this properly. Wikibase would then presumably use `makeTitle()` to create `Title`s that don’t suffer from the namespace or length issues.) TASK DETAIL https://phabricator.wikimedia.org/T204792 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Tonina_Zhelyazkova_WMDE, noarave, Silvan_WMDE, toan, Lucas_Werkmeister_WMDE, Addshore, WMDE-leszek, Lydia_Pintscher, Amire80, Jdlrobson, pmiazga, Aklapper, Krinkle, Rileych, Akuckartz, Demian, Iflorez, darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, Pablo-WMDE, GoranSMilovanovic, QZanden, LawExplorer, Winter, _jensen, rosalieper, Soum213, Taiwania_Justo, Scott_WUaS, Jonas, Verdy_p, Wikidata-bugs, aude, Nikerabbit, Arrbee, santhosh, KartikMistry, Jdforrester-WMF, Mbch331, Rxy, Jay8g
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs