Page MenuHomePhabricator

MCS should respect Accept-Language header
Closed, ResolvedPublic

Description

As a first iteration of the language variants support we're going to generate language variants for MCS content on the fly. In order to do that, RESTBase would pass the Acccept-Language header to MCS when needed, and MCS should respect it and forward it back to RESTBase when fetching Parsoid content from RESTBase before transforming it to mobile-sections or summaries.

In case requests to MW API are needed to get any content in the variant, we might need to make some library to transform Accept-Language into something MW understands, but I'm not sure that's needed.

NOTE: RESTBase itself doesn't support forwarding the Accept-Language to MCS or returning correct parsoid HTML yet, it's blocked on Parsoid transform endpoint, so it won't be possible to properly test this just yet.

Event Timeline

Pchelolo created this task.May 30 2018, 9:42 AM
Pchelolo triaged this task as Normal priority.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 30 2018, 9:42 AM
Pchelolo updated the task description. (Show Details)May 30 2018, 9:44 AM
bearND reassigned this task from bearND to Jdforrester-WMF.Jun 5 2018, 4:49 PM

Change 437530 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/services/mobileapps@master] Pass through Accept-Language headers to Parsoid requests

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

Change 437530 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Pass through Accept-Language headers to Parsoid requests

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

Not sure if this counts as Resolved?

In the past we usually resolved tasks after deployment to production.

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2018-06-06T20:10:01Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@a07af40]: Update mobileapps to 3bf9be5 (T196402 T195948)

Mentioned in SAL (#wikimedia-operations) [2018-06-06T20:18:38Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@a07af40]: Update mobileapps to 3bf9be5 (T196402 T195948) (duration: 08m 37s)

bearND closed this task as Resolved.Jun 7 2018, 4:48 PM
bearND reopened this task as Open.Jun 7 2018, 5:02 PM

Maybe that was a bit premature. We should probably also check if we need to change any MW API requests for language variants.

For the language variants stuff in practice, there's active discussion on T43716; will wait for that to settle.

bearND added a comment.Jun 7 2018, 5:43 PM

I think T43716 pertains only to Parsoid. I was thinking we should also look into getting the correct language variant for the values we get from MW API, which could be done independently.
A few areas that come to mind are (but that's probably not a full list):

  • summary: description, titles
  • metadata: categories, hatnotes, issues, toc,
  • media: titles, descriptions, captions, artists, license strings, ...
  • mobile-sections: for the main page content we still use action=mobileview

That's a lot of stuff, so that could be handled by a separate task, too.

I think T43716 pertains only to Parsoid.

Indeed. Since MCS goes through RESTBase, it will use the same Accept-Language header regardless of the actual Parsoid API/implementation.

I believe adapting non-parsoid-derived content in MCS to respect the accept-language deserves its own task, that is not as trivial as just passing through Accept-Language.

Created a new task for the MW API usage of MCS.

Vvjjkkii renamed this task from MCS should respect Accept-Language header to b0baaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii removed Jdforrester-WMF as the assignee of this task.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Jdforrester-WMF; removed: gerritbot, Aklapper.
mobrovac renamed this task from b0baaaaaaa to MCS should respect Accept-Language header.Jul 1 2018, 10:14 AM
mobrovac lowered the priority of this task from High to Normal.
mobrovac assigned this task to Jdforrester-WMF.
mobrovac updated the task description. (Show Details)
mobrovac removed a subscriber: Jdforrester-WMF.

What's the status on this? Should we move it to blocked? If so, what is it blocked on and what will we do to unblock it? Thanks!

What's the status on this? Should we move it to blocked? If so, what is it blocked on and what will we do to unblock it? Thanks!

As originally written, it's done. :-) It's now blocked by its child task for what to do with MW API results. I think that's not covered by what we use "blocked" as that task is internal to the team?

I've unlinked this one from the other one to move on, and moved it to signoff.

Jhernandez closed this task as Resolved.Jul 20 2018, 10:50 AM