Author: mdale
Description:
The issue comes up when you want to get a localized message from the api that includes parser logic.
For example: http://www.mediawiki.org/w/api.php?action=parse&uselang=wa&text={{int:undelete_short|0}}&format=json
returns: <p>Rapexhî 0 candjmints</p>
wa language uses singular form for zero, so the proper transformation per uselang should be:
<p>Rapexhî on candjmint </p>
It should certainly not be a mix of the "wa" language key with the "English" plural parser logic.
There are two possible solutions that I see:
- We use "uselang" language instead of wgContentLang when doing action=parse. This could add a check at the api level for uselang and override wgContentLang.
or
- We could have a separate api entry point for localizations with transforms ( ie extend the meta=allmessages entry point with msg arguments. Avoiding the action=parse and {{int}} hack all together.
Version: unspecified
Severity: enhancement