Page MenuHomePhabricator

Improve language variant support in widgets
Open, LowPublicBUG REPORT

Description

I have noticed a few bugs around widgets and language variants, so this task encompasses revisiting widgets with an eye towards fixing any variant weirdness we see:

  • I noticed intermittently the POTD widget is the loading / gray state when the primary language is a variant. This seems worth investigating since Picture of the Day shouldn't be tied to a particular wiki language. I had also noticed it on 6.7.4 occasionally so this may not be variant-related.
  • The top read widget switches languages properly when a different variant becomes the app preferred language. However deeplinking to the article shows an incorrect language variant. (Test steps: Primary app language Serbian Latin, secondary language Serbian Cyrillic. Top read shows most text in Latin, but deep linking goes to an article in Cyrillic). Moved to https://phabricator.wikimedia.org/T278581
  • The top read widget is in a loading / gray state after updating from 6.7.4 and the primary language is a variant. Pulling to refresh on the Explore feed fixes this, but it would be nice if it worked right away.

Note I haven't tested iOS13 widgets or the On this Day iOS14 widget (both Chinese and Serbian show the "Your primary language does not support On this day" error state), so we should confirm there are no bugs with those too.

Event Timeline

Per our meeting, lets focus on bullet 2 as our highest priority fix. If we can get that in, then we'll see what we can do about the lifecycle/grey screen/reloading issues.

@Tsevener Following up on you mentioning proxying the language changes yesterday, so far it seems like the app itself makes calls with the appropriate Accept-Language header value when switching languages in app. I just want to confirm one thing: is the intent of the Accept-Language header value for requests in languages without explicit variants to use the iOS device's preferred languages?

For example, I notice when I have Spanish as my preferred app language, and my iOS device's preferred languages are English and Simplified Chinese, the request looks like this:

Host: es.wikipedia.org
Accept-Language: en, zh-hans;q=0.5
Dmantena subscribed.

Moved the direct/specific variant component of this into new task (https://phabricator.wikimedia.org/T278581), moving this task back.

@Dmantena yep, at least that's how it was requesting before. The variant work @James_Dempsey did only changed Accept-Language headers in the case of hitting a wiki that supports variants. This was really just to limit changes we were making, but it seems like it could be possible to remove the header entirely from non-variant Wikis eventually. Here's a comment where we asked specifically about it. We decided to make the Accept-Language header simple for variant wikis (i.e. zh-hant rather than an exhaustive list), but left non-variant language requests as-is.

Dmantena renamed this task from Support language variants in widgets to Improve language variant support in widgets.Mar 30 2021, 9:25 PM
Aklapper changed the subtype of this task from "Task" to "Bug Report".Feb 17 2023, 8:27 AM