Last modified: 2013-10-23 13:53:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40675, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38675 - Review Wikibase API error handling
Review Wikibase API error handling
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
: 41599 (view as bug list)
Depends on:
Blocks: 48888
  Show dependency treegraph
 
Reported: 2012-07-25 16:12 UTC by Daniel Kinzler
Modified: 2013-10-23 13:53 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2012-07-25 16:12:36 UTC
The Wikibase API's error handling should be reviewed wrt two problems:

* don't localize error messages. The core API doesn't. So this is inconsistent and potentially confusing.
* make sure getPossibleErrors actually reports all possible errors, and provides a human readable description in english.
Comment 1 denny vrandecic 2012-08-02 11:04:38 UTC
Ask on wikitech-l if there are respective plans for core.
Comment 2 Aude 2012-08-23 10:03:44 UTC
Talked with Siebrand and we should be localizing the error messages when they are used in the UI and do so in the JavaScript, in our case.
Comment 3 jeblad 2012-08-24 07:24:23 UTC
I really don't think we should assign this one without further discussion, this is a rather big task.
Comment 4 jeblad 2012-08-24 07:57:00 UTC
Can't find my notes on this but basically this is what needs to be fixed if we want a generalized approach that solves this in general

* Change the calls to dieUsage to dieUsageMsg wheree applicable, or
* Change the calls to wfMsg in dieUsage

* Add the necessary arguments to the result in dieUsage where such arguments are needed for later processing, and
* Make sure it is safe to report those arguments

* Copy the now localized messages from the i18n-file to getPossibleErrors, or
* Copy them to the actual call to dieUsage, or
* Copy them to the actual call to dieUsageMsg (more trouble with args)

* Investigate if the rest of the API is sufficiently well-behaved that we can localize in the user interface

* Figure out which API error message we want to localize that is now in the details section, or (we could easily end up with a 3-figure number)
* If we simply don't want to localize them at all, or
* If we simply don't want to show error messages in the details section at all

* Figure out which API error message we want to map to simplified UI messages

* Implement the API calls to get the localized messages
** Inject a spinner into the details section
** A request to meta=allmessages (session-failure will give a call http://wikidata-test-repo.wikimedia.de/w/api.php?action=query&meta=allmessages&ammessages=wikibase-api-session-failure&amlang=de)
** Store the error message in the ordinary message structure in the browser
** Insert the args supplied from the error message (the dieUsage/dieUsageMsg) into the localized message
** Remove the spinner from the details section
** Insert the finalized localized message into the details section

I don't think that this has an easy fix.
Comment 5 jeblad 2012-09-08 11:46:14 UTC
For later, please note the patchset https://gerrit.wikimedia.org/r/#/c/23154/1

We probably don't need to mark the ordinary messages, but we should probably mark the qqq descriptions. Or we should verify which one of them the i18n-people want us to mark.

Also see
https://gerrit.wikimedia.org/r/#/c/23078/
https://gerrit.wikimedia.org/r/#/c/21330/
Comment 6 Raimond Spekking 2012-09-09 12:50:15 UTC
(In reply to comment #5)
> For later, please note the patchset https://gerrit.wikimedia.org/r/#/c/23154/1
> 
> We probably don't need to mark the ordinary messages, but we should probably
> mark the qqq descriptions. Or we should verify which one of them the
> i18n-people want us to mark.
> 
> Also see
> https://gerrit.wikimedia.org/r/#/c/23078/
> https://gerrit.wikimedia.org/r/#/c/21330/

If you have messages to be untranslated, please add a PHP comment like '# Do not translate' to it line in the English message section.

The i18n team (most of the time Siebrand or me) will add the keys to our config file https://gerrit.wikimedia.org/r/gitweb?p=translatewiki.git;a=blob;f=MediaWiki/mediawiki-defines.txt#l2055 once the patches are merged.

Ignored Messages will be deleted from the qqq section (beides all existing translations) during the daily export by our scripts.
Comment 7 jeblad 2012-09-10 12:41:00 UTC
Marking API error messages with a comment "#Do not translate"

https://gerrit.wikimedia.org/r/23298
Comment 8 jeblad 2012-11-01 12:29:37 UTC
*** Bug 41599 has been marked as a duplicate of this bug. ***
Comment 9 db [inactive,noenotif] 2012-11-28 14:27:15 UTC
(In reply to comment #7)
> https://gerrit.wikimedia.org/r/23298

Status Merged
Comment 10 Lydia Pintscher 2013-10-16 22:45:28 UTC
Adam: What's the status here? Can we close this or is something still needed?
Comment 11 Addshore 2013-10-17 09:51:54 UTC
As far as I can tell both points mentioned in the first comment on this big are resolved.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links