Kaldari has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/205473

Change subject: Making the Gather login and signup messages work in standard way
......................................................................

Making the Gather login and signup messages work in standard way

This means they don't have to be hard-coded into MobileFronend and
they will also work with the core login and signup pages in alpha.

Dependency: change If5ec2ca
Change-Id: I374fd141d555f1fed06abf92ebd00461f87d96eb
---
M i18n/en.json
M i18n/qqq.json
M includes/Gather.hooks.php
M resources/ext.gather.watchstar/CollectionsWatchstar.js
4 files changed, 15 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/73/205473/1

diff --git a/i18n/en.json b/i18n/en.json
index 52b9e66..2bc43f1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,9 +12,8 @@
        "gathereditfeed": "Gather lists edit feed",
        "gatherlists": "Gather lists",
        "gather-checkuser-log-action": "performed action \"$1\" on $2 via the 
Gather extension",
-       "gather-purpose": "Now you can group pages into collections to share 
with friends or save for later.",
-       "gather-purpose-login-action": "Log in to try.",
-       "gather-purpose-signup-action": "Sign up to try.",
+       "gather-purpose-login-action": "Log in to group pages into collections 
to share with friends or save for later.",
+       "gather-purpose-signup-action": "Sign up to group pages into 
collections to share with friends or save for later.",
        "gather-lists-showhidden": "Show hidden lists",
        "gather-lists-showvisible": "Show visible lists",
        "gather-lists-collection-owner": "Owner",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bb4b95c..8fb6b93 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,7 +17,6 @@
        "gathereditfeed": "Title of special page shown on Special:SpecialPages 
that shows a feed of edits for Gather collections.",
        "gatherlists": "Title of special page shown on Special:SpecialPages 
that allows you to view all publicly created lists.",
        "gather-checkuser-log-action": "Message that shows up in 
Special:CheckUser when an action on a collection is made.\nParameters:\n* $1 - 
action performed on collection.\n* $2 - a link to the collection being operated 
on.",
-       "gather-purpose": "Shows on [[Special:UserLogin]] explains why someone 
would want to login to add to a collection.",
        "gather-purpose-login-action": "Shows on [[Special:UserLogin]] 
prompting user to login.",
        "gather-purpose-signup-action": "Shows on [[Special:UserLogin]] 
prompting user to sign up.",
        "gather-lists-showhidden": "Link title to show hidden lists on 
[[Special:GatherLists]].",
diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index bd694ac..4b06246 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -190,9 +190,12 @@
         * @param array $messages Array of valid messages, already added
         */
        public static function onLoginFormValidErrorMessages( &$messages ) {
-               // support for both, mobile and desktop, remove the key 
"Gather",
-               // when mobile uses desktop login page
-               $messages['Gather'] = 'gather-loginpage-desc';
-               $messages[] = 'gather-anon-view-lists';
+               $messages = array_merge( $messages,
+                       array(
+                               'gather-anon-view-lists',
+                               'gather-purpose-login-action', // watchstar 
button login CTA
+                               'gather-purpose-signup-action', // watchstar 
button sign-up CTA
+                       )
+               );
        }
 }
diff --git a/resources/ext.gather.watchstar/CollectionsWatchstar.js 
b/resources/ext.gather.watchstar/CollectionsWatchstar.js
index b9414d6..9ea10a9 100644
--- a/resources/ext.gather.watchstar/CollectionsWatchstar.js
+++ b/resources/ext.gather.watchstar/CollectionsWatchstar.js
@@ -41,8 +41,12 @@
                        content: mw.msg( 'gather-anon-cta' ),
                        queryParams: {
                                campaign: 'gather',
-                               returntoquery: 
'article_action=add_to_collection'
-                       }
+                               returntoquery: 
'article_action=add_to_collection',
+                               warning: 'gather-purpose-login-action'
+                       },
+                       signupQueryParams: {
+                               warning: 'gather-purpose-signup-action'
+                       },
                },
                /**
                 * @inheritdoc

-- 
To view, visit https://gerrit.wikimedia.org/r/205473
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I374fd141d555f1fed06abf92ebd00461f87d96eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Kaldari <rkald...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to