diff --git a/extension.json b/extension.json index 92d2c0f6f7..0adc9d44ae 100644 --- a/extension.json +++ b/extension.json @@ -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", diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 99d20b07a6..e3bd6933e5 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -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", diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json index a9b80333d0..889487c4c9 100644 --- a/modules/ve-mw/i18n/qqq.json +++ b/modules/ve-mw/i18n/qqq.json @@ -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.", diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js index 5b7df8715f..cc5d784f58 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js @@ -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 );