mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
ve.init.mw.TargetLoader: Error when RESTbase load call fails
No retry right now, but we should at least stop failing silently. Doing this in a window.alert() for now, as OOUI isn't available at this part of the page load just yet (that will be coming soon). Bug: T97041 Change-Id: Iacb195667215ee69d3991e4c41651ab6042243c5
This commit is contained in:
parent
052405565c
commit
7653dec439
|
@ -272,6 +272,10 @@
|
|||
"ext.visualEditor.track",
|
||||
"mediawiki.api"
|
||||
],
|
||||
"messages": [
|
||||
"visualeditor-loaderror-title",
|
||||
"visualeditor-loaderror-message"
|
||||
],
|
||||
"targets": [
|
||||
"desktop",
|
||||
"mobile"
|
||||
|
|
|
@ -245,6 +245,8 @@
|
|||
"visualeditor-linkinspector-illegal-title": "Invalid page title",
|
||||
"visualeditor-linknodeinspector-add-label": "Add label",
|
||||
"visualeditor-linknodeinspector-title": "Simple link",
|
||||
"visualeditor-loaderror-message": "Error loading data from server: $1.",
|
||||
"visualeditor-loaderror-title": "The editor could not load",
|
||||
"visualeditor-loadwarning": "Error loading data from server: $1. Would you like to retry?",
|
||||
"visualeditor-loadwarning-token": "Error loading edit token from server: $1. Would you like to retry?",
|
||||
"visualeditor-mainnamespacepagelink": "Project:Main namespace",
|
||||
|
|
|
@ -254,6 +254,8 @@
|
|||
"visualeditor-linkinspector-illegal-title": "Warning that the entered text is not a valid page title.",
|
||||
"visualeditor-linknodeinspector-add-label": "Label of button that converts an auto-numbered, external, labelless link into a labeled external link",
|
||||
"visualeditor-linknodeinspector-title": "Title of inspector for editing auto-numbered, external, labelless links.\n\nSee also:\n* {{msg-mw|Visualeditor-annotationbutton-linknode-tooltip}}",
|
||||
"visualeditor-loaderror-message": "Text shown in a message box when the editor fails to load properly due to a RESTBase call failing.\n\nParameters:\n* $1 - an error message",
|
||||
"visualeditor-loaderror-title": "Text shown as the title of a message box when the editor fails to load properly for some reason.",
|
||||
"visualeditor-loadwarning": "Text (JavaScript confirm()) shown when the editor fails to load properly.\n\nParameters:\n* $1 - the error message from the server, in English. e.g. \"parsoidserver-http-err\"",
|
||||
"visualeditor-loadwarning-token": "Text (JavaScript confirm()) shown when the editor fails to load properly.\n\nParameters:\n* $1 - the error message from the server.",
|
||||
"visualeditor-mainnamespacepagelink": "Name of a page describing the main namespace (NS0) in this project.\n{{doc-important|Do not translate \"Project\"; it is automatically converted to the wiki's project namespace.}}",
|
||||
|
|
|
@ -144,7 +144,9 @@
|
|||
// Page does not exist, so let the user start with a blank document.
|
||||
return $.Deferred().resolve( '' ).promise();
|
||||
} else {
|
||||
mw.log.warn( 'One of the load requests failed (unhandled).' );
|
||||
window.alert( mw.msg( 'visualeditor-loaderror-message', 'HTTP ' + response.status ) );
|
||||
|
||||
mw.log.warn( 'RESTBase load failed: ' + response.statusText );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue