Page MenuHomePhabricator

IPInfo should return country name translations.
Closed, ResolvedPublic3 Estimated Story Points

Description

Following on T318726, the alternative to removing use of RequestContext::getMain()->getLanguage()->getCode(), is to pass back country name translations from the API to the clients.

AC

  • Remove use of RequestContext::getMain()->getLanguage()->getCode()
  • The fallback chain mechanism is still preserved.
  • Api should Pass back country names to the client.

Event Timeline

TThoabala set the point value for this task to 3.Nov 8 2022, 5:19 PM

Change 855533 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):

[mediawiki/extensions/IPInfo@master] IPInfo should return country name translations

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

Change 874695 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):

[mediawiki/extensions/IPInfo@master] IPInfo should return country name translations

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

Change 855533 abandoned by TsepoThoabala:

[mediawiki/extensions/IPInfo@master] IPInfo should return country name translations

Reason:

new patch on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/IPInfo/+/874695

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

Change 874695 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] IPInfo should return country name translations

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

@TThoabala Validated all the languages in countryNames as seen in a couple of the screenshots with each language matching within the IPInfo. Also validated a language that was not in countryNames, which defaulted to English. Thanks!

OS: macOS 13.0
Browser: Chrome 109
Environment: Local
IP test used: 2001:240::
Languages tested: "countryNames":{"de":"Japan","en":"Japan","es":"Japón","fr":"Japon","ja":"日本","pt-BR":"Japão","ru":"Япония","zh-CN":"日本"} and "it" for the language not included to test the default.

Languages in countryNames

T322664_IPInfo_CountryNameTranslation_ES.png (1×3 px, 410 KB)

T322664_IPInfo_CountryNameTranslation_pt-BR.png (1×3 px, 372 KB)

Language NOT in countryNames

T322664_IPInfo_CountryNameTranslation_it_None.png (1×3 px, 349 KB)