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).

Details

Related Gerrit Patches:

Event Timeline

Pasleim created this task.Dec 26 2018, 8:31 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Dbrant added a subscriber: Dbrant.Jan 2 2019, 2:28 PM

...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?

Dbrant added a comment.Jan 2 2019, 3:22 PM

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

Addshore moved this task from incoming to in progress on the Wikidata board.Jan 11 2019, 10:10 AM
Dbrant closed this task as Resolved.Mar 6 2019, 7:11 PM