https://bugzilla.wikimedia.org/show_bug.cgi?id=45277
Web browser: ---
Bug ID: 45277
Summary: Improve localizable error messages for API calls
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: WikidataRepo
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
Wikibase API modules currently often provide a localized error info when
calling ApiBase::dieUsage. This is inconsistent with current practice in core,
and insufficient for providing localized errors in the UI.
Instead, we should use a new call like dieUsageWithMessage, providing an error
code an a Message objects (or message key and parameters). An unlocalized error
info may be added, but seems redundant.
This should work similarly to the error reports generated from Status objects,
as introduced by I4094feee as a solution to bug 45099.
Note that ApiBase::dieUsageMsg() is similar, but insufficient (as it doesn't
provide message keys and parameters to the caller). Also, it requires us to
define a mapping between error codes and messages, which is painful to
maintain, and non-obvious to use.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l