mediawiki.confirmCloseWindow: Add missing localisation message

The code was introduced in I5d35b6fddd7, which copied the
code from UploadWizard, but forgot about the localisation
message.

Change-Id: I8a7290bb6961a0a397b99427c5da2d4cbbe6f251
This commit is contained in:
Bartosz Dziewoński 2020-03-11 21:12:50 +01:00 committed by Krinkle
parent cb56548124
commit da2a97a46f
4 changed files with 6 additions and 1 deletions

View file

@ -778,6 +778,7 @@
"content-failed-to-parse": "Failed to parse $2 content for $1 model: $3",
"invalid-content-data": "Invalid content data",
"content-not-allowed-here": "\"$1\" content is not allowed on page [[:$2]] in slot \"$3\"",
"confirmleave-warning": "Leaving this page may cause you to lose any changes you have made.",
"editwarning-warning": "Leaving this page may cause you to lose any changes you have made.\nIf you are logged in, you can disable this warning in the \"{{int:prefs-editing}}\" section of your preferences.",
"editpage-invalidcontentmodel-title": "Content model not supported",
"editpage-invalidcontentmodel-text": "The content model \"$1\" is not supported.",

View file

@ -992,6 +992,7 @@
"content-failed-to-parse": "Error message indicating that the page's content can not be saved because it is syntactically invalid. This may occurr for content types using serialization or a strict markup syntax.\n\nParameters:\n* $1 content model, any one of the following messages:\n** {{msg-mw|Content-model-wikitext}}\n** {{msg-mw|Content-model-javascript}}\n** {{msg-mw|Content-model-css}}\n** {{msg-mw|Content-model-json}}\n** {{msg-mw|Content-model-text}}\n* $2 content format as MIME type (e.g. <code>text/css</code>)\n* $3 specific error message",
"invalid-content-data": "Error message indicating that the page's content can not be saved because it is invalid. This may occurr for content types with internal consistency constraints.",
"content-not-allowed-here": "Error message indicating that the desired content model is not supported in given location.\n* $1 - the human readable name of the content model: {{msg-mw|Content-model-wikitext}}, {{msg-mw|Content-model-javascript}}, {{msg-mw|Content-model-json}}, {{msg-mw|Content-model-css}} or {{msg-mw|Content-model-text}}\n* $2 - the title of the page in question\n* $3 - the role name of the [[:mw:Manual:Slot|slot]] the content is not allowed in",
"confirmleave-warning": "Generic warning message that may be shown when attempting to leave some pages with unsaved changes.\n\nSimilar messages:\n* {{msg-mw|prefswarning-warning}}\n* {{msg-mw|editwarning-warning}}",
"editwarning-warning": "Uses {{msg-mw|Prefs-editing}}",
"editpage-invalidcontentmodel-title": "Title of error page shown when using an unrecognized content model on EditPage",
"editpage-invalidcontentmodel-text": "Error message shown when using an unrecognized content model on EditPage. $1 is the user's invalid input",

View file

@ -604,6 +604,9 @@ return [
'scripts' => [
'resources/src/mediawiki.confirmCloseWindow.js',
],
'messages' => [
'confirmleave-warning',
],
'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.debug' => [

View file

@ -38,7 +38,7 @@
message;
options = $.extend( {
message: mw.message( 'mwe-prevent-close' ).text(),
message: mw.message( 'confirmleave-warning' ).text(),
test: function () { return true; }
}, options );