Page MenuHomePhabricator

Android app adds Wikidata descriptions in language "als" instead "gsw"
Closed, ResolvedPublic

Description

The Wikipedia Android app shows item descriptions from Wikidata. Reading an article in Alemannic, it shows correctly the description with language code "gsw" if available.

However, when adding a description, it is saved on Wikidata under the wrong language code "als" (example edit).
When editing an existing "gsw" description, the "gsw" description is untouched and a new description under "als" is added (example edit).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

...But the Alemannic Wikipedia actually exists under the subdomain https://als.wikipedia.org, and the database name of the wiki is alswiki, therefore the app treats the language code as als. How should it know that it should convert it to gsw? Is there a list of other language codes that are treated differently on Wikidata versus Wikipedia?

The app should be using the language code of the site, not the domain.

wgLanguageCode for alswiki is gsw

Will edits that have already happened need cleanup?

Thanks, OK then, it looks like we'll need to make a separate call to the meta=siteinfo API to get the language code, since we can't rely on the subdomain or the sitematrix code.

Will edits that have already happened need cleanup?

I'm alraedy doing the cleanup by bot.

Change 483023 had a related patch set uploaded (by Cooltey; owner: Cooltey):
[apps/android/wikipedia@master] Use siteinfo to get correct language code before submitting title description

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

Change 483023 merged by jenkins-bot:
[apps/android/wikipedia@master] Use siteinfo to get correct language code before submitting title description

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