Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79840
Change subject: Bug 53059: Clarify editing message when unavailable
......................................................................
Bug 53059: Clarify editing message when unavailable
Distinguish between not allowed and not able to edit
Change-Id: If750d0c03f3822e5387915cc69033172f960ffd2
---
M MobileFrontend.i18n.php
M javascripts/modules/editor/editor.js
2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/40/79840/1
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index d8ba0e5..b0e04db 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -249,6 +249,7 @@
// edit
'mobile-frontend-editor-disabled' => 'You are not allowed to edit this
page.',
+ 'mobile-frontend-editor-unavailable' => 'Mobile editing is not
currently available on your browser. Please try a different browser.',
'mobile-frontend-editor-cta' => 'You must be logged in to edit pages on
mobile.',
'mobile-frontend-editor-edit' => 'Edit',
'mobile-frontend-editor-continue' => 'Continue',
@@ -685,6 +686,7 @@
Used when the user is not logged in.
{{Related|Mobile-frontend-login}}',
'mobile-frontend-editor-disabled' => 'Toast message that appears when a
user is unable to edit a page and clicks edit icon',
+ 'mobile-frontend-editor-unavailable' => 'Toast message that appears
when a user has a browser incapable of editing when they click on the edit
button.',
'mobile-frontend-editor-cta' => "Caption for call to action when an
anonymous user clicks on edit icon. (Note the mobile site currently doesn't
allow anonymous editing.)",
'mobile-frontend-editor-edit' => 'Caption for the link showing edit
form.
{{Identical|Edit}}',
diff --git a/javascripts/modules/editor/editor.js
b/javascripts/modules/editor/editor.js
index 3f473cf..f62d8fb 100644
--- a/javascripts/modules/editor/editor.js
+++ b/javascripts/modules/editor/editor.js
@@ -4,6 +4,7 @@
popup = M.require( 'notifications' ),
// FIXME: Disable on IE < 10 for time being
blacklisted = /MSIE \d\./.test( navigator.userAgent ),
+ isEditingSupported = M.router.isSupported() && !blacklisted,
CtaDrawer = M.require( 'CtaDrawer' ),
drawer = new CtaDrawer( {
returnToQuery: 'article_action=edit',
@@ -59,7 +60,7 @@
} );
}
- if ( mw.config.get( 'wgIsPageEditable' ) && M.router.isSupported() &&
!blacklisted ) {
+ if ( mw.config.get( 'wgIsPageEditable' ) && isEditingSupported ) {
if ( mw.config.get( 'wgMFAnonymousEditing' ) || mw.config.get(
'wgUserName' ) ) {
init();
} else {
@@ -70,7 +71,7 @@
} else {
// FIXME change when micro.tap.js in stable
$( '#ca-edit' ).on( mw.config.get( 'wgMFMode' ) === 'alpha' ?
'tap' : 'click', function() {
- popup.show( mw.msg( 'mobile-frontend-editor-disabled'
), 'toast' );
+ popup.show( mw.msg( isEditingSupported ?
'mobile-frontend-editor-disabled' : 'mobile-frontend-editor-unavailable' ),
'toast' );
} );
}
--
To view, visit https://gerrit.wikimedia.org/r/79840
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If750d0c03f3822e5387915cc69033172f960ffd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits