Page MenuHomePhabricator

Language variant support for Suggested Edits APIs
Closed, ResolvedPublic


Background information

The Suggested Edits APIs should support language variants


It's TBD how the current requirements should be altered to support language variants. Is being able to search for images missing a caption in specific language variants enough? Do edits need to be counted per-variant?

Event Timeline

JoeWalsh created this task.May 15 2019, 5:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 15 2019, 5:56 PM

Maybe it's best to get a list of concrete issues from the apps team when the captions API firms up and the descriptions API is updated to use the same pattern. FWIW, the new search keywords handle language variants, and the counter API will tally an edit for whatever language value is specified in the qualifying API call; if language=zh-hant is sent, zh-hant is the language for which the count will be incremented.

CC @Sharvaniharan @cooltey @Dbrant @Charlotte feel free to update this ticket with any current language variant issues you're seeing or any future issues you run into

LGoto triaged this task as Normal priority.May 22 2019, 3:42 PM

For the current submit/get description flow, we submit the description with the language code zh instead of zh-hant or zh-hans, and it is because that we cannot get correct description from the REST endpoint, and it only returns the description from the zh column in wikidata.

If the new suggested edits APIs can response the correct value, which means we submit caption with language=zh-hant and can get the caption with language=zh-hant, that would be super great.

Mholloway renamed this task from Language variant support for image caption suggested edits APIs to Language variant support for suggested edits APIs.May 23 2019, 4:29 PM
Mholloway renamed this task from Language variant support for suggested edits APIs to Language variant support for Suggested Edits APIs.
Mholloway updated the task description. (Show Details)
Mholloway closed this task as Resolved.Jun 3 2019, 1:47 PM
Mholloway claimed this task.

The suggestions and counter endpoints should now handle language variants seamlessly, so I'll close this. If any problems are found, please open a new ticket about the specific issue.

Hi @Mholloway,

While testing the API, I found that if passes zh-hant to get article descriptions, it will return an empty result.

Should be:

The zh-* variants should be treated as zh because of the existing variants issue.

Please note, it is only referring to the article description API call.

Change 518357 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/services/recommendation-api@master] Fix language variant handling for description edit suggestion endpoints

Change 518357 merged by jenkins-bot:
[mediawiki/services/recommendation-api@master] Fix language variant handling for description edit suggestion endpoints

@cooltey Updated on app-editor-tasks. Please try now and see if the result matches your expectations.

@cooltey I believe this is expected, since the algorithm uses the random query which may or may not produce suitable results. Since there's a good number of captions in English, we can expect a lot of results for translating from English to other languages. But because other languages have virtually no captions so far, it's more difficult to find a candidate for translation. We will need to call the endpoint repeatedly until it produces a result.

Thanks for the explanation, @Dbrant.