From 036b9c41674a8eb1bdcd71a15fffb5a091223d9e Mon Sep 17 00:00:00 2001 From: Baha Date: Tue, 4 Apr 2017 18:52:57 -0400 Subject: Make API documentation links language aware Links generated by the API are now aware of the user's preferred language and will show documents in that language if available. To test, log in to mediawiki.org and set your language preference to 'es', then on an MediaWiki installation with this patch view the generated expanded API help at `api.php?action=help&recursivesubmodules=1&modules=main`. Each link to documentation on mediawiki.org should take you to its translated /es subpage, if one exists. Bug: T104518 Change-Id: I339a1f3ae1bce9d759cf251899d57c32b1def91e --- includes/api/ApiQueryRandom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/api/ApiQueryRandom.php') diff --git a/includes/api/ApiQueryRandom.php b/includes/api/ApiQueryRandom.php index 00bd467cab33..cc1fc89f0761 100644 --- a/includes/api/ApiQueryRandom.php +++ b/includes/api/ApiQueryRandom.php @@ -209,6 +209,6 @@ class ApiQueryRandom extends ApiQueryGeneratorBase { } public function getHelpUrls() { - return 'https://www.mediawiki.org/wiki/API:Random'; + return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Random'; } } -- cgit v1.2.3