Currently, the formatter-factory-callback functions in WikibaseLexeme.datatypes.php call the deprecated UserLanguage service from WikibaseRepo. In order to retire this service, we will need to find a way to obtain the language in a more appropriate way, either via RequestConext or by making using the globals directly rather than through Wikibase.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T279415 Remove calls to deprecated WikibaseRepo::getUserLanguage | |||
Open | None | T281799 WikibaseLexeme: Remove calls to WikibaseRepo::getUserLanguage from formatter factory callbacks |
Event Timeline
Comment Actions
We should probably get the language to use from the given FormatterOptions, and expect those options to contain ValueFormatter::OPT_LANG or FormatterLabelDescriptionLookupFactory::OPT_LANGUAGE_FALLBACK_CHAIN, like we did for T281726: Stop injecting LanguageNameLookup into WikibaseValueFormatterBuilders. (Perhaps we could turn WikibaseValueFormatterBuilders::newLanguageNameLookup() into LanguageNameLookupFactory::newForFormatterOptions()? Not sure if that makes sense.)