REFACTOR: Change `watch` wording to `unignore` (#7112)

REFACTOR: Change watch wording to unignore (#7112)

  • REFACTOR: Change watch wording to unignore
diff --git a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 b/app/assets/javascripts/discourse/components/user-card-contents.js.es6
index f81fc71..d13fcd1 100644
--- a/app/assets/javascripts/discourse/components/user-card-contents.js.es6
+++ b/app/assets/javascripts/discourse/components/user-card-contents.js.es6
@@ -195,11 +195,6 @@ export default Ember.Component.extend(
         this._close();
       },
 
-      watchUser() {
-        this.get("user").watch();
-        this._close();
-      },
-
       showUser() {
         this.showUser(this.get("user"));
         this._close();
diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6
index d6f577f..48d2711 100644
--- a/app/assets/javascripts/discourse/controllers/user.js.es6
+++ b/app/assets/javascripts/discourse/controllers/user.js.es6
@@ -152,9 +152,9 @@ export default Ember.Controller.extend(CanCheckEmails, {
       user.ignore().then(() => user.set("ignored", true));
     },
 
-    watchUser() {
+    unignoreUser() {
       const user = this.get("model");
-      user.watch().then(() => user.set("ignored", false));
+      user.unignore().then(() => user.set("ignored", false));
     }
   }
 });
diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6
index ab7f315..18963d7 100644
--- a/app/assets/javascripts/discourse/models/user.js.es6
+++ b/app/assets/javascripts/discourse/models/user.js.es6
@@ -622,7 +622,7 @@ const User = RestModel.extend({
     });
   },
 
-  watch() {
+  unignore() {
     return ajax(`${userPath(this.get("username"))}/ignore.json`, {
       type: "DELETE",
       data: { ignored_user_id: this.get("id") }
diff --git a/app/assets/javascripts/discourse/templates/user.hbs b/app/assets/javascripts/discourse/templates/user.hbs
index 02ff009..b702fd9 100644
--- a/app/assets/javascripts/discourse/templates/user.hbs
+++ b/app/assets/javascripts/discourse/templates/user.hbs
@@ -53,9 +53,9 @@
                   <li>
                   {{#if model.ignored}}
                     {{d-button class="btn-default"
-                               action=(action "watchUser")
+                               action=(action "unignoreUser")
                                icon="far-eye"
-                               label="user.watch"}}
+                               label="user.unignore"}}
                   {{else}}
                     {{d-button class="btn-danger"
                                action=(action "ignoreUser")
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 81d6ea8..de10323 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -14,7 +14,7 @@ class UsersController < ApplicationController
     :pick_avatar, :destroy_user_image, :destroy, :check_emails,
     :topic_tracking_state, :preferences, :create_second_factor,
     :update_second_factor, :create_second_factor_backup, :select_avatar,
-    :ignore, :watch, :revoke_auth_token
+    :ignore, :unignore, :revoke_auth_token
   ]
 
   skip_before_action :check_xhr, only: [
@@ -1004,7 +1004,7 @@ class UsersController < ApplicationController
     render json: success_json
   end
 
-  def watch
+  def unignore
     raise Discourse::NotFound unless SiteSetting.ignore_user_enabled
 
     IgnoredUser.where(user: current_user, ignored_user_id: params[:ignored_user_id]).delete_all
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 1230635..a7524bf 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -637,7 +637,7 @@ en:
       private_message: "Message"
       private_messages: "Messages"
       ignore: "Ignore"
-      watch: "Watch"
+      unignore: "Unignore"
       activity_stream: "Activity"
       preferences: "Preferences"
       profile_hidden: "This user's public profile is hidden."
diff --git a/config/routes.rb b/config/routes.rb
index d3ec465..392400f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -422,7 +422,7 @@ Discourse::Application.routes.draw do
     get "#{root_path}/:username/staff-info" => "users#staff_info", constraints: { username: RouteFormat.username }
     get "#{root_path}/:username/summary" => "users#summary", constraints: { username: RouteFormat.username }
     put "#{root_path}/:username/ignore" => "users#ignore", constraints: { username: RouteFormat.username }
-    delete "#{root_path}/:username/ignore" => "users#watch", constraints: { username: RouteFormat.username }
+    delete "#{root_path}/:username/ignore" => "users#unignore", constraints: { username: RouteFormat.username }
     get "#{root_path}/:username/invited" => "users#invited", constraints: { username: RouteFormat.username }
     get "#{root_path}/:username/invited_count" => "users#invited_count", constraints: { username: RouteFormat.username }
     get "#{root_path}/:username/invited/:filter" => "users#invited", constraints: { username: RouteFormat.username }

GitHub sha: f19d36cb