Page MenuHomePhabricator

MenteeOverviewApi: Respect uselang parameter passed to Special:MentorDashboard
Closed, ResolvedPublic

Description

The mentees REST endpoint (/w/rest.php/growthexperiments/v0/mentees) currently uses user language (whatever is in the user's preferences), and it does not respect uselang parameter passed to the Special:MentorDashboard (it does, however, respect uselang when it gets it directly, such as in this example).

Because it appears to be not practical to parse get parameters from JavaScript, let's just pass uselang parameter every time (populated with mw.config.get('wgUserLanguage')).

Acceptance criteria

Event Timeline

Change 822344 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] MenteeOverviewApi: Respect uselang parameter

https://gerrit.wikimedia.org/r/822344

Urbanecm_WMF changed the task status from Open to In Progress.Aug 11 2022, 11:08 AM

FWIW there is some (lots of) discussion on how the REST API should handle language in T269492: Selecting user language in the REST API, going generally in the same direction.

Change 822344 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MenteeOverviewApi: Respect uselang parameter

https://gerrit.wikimedia.org/r/822344

Urbanecm_WMF changed the task status from In Progress to Open.Aug 16 2022, 6:08 AM