Page MenuHomePhabricator

wmf_stringByCapitalizingFirstCharacter is hardcoded to the current search language
Closed, ResolvedPublic

Description

wmf_stringByCapitalizingFirstCharacter is used to capitalize the first character of wikidata descriptions for display. It's hardcoded to use the language indicated by the currentArticleSiteURL on the shared session. So, for example, if your feed content is Hebrew, but the currentArticleSiteURL is English, the wrong locale would be applied. The method should be updated to take a siteLanguage param which would be a wmf_language string obtained from an article or site URL.

Also, it should be centralized and applied on import (when transforming JSON to a MWKSearchResult or applying an update to a WMFArticle) rather than applied display time.

Event Timeline

LGoto claimed this task.