Page MenuHomePhabricator

Update PCS language variants mapping from siteinfo
Open, MediumPublic1 Estimated Story Points

Description

Please see T263471 for more information.

The PCS handles only zh and sr variants, and it is hard-coded.

It would be better if we use the siteinfo API to update the mapping, but we also need to be aware of the fact that some language has different "default" variant base on regions, and that may still need to be hard-coded.

e.g.

Traditional Chinese: zh-tw, zh-hk, zh-mo.
Simplified Chinese: zh-cn, zh-my, zh-sg.

"hans": {
    "default": "zh-hans",
    "cn": "zh-cn",
    "my": "zh-my",
    "sg": "zh-sg"
},
"hant": {
    "default": "zh-hant",
    "hk": "zh-hk",
    "mo": "zh-mo",
    "tw": "zh-tw"
}

Event Timeline

cooltey created this task.Oct 15 2020, 9:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 15 2020, 9:56 PM
MSantos triaged this task as Medium priority.Oct 27 2020, 2:56 PM
MSantos set the point value for this task to 1.

@cooltey just FYI I'll be working on it soonish.

MSantos removed MSantos as the assignee of this task.Nov 23 2020, 2:44 PM
MSantos added a subscriber: MSantos.

@cooltey @MSantos

looks like I almost understand how language support actually work in mobileapps.

But I don't really understand the expected result. Is there any visual representation of how we expect it to work. Say:
"some endpoint with some setting is expected to produce output in the certain variant".

MSantos added a comment.EditedDec 3 2020, 11:08 AM

@Peter.ovchyn I believe you're looking for the siteinfo language variants config https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=languagevariants&format=json

Also, if I'm understanding correctly, in the description there are other local variants that need to be added extra to the siteinfo, but I believe @cooltey will know better than me about that.

Change 646832 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[mediawiki/services/mobileapps@master] Update PCS language variants mapping from siteinfo

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

Change 646832 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Update PCS language variants mapping from siteinfo

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

Change 651178 had a related patch set uploaded (by Vadim Kovalenko; owner: Vadim Kovalenko):
[mediawiki/services/mobileapps@master] Update PCS language variants mapping from siteinfo

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

Change 657359 had a related patch set uploaded (by Vadim Kovalenko; owner: Vadim Kovalenko):
[mediawiki/services/mobileapps@master] Update PCS language variants mapping from siteinfo

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

Change 657359 abandoned by Vadim Kovalenko:
[mediawiki/services/mobileapps@master] Update PCS language variants mapping from siteinfo

Reason:
Redundant patch

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

AnnaMikla added a subscriber: Peter.ovchyn.
Art.tsymbar added a subscriber: vadim-kovalenko.