From 1b61a14535593153048638277722746601178578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 21 Sep 2018 02:20:37 +0200 Subject: [PATCH] When browser doesn't support mobile editor, use fallback editor rather than none Change-Id: I41bd554c3e979061dd8b1846a6412efb3284e7e9 --- i18n/en.json | 1 - i18n/qqq.json | 1 - resources/skins.minerva.editor/init.js | 9 +++++---- skin.json | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index 3441a53..e81e706 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -16,7 +16,6 @@ "mobile-frontend-editor-tutorial-cancel": "No, thanks", "mobile-frontend-editor-tutorial-confirm": "Start editing", "mobile-frontend-editor-tutorial-summary": "Try improving the $1 page.
Don't be scared of markup.", - "mobile-frontend-editor-unavailable": "Mobile editing is not currently available on your browser. Please try a different browser.", "mobile-frontend-editor-uploadenable": "Please upload a photo first to enable editing.", "mobile-frontend-footer-sitename": "{{SITENAME}}", "mobile-frontend-history": "View edit history of this page.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 25fe444..afa4553 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -25,7 +25,6 @@ "mobile-frontend-editor-tutorial-cancel": "Label for button that user can click if they do not want to edit.\n{{Identical|No thanks}}", "mobile-frontend-editor-tutorial-confirm": "Text for the button a user clicks after they have read the editing tutorial and are ready to edit the page.\n\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-summary}}", "mobile-frontend-editor-tutorial-summary": "Text for tutorial overlay presented to a user the first time they try to edit a page.\n\nParameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-alt-summary}}", - "mobile-frontend-editor-unavailable": "Message that appears when a user attempts to edit with an unsupported/incapable browser.\n\nPreceded by the header {{msg-mw|Mobile-frontend-editor-unavailable-header}}.", "mobile-frontend-editor-uploadenable": "Shown when try to edit a new file page.", "mobile-frontend-footer-sitename": "Name of site", "mobile-frontend-history": "Used as label for the link which points to the \"Edit history\" page.\n\nThis is shown on the Main Page in place of a last modified label to avoid confusion caused by transclusions.\n\nIf not the Main Page, the following message is used:\n* {{msg-mw|Mobile-frontend-last-modified-date}}", diff --git a/resources/skins.minerva.editor/init.js b/resources/skins.minerva.editor/init.js index 477e3c8..096bd89 100644 --- a/resources/skins.minerva.editor/init.js +++ b/resources/skins.minerva.editor/init.js @@ -410,10 +410,11 @@ } if ( !isEditingSupported ) { - // Editing is disabled (or browser is blacklisted) - updateEditPageButton( false ); - showSorryToast( mw.msg( 'mobile-frontend-editor-unavailable' ) ); - } else if ( isNewFile ) { + // Browser doesn't support mobile editor (or is blacklisted), use the fallback editor. + return; + } + + if ( isNewFile ) { updateEditPageButton( true ); // Is a new file page (enable upload image only) Bug 58311 showSorryToast( mw.msg( 'mobile-frontend-editor-uploadenable' ) ); diff --git a/skin.json b/skin.json index 8b8730f..b27f98e 100644 --- a/skin.json +++ b/skin.json @@ -530,7 +530,6 @@ ], "messages": [ "mobile-frontend-editor-disabled", - "mobile-frontend-editor-unavailable", "mobile-frontend-editor-uploadenable", "mobile-frontend-editor-cta", "mobile-frontend-editor-edit",