Winston_Sung added a comment.
https://github.com/wikimedia/Wikibase/blob/8dbd84e/client/includes/Hooks/LangLinkHandler.php#L322-L344 T137537: Ensure correct information about Wikimedia sites in the Sites facility on the Wikimedia cluster. <https://phabricator.wikimedia.org/T137537> name=client/includes/Hooks/LangLinkHandler.php#L322-L344 /** * Extracts the local interwiki code, which in case of the * wikimedia site groups, is always the global id's prefix. * * @fixme put somewhere more sane and use site identifiers data, * so that this works in non-wikimedia cases where the assumption * is not true. * * @param Site $site * * @return string */ public function getInterwikiCodeFromSite( Site $site ) { // FIXME: We should use $site->getInterwikiIds, but the interwiki ids in // the sites table are wrong currently, see T137537. $id = $site->getGlobalId(); $id = preg_replace( '/(wiki\w*|wiktionary)$/', '', $id ); $id = strtr( $id, [ '_' => '-' ] ); if ( !$id ) { $id = $site->getLanguageCode(); } return $id; } TASK DETAIL https://phabricator.wikimedia.org/T112426 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Winston_Sung Cc: Winston_Sung, RhinosF1, Base, PokestarFan, Jarekt, deryckchan, TerraCodes, Keegan, JEumerus, zhuyifei1999, Luke081515, Liuxinyu970226, daniel, Ricordisamoa, Krenair, Ladsgroup, Lydia_Pintscher, aude, Aklapper, Matanya, Nikerabbit, Amire80, Dereckson, LisafBia6531, Astuthiodit_1, Yodas_henchman, NguoiDungKhongDinhDanh, karapayneWMDE, Invadibot, Zabe, maantietaja, Juan90264, ItamarWMDE, Akuckartz, CptViraj, AKA_MBG, WDoranWMF, Dibya, 94rain, DannyS712, Nandana, Tks4Fish, Amorymeltzer, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, Kizule, LawExplorer, Sethakill, Devwaker, dg711, Niklitov, _jensen, Urbanecm, rosalieper, Scott_WUaS, Ananthsubray, Superzerocool, Stanglavine, Tulsi_Bhagat, Wong128hk, SimmeD, Wikidata-bugs, Snowolf, Dcljr, jayvdb, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
