From ade0862db139a27331beeddc43d51b9c0ccf857a Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sat, 27 Feb 2016 01:47:15 +0000 Subject: [PATCH] Give a useful message in the temporary blank edit screen Bug: T128028 Change-Id: Ife0a9de96965a9848f362696fc403708fd344825 --- VisualEditor.hooks.php | 1 + modules/ve-mw/i18n/en.json | 1 + modules/ve-mw/i18n/qqq.json | 1 + 3 files changed, 3 insertions(+) diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 753f969d60..94bbf67636 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -165,6 +165,7 @@ class VisualEditorHooks { $titleMsg = $title->exists() ? 'editing' : 'creating'; $out->setPageTitle( wfMessage( $titleMsg, $title->getPrefixedText() ) ); + $out->addWikiMsg( 'visualeditor-toload', wfExpandUrl( $url ) ); } $out->addScript( Html::inlineScript( "(window.NORLQ=window.NORLQ||[]).push(" . diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 2a20cbc899..c3754dfd12 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -312,6 +312,7 @@ "visualeditor-shortcuts-insert": "Insert", "visualeditor-special-characters-group-other": "Often used", "visualeditor-timeout":"It looks like this editor is currently unavailable. Would you like to edit in source mode instead?", + "visualeditor-toload": "The editor will now load. If you still see this message after a few seconds, please [$1 reload the page].", "visualeditor-toolbar-savedialog": "Save page", "visualeditor-toolbar-savedialog-short": "Save", "visualeditor-usernamespacepagelink": "Project:User namespace", diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json index a3bc331e68..3e3b335900 100644 --- a/modules/ve-mw/i18n/qqq.json +++ b/modules/ve-mw/i18n/qqq.json @@ -323,6 +323,7 @@ "visualeditor-shortcuts-insert": "Heading for insertion shortcuts\n{{Identical|Insert}}", "visualeditor-special-characters-group-other": "Label of the special character group shown if the wiki has visualeditor-quick-access-characters.json set up.", "visualeditor-timeout": "Text (JavaScript confirm()) shown when the editor fails to load properly due to a 504 Gateway Timeout error.", + "visualeditor-toload": "Text shown to the user in place of the wikitext editor on action=edit/submit when VisualEditor is expected to load.\n\nParameters\n* $1 is the URL which points to a page with a fallback to the wikitext editor if necessary.", "visualeditor-toolbar-savedialog": "Label text for button to open save dialog.\n\nUsed in:\n* {{msg-mw|Guidedtour-tour-gettingstartedtasktoolbarve-click-save-description}}.\n{{Identical|Save page}}", "visualeditor-toolbar-savedialog-short": "Short label text for button to open save dialog on width-restricted devices\n{{Identical|Save}}", "visualeditor-usernamespacepagelink": "Name of a page describing the user namespace (NS2) in this project.\n{{doc-important|Do not translate \"Project\"; it is automatically converted to the wiki's project namespace.}}",