Page MenuHomePhabricator

API self-documentation should not be localized.
Closed, DeclinedPublic

Description

Several of our API modules use system messages to generate self-documentation, especially in the getPossibleErrors method. However, by convention, the API self-documentation should be english only. Consequently, all these messages are currently marked as DO NOT TRANSLATE in the qqq.json file. So, using messages there is pointless and misleading.

The messages used in getPossibleErrors correspond to API error codes, and could be used for localizing errors reported using the dieError() or dieException() methods (see bug 64874). To do this, replace the message access in getPossibleErrors with a literal string, remove the DO NOT TRANSLATE marker in the qqq.json file, and replace calls to dieUsage with dieError or dieException, respectively.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=64874
https://bugzilla.wikimedia.org/show_bug.cgi?id=67950
https://bugzilla.wikimedia.org/show_bug.cgi?id=35074

Details

Reference
bz67732

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:30 AM
bzimport set Reference to bz67732.
bzimport added a subscriber: Unknown Object (MLST).
daniel created this task.Jul 9 2014, 2:46 PM

I disagree that "the API self-documentation should be english only". It should be translatable, and the translations should be shown at [[Special:ApiSandbox]] (Bug 67950).

@Helder: the current consensus is that API error messages and self-documentation is english only. If you want to change this, please make an RDF for mediawiki core. This bug is making Wikibase compliant with the conventions defined for core.

possible errors were removed with gerrit 152760 from core

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Legoktm closed this task as Declined.Jan 14 2015, 9:43 PM
Legoktm claimed this task.
Legoktm added a subscriber: Legoktm.

All API documentation is now intentionally localized.