Krinkle created this task. Krinkle added projects: MediaWiki-Platform-Team (Radar), Data-Engineering, Wikidata, MediaWiki-extensions-WikibaseRepository, Structured Data Engineering, CommonsMetadata, DiscussionTools, MediaWiki-extensions-Scribunto. Restricted Application added a subscriber: Aklapper. Restricted Application added a project: Structured-Data-Backlog.
TASK DESCRIPTION Background ---------- See T341244: ParserOptions and Title::getPageViewLanguage may disagree on the lang/dir <https://phabricator.wikimedia.org/T341244>. In a nut shell, it is (unfortunately) common today for extensions to try to "guess" the language and directionality of embedded content. The reason for this is largely that a better API didn't exist, and classes like `mw-content-ltr` are important to set for correct styling, and are difficult to set by any means other than `Title::getPageViewLanguage`. But, Title::getPageViewLanguage involves global state and a lot of guess work. Scope ----- https://codesearch.wmcloud.org/deployed/?q=%3EgetPageViewLanguage [ ] EventLogging (MetricsPlatform/ContextAttributesFactory.php). #data-engineering <https://phabricator.wikimedia.org/tag/data-engineering/> [ ] TemplateSandbox (Hook, SpecialPage). **Unassigned: No owner**. [ ] Wikibase (EntityHandler.php). #wikidata <https://phabricator.wikimedia.org/tag/wikidata/> [ ] CommonsMetadata (Hook). #structured_data_engineering <https://phabricator.wikimedia.org/tag/structured_data_engineering/> [ ] DiscussionTools (SpecialDiscussionToolsDebug.php). #editing-team <https://phabricator.wikimedia.org/tag/editing-team/> [ ] Scribunto (ScribuntoContentHandler.php). **Unassigned: No owner**. Outcome ------- Remove use of Title::getPageViewLanguage. Example migration: - **HTML workarounds**: In cases where it is used to manually create CSS classes like `mw-content-ltr` and `mw-parser-output`, and the `lang` and `dir` attributes, this can probably removed given that nowadays ParserOutput will take care of setting these already. Be sure to test the end-user workflow and confirm that your workarounds are redundant before removing them. When not possible to remove or if not feasible in the short-term, at least use `ParserOutput->getLanguage()` to inform your current workarounds instead of the global guesswork from Title::getPageViewLanguage. - **Language code**. If using Title::getPageViewLanguage to associate page language outside a pageview perspective, it is likely incorrect. Consider using `Title->getPageLanguage()` instead. TASK DETAIL https://phabricator.wikimedia.org/T350806 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Krinkle Cc: Aklapper, Krinkle, Danny_Benjafield_WMDE, Mohamed-Awnallah, mrephabricator, LennardHofmann, Astuthiodit_1, lbowmaker, BTullis, karapayneWMDE, toberto, Invadibot, Ywats0ns, maantietaja, CBogen, ItamarWMDE, Akuckartz, Nandana, lucamauri, Patriccck, Lahi, Gq86, Ramsey-WMF, GoranSMilovanovic, TJH2018, QZanden, LawExplorer, SundanceRaphael, _jensen, rosalieper, Scott_WUaS, Izno, alex-mashin, Wikidata-bugs, aude, Dinoguy1000, jayvdb, MrStradivarius, Tacsipacsi, Jackmcbarn, Mbch331, Tgr, Slack_connector_for_Editing_team_triage
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
