Make VE<->NWE switching progress bars non-cancellable and labelled

Soft dependency on Ifa41578164 in core to support the
non-cancellable flag.

Bug: T143582
Change-Id: I886a8f5ca90737938e4c0fedb2b456d851a12326
This commit is contained in:
Ed Sanders 2016-09-02 16:44:35 -07:00
parent 18b057d984
commit edadf530e1
4 changed files with 11 additions and 1 deletions

View file

@ -1223,12 +1223,14 @@
"visualeditor-help-label",
"visualeditor-help-link",
"visualeditor-help-title",
"visualeditor-mweditmodesource-progress",
"visualeditor-mweditmodesource-title",
"visualeditor-mweditmodesource-tool",
"visualeditor-mweditmodesource-warning",
"visualeditor-mweditmodesource-warning-cancel",
"visualeditor-mweditmodesource-warning-switch",
"visualeditor-mweditmodesource-warning-switch-discard",
"visualeditor-mweditmodeve-progress",
"visualeditor-pagemenu-tooltip",
"visualeditor-pagetranslationwarning",
"visualeditor-recreate",

View file

@ -254,6 +254,7 @@
"visualeditor-mainnamespacepagelink": "Project:Main namespace",
"visualeditor-media-input-placeholder": "Search for media",
"visualeditor-meta-tool": "Options",
"visualeditor-mweditmodesource-progress": "Switching to source editing…",
"visualeditor-mweditmodesource-title": "Switch to source editing?",
"visualeditor-mweditmodesource-tool": "Switch to source editing",
"visualeditor-mweditmodesource-warning": "You are switching to source editing.\nDo you want to continue?",
@ -262,6 +263,7 @@
"visualeditor-mweditmodesource-warning-switch-discard": "Discard my changes and switch",
"visualeditor-mweditmodeve-popup-body": "You can switch back to visual editing at any time by clicking on this icon.",
"visualeditor-mweditmodeve-popup-title": "You have switched to source editing",
"visualeditor-mweditmodeve-progress": "Switching to visual editing…",
"visualeditor-mweditmodeve-showagain": "Don't show this message again",
"visualeditor-mweditmodeve-title": "Switch to visual editing?",
"visualeditor-mweditmodeve-tool": "Switch to visual editing",

View file

@ -265,6 +265,7 @@
"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.}}",
"visualeditor-media-input-placeholder": "Place holder text for media search input",
"visualeditor-meta-tool": "Text of tool in the toolbar the lets users set categories, language links and other page settings.\n{{Identical|Options}}",
"visualeditor-mweditmodesource-progress": "Title of progress bar shown while switching to source mode.",
"visualeditor-mweditmodesource-title": "Title of dialog to confirm switching to source mode.",
"visualeditor-mweditmodesource-tool": "Label for tool that changes edit mode to source editing.",
"visualeditor-mweditmodesource-warning": "Warning message show before changing edit mode to source editing. It may allow the user to keep the changes using the message {{msg-mw|Visualeditor-mweditmodesource-warning-switch}} or cancel.",
@ -273,6 +274,7 @@
"visualeditor-mweditmodesource-warning-switch-discard": "Label for the button on the confirmation dialog for switching to source editing to continue and switch editors when doing so will throw away your changes.",
"visualeditor-mweditmodeve-popup-body": "Body text of popup shown after switching to source mode from visual mode",
"visualeditor-mweditmodeve-popup-title": "Title of popup shown after switching to source mode from visual mode",
"visualeditor-mweditmodeve-progress": "Title of progress bar shown while switching to visual mode.",
"visualeditor-mweditmodeve-showagain": "Label for the checkboxes to not show one of the 'switched to visual mode' or 'switched to source mode' popups again",
"visualeditor-mweditmodeve-title": "Title of dialog to confirm switching to visual mode.",
"visualeditor-mweditmodeve-tool": "Label for tool that changes edit mode to visual editing.",

View file

@ -117,7 +117,11 @@ ve.init.mw.DesktopWikitextArticleTarget.prototype.onWindowPopState = function (
ve.init.mw.DesktopWikitextArticleTarget.prototype.reloadSurface = function ( dataPromise ) {
var target = this;
// Create progress - will be discarded when surface is destroyed.
this.getSurface().createProgress( $.Deferred().promise() );
this.getSurface().createProgress(
$.Deferred().promise(),
ve.msg( this.mode === 'source' ? 'visualeditor-mweditmodesource-progress' : 'visualeditor-mweditmodeve-progress' ),
true /* non-cancellable */
);
this.activating = true;
this.activatingDeferred = $.Deferred();
this.load( dataPromise );