aude created this task.
aude added projects: Wikidata, MediaWiki-extensions-WikibaseRepository.
Herald added a subscriber: Aklapper.

TASK DESCRIPTION

Since https://gerrit.wikimedia.org/r/#/c/353545/ / T153359, we have lost some of the error descriptions in api error messages.

currently on Wikidata:

https://www.wikidata.org/w/api.php?action="">

{
    "error": {
        "code": "param-missing",
        "info": "A parameter that is required was missing. (Either provide the item \"ids\" or pairs of \"sites\" and \"titles\" for corresponding pages)",
        "messages": [
            {
                "name": "wikibase-api-param-missing",
                "parameters": [],
                "html": {
                    "*": "A parameter that is required was missing."
                }
            }
        ],
        "*": "See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "mw1278"
}

Wikibase master:

{
    "error": {
        "code": "param-missing",
        "info": "A parameter that is required was missing.",
        "messages": [
            {
                "name": "wikibase-api-param-missing",
                "parameters": [],
                "html": {
                    "*": "A parameter that is required was missing."
                }
            }
        ],
        "*": "See https://wikidatawiki/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    }
}

Think we want to make the full api error messages (including descriptions) translatable and add i18n messages for them.

The way ApiErrorReporter works now, the messages are based on the error code. (e.g. wikibase-api-param-missing). This error code is shared by numerous different api modules, each with a different error description.

We should still share the error code and not change it (api users might depend on how it is now), but allow the message / description to differ and be translatable.


TASK DETAIL
https://phabricator.wikimedia.org/T168859

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: aude
Cc: aude, Aklapper, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to