Follow up to I42e74ed3bcd0bfa9ec0c344ba67668210450c975
authorJustin Du <justin.d128@gmail.com>
Thu, 5 Jan 2017 16:44:11 +0000 (10:44 -0600)
committerJustin Du <justin.d128@gmail.com>
Thu, 5 Jan 2017 16:44:11 +0000 (10:44 -0600)
* 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

includes/api/i18n/en.json
includes/specials/SpecialPageLanguage.php
languages/i18n/qqq.json

index 4b6e932..79d0295 100644 (file)
        "apihelp-setnotificationtimestamp-example-allpages": "Reset the notification status for pages in the <kbd>{{ns:user}}</kbd> 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 <var>[[mw:Manual:$wgPageLanguageUseDB|$wgPageLanguageUseDB]]</var> to use the API.",
+       "apihelp-setpagelanguage-description-disabled": "Changing the language of a page is not allowed on this wiki.\n\nEnable <var>[[mw:Manual:$wgPageLanguageUseDB|$wgPageLanguageUseDB]]</var> to use this action.",
        "apihelp-setpagelanguage-param-title": "Title of the page whose language you wish to change. Cannot be used together with <var>$1pageid</var>.",
        "apihelp-setpagelanguage-param-pageid": "Page ID of the page whose language you wish to change. Cannot be used together with <var>$1title</var>.",
        "apihelp-setpagelanguage-param-lang": "Language code of the language to change the page to. Use <kbd>default</kbd> to reset the page to the wiki's default content language.",
index 55ae692..8546a08 100644 (file)
@@ -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',
index 7763894..1939bbd 100644 (file)
        "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}}",