Page MenuHomePhabricator

Cantonese Wikipedia mobile app interface cannot edit yue descriptions from Wikidata
Closed, ResolvedPublic


NOTE: This happens on both Android and iOS apps.

The mobile app and mobile web Wikipedia interfaces automatically pulls item descriptions from Wikidata, where an item description in the same language exists; the mobile app also allows editing of the Wikidata item description.

But when trying to edit the Cantonese item descriptions using the mobile app, an error occurs and the edit cannot be saved. The error message seems to suggest the problem has to do with the fact that the domain name (zh-yue.*) doesn't match the language code (yue). (The domain name vs ISO 639 discrepancy is discussed on T10217.)

Until T10217 gets fixed (it has already taken 9 years and is still open), please resolve this mismatch by letting zh-yue.wikipedia entries match up with the yue language descriptions on Wikidata for both reading and editing.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@deryckchan I'm a little confused
shows the wikidata description as 韓國劇集 which is Cantonese if I'm not mistaken (

Screen Shot 2018-05-03 at 2.59.36 PM.png (230×512 px, 37 KB)

Can you help me understand this bug so I can make sure it gets to the right people?

Please see attached screenshots - It seems that one is able to see yue
labels from Wikidata on Wikipedia Mobile app but gets an error when one
attempts to edit them.

I apologize for my confusion - another yue.wp editor reported the bug to me.

IMG_20180504_120836_414.jpg (1×720 px, 72 KB)

IMG_20180504_120834_595.jpg (1×720 px, 63 KB)

IMG_20180504_120833_427.jpg (1×720 px, 63 KB)

IMG_20180504_120831_559.jpg (1×720 px, 65 KB)

IMG_20180504_120830_028.jpg (1×720 px, 58 KB)

deryckchan renamed this task from Cantonese Wikipedia mobile web and mobile app interfaces should pull and push yue descriptions from Wikidata to Cantonese Wikipedia mobile app interface cannot edit yue descriptions from Wikidata.May 4 2018, 11:21 AM
deryckchan updated the task description. (Show Details)

Looks like this is a bug in the app. Not the mobile web experience. Adding mobile content service and android is already on ticket.

Not sure if this is related to T173842 ?

Not sure if this is related to T173842 ?

I don't think so. T173842 is more complicated: zh.wp wants to push and pull different labels from Wikidata depending on the language variant that is currently being displayed for the article content.

This task is about fixing the bug that the mobile app can't edit yue Wikidata labels when browsing (zh-)yue.wp .

@RHo As I mentioned above, this is related to, however, the T112426, because without founding a way to change the actual wiki identifier (i.e. what you saw in small grey box left of the affected language link in any random Wikidata items, e.g. in Template:Cite web (Q5637226)

pasted_file (384×366 px, 25 KB)

) we really have no other ways to fix it, and fixing that thing, as T114772 said, has to be a major work on Wikidata's ecosystem.

@Liuxinyu970226 not completely sure right now, TBH it sounds like an issue inside either the Android web client or inside the API that it uses. @Charlotte and @bearND / @Tgr should hopefully be better equipped to determine the root cause of the problem and which team(s) is best placed to fix this.

At a glance this problem seems to be specific to the editor interface which I don't imagine should be subject to T112426.

Change 433000 had a related patch set uploaded (by BearND; owner: BearND):
[apps/android/wikipedia@master] Fix DB name for wikis with hyphen in subdomain

As far as I understand this issue is only with the apps, not Mobile Web or Mobile Content Service. While I do not get the toast message with the error message I saw in the screenshot above I have a potential fix, see my gerrit patch above. The issue is that some wikis, like zh-yue, have hyphens in the subdomain but the database name has _ instead. See config. So, -> zh_yuewiki.

Change 433000 merged by jenkins-bot:
[apps/android/wikipedia@master] Fix DB name for wikis with hyphen in subdomain

cooltey reassigned this task from Dbrant to bearND.
cooltey added a subscriber: Dbrant.

Still unlucky, by trying anonymously I still can enter a zh-yue description rather than yue.

I may need some help on this one. Being a non-speaker of Cantonese, it is a bit difficult to tell whether this one is fixed. I was able to set my device to Cantonese (I think) and I was able to edit a description and I received the below info that looks like possibly an error, but it is hard to tell.

Screenshot_2018-06-29-13-38-10.png (1×1 px, 178 KB)

@cooltey and/or @RHo, is this expected? Is my setup incorrect? Thanks for your help!

The screen shows the description has been published successfully.
If you've actually edited something and the description has been updated after you return back to the article itself, and yes, it is expected to see the screen.

See d:Q26875136.
The description is added under the language "zh-yue" instead of "Cantonese". However, the app still shows a message saying the description is successfully published
(Using Wikipedia Beta 2.7.237-beta-2018-06-27)

Vvjjkkii renamed this task from Cantonese Wikipedia mobile app interface cannot edit yue descriptions from Wikidata to 7zdaaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii removed bearND as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
bearND renamed this task from 7zdaaaaaaa to Cantonese Wikipedia mobile app interface cannot edit yue descriptions from Wikidata.Jul 1 2018, 4:39 AM
bearND raised the priority of this task from High to Needs Triage.
bearND updated the task description. (Show Details)
bearND added a subscriber: Aklapper.

Specifically this diff, that's why I can say that this issue still exists.

So as per my T193360#4193772 above, please, as I'm crying with tears to request, do another T112426 thing, to rename "zh_yue" to "yue" on the left of Wikidata sitelinks, that's the only possible way to finally fix this.

JMinor triaged this task as Medium priority.Nov 5 2018, 7:51 PM
JMinor moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.
JMinor added a subscriber: JoeWalsh.
JMinor added a subscriber: JMinor.

We believe this was fixed with the recent iOS release (see subtask). Please re-open the subtask if this issue remains for iOS.

Hi, @bearND

We are using the to submit the description.

What's the correct string for the language and uselang for submitting the zh-yue description?

I've tried to convert the zh-yue to zh_yue, but will get error message when language receiving the zh_yue.

If I send the language = zh-yue and uselang = zh_yue, and the string will be posted to the wikidata successfully, but the description will not show on the article.

You may see that in

111.png (748×1 px, 145 KB)

Do you have any suggestion?

or @JoeWalsh, what's the current of behavior of sending the zh-yue description?

@cooltey I think you don't need to set uselang. uselang is only for message translations, like user visible strings. Error messages and such AFAIU. You could set it to user or content, according to the help text in

I first tried language set to zh-yue. As you noticed as well, I didn't see the description in the mobile-sections output.
Then I noticed that PLbot changed the language from zh-yue to just yue. Now it shows the description in the mobile-sections output. Not sure why PLbot didn't change the language string when you did the edit.

+ @Jdforrester-WMF and @Tgr since they probably know more about language variant implementations than I do.

uselang is the user interface language - the conceptual equivalent of going into your preferences and changing the language (the actual equivalent too, overriding that setting is exactly what it does). That setting is accessible to MediaWiki methods called by the API, and used by some of them, but it's used very little (just like how MediaWiki's behavior is not affected much by your language settings). The only thing I can think of is that in action=parse some wikitext constructs like {{int:}} will translate to that language. API response message translations are actually determined by a separate parameter, errorlang, although it does fall back to uselang (and then that falls back to your user preferences and then to the wiki content language).

Anyway when you translate a Wikidata description on the web, it is not translated into your user preferences language, it is translated into the language you select, so likewise in the API you need to select the target language separately from your user interface language settings. As Bernd says that's the language parameter and Special:ApiSandbox is the nice way to find out.

As for zh-yue vs. yue, I'm not familiar with the details of that mess, other than that yue is the real ISO language code but we are stuck with zh-yue in some places that are particularly hard to change (see here). Also T30441#3824111 seems to say that zh-yue is used as a language variant on zh.wikipedia, as opposed to which is in yue, a separate language (as far as MediaWiki is concerned).

@cooltey - @bearND is right that the language should be changed from zh-yue to yue. There are a few other entries in the mapping dictionary on iOS so those should be adjusted before passing to language as well. @NHarateh_WMF is there anything else that needed to change on the iOS side or just the language code?

@Tgr Do you know why in Special:ApiSandbox one can only select zh-yue instead of yue in the dropdown for language? I had to change the URL to get it to take yue to try it out.

Note: going to use before submitting the description

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

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

I've been testing and editing lots of Cantonese Wikipedia articles' description, and all of them look good to me.

Since @ABorbaWMF cannot read the Traditional Chinese, I think it is fine to move to Ready for signoff column.

@deryckchan Did you use the current Beta app to test the feature? We haven't pushed it to the production yet, but you will see it soon.

Ah, I'm very sorry. No I wasn't using the beta app. I'll wait till the
proper roll-out and test again.

@deryckchan No worries. I believe that now you can download/update to the latest version of the app, which resolved the issue.

Yep, it works now, thank you!

I wasn't aware of the rep-lag so I was surprised that yesterday's version
hadn't received the patch yet.

Thanks for fixing this! I think we can mark this as resolved.

@deryckchan No problem :) Hope you enjoyed the latest update.