From: Justin Du Date: Thu, 5 Jan 2017 16:44:11 +0000 (-0600) Subject: Follow up to I42e74ed3bcd0bfa9ec0c344ba67668210450c975 X-Git-Tag: 1.31.0-rc.0~4389^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=182878b8d6d74b445da9f28ad6258624e34333b5;p=lhc%2Fweb%2Fwiklou.git Follow up to I42e74ed3bcd0bfa9ec0c344ba67668210450c975 * Make pagelang-unchanged-language-default message documentation more explicit * Use same code when displaying pagelang-unchanged-language-default and pagelang-unchanged-language * Use 'this action' instead of 'this API' Change-Id: I4bb4e380e090e507a26ca24b5364d8cfc7a7de71 --- diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 4b6e932a21..79d0295a24 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -1354,7 +1354,7 @@ "apihelp-setnotificationtimestamp-example-allpages": "Reset the notification status for pages in the {{ns:user}} namespace.", "apihelp-setpagelanguage-description": "Change the language of a page.", - "apihelp-setpagelanguage-description-disabled": "Changing the language of a page is not allowed on this wiki.\n\nEnable [[mw:Manual:$wgPageLanguageUseDB|$wgPageLanguageUseDB]] to use the API.", + "apihelp-setpagelanguage-description-disabled": "Changing the language of a page is not allowed on this wiki.\n\nEnable [[mw:Manual:$wgPageLanguageUseDB|$wgPageLanguageUseDB]] to use this action.", "apihelp-setpagelanguage-param-title": "Title of the page whose language you wish to change. Cannot be used together with $1pageid.", "apihelp-setpagelanguage-param-pageid": "Page ID of the page whose language you wish to change. Cannot be used together with $1title.", "apihelp-setpagelanguage-param-lang": "Language code of the language to change the page to. Use default to reset the page to the wiki's default content language.", diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index 55ae692621..8546a08d89 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -175,10 +175,13 @@ class SpecialPageLanguage extends FormSpecialPage { if ( $newLanguage === $oldLanguage ) { // Check if old language does not exist if ( !$oldLanguage ) { - return Status::newFatal( - 'pagelang-unchanged-language-default', - wfEscapeWikiText( $title->getPrefixedText() ) - ); + return Status::newFatal( ApiMessage::create( + [ + 'pagelang-unchanged-language-default', + wfEscapeWikiText( $title->getPrefixedText() ) + ], + 'pagelang-unchanged-language' + ) ); } return Status::newFatal( 'pagelang-unchanged-language', diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 77638945fe..1939bbdbf4 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -4243,7 +4243,7 @@ "pagelang-submit": "Submit button label for Special:PageLanguage form\n{{Identical|Submit}}", "pagelang-nonexistent-page": "Error message shown when the page the user is trying to change the language on does not exist.\n\nParameters:\n* $1 - the title of the nonexistent page", "pagelang-unchanged-language": "Error message shown when the language the user is trying to change the page to and the current language the page is in are the same.\n\nParameters:\n* $1 - the title of the target page\n* $2 - the current language of the page", - "pagelang-unchanged-language-default": "Error message shown when the language the user is trying to change the page to is already the wiki's default content language.\n\nParameters:\n* $1 - the title of the target page", + "pagelang-unchanged-language-default": "Error message shown when the language the user is trying to set a page to fall back to the wiki's default content language, but the page is already set to do so.\n\nParameters:\n* $1 - the title of the target page", "pagelang-db-failed": "Error message shown when the database fails to update the language of the page", "right-pagelang": "{{Doc-right|pagelang}}\nRight to change page language on Special:PageLanguage", "action-pagelang": "{{Doc-action|pagelang}}",