From 71905bb2c637807e9a7e08d50b28de48faa6b56c Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Fri, 5 Oct 2018 13:21:14 -0400 Subject: [PATCH] fix watched categories --- public/language/en-GB/pages.json | 1 + public/language/en-GB/user.json | 1 + src/controllers/accounts/categories.js | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/language/en-GB/pages.json b/public/language/en-GB/pages.json index a9db79d873..bf8b141c6f 100644 --- a/public/language/en-GB/pages.json +++ b/public/language/en-GB/pages.json @@ -51,6 +51,7 @@ "account/posts": "Posts made by %1", "account/topics": "Topics created by %1", "account/groups": "%1's Groups", + "account/watched_categories": "%1's Watched Categories", "account/bookmarks": "%1's Bookmarked Posts", "account/settings": "User Settings", "account/watched": "Topics watched by %1", diff --git a/public/language/en-GB/user.json b/public/language/en-GB/user.json index 0644beda99..7ed9d2b48f 100644 --- a/public/language/en-GB/user.json +++ b/public/language/en-GB/user.json @@ -27,6 +27,7 @@ "profile_views": "Profile views", "reputation": "Reputation", "bookmarks":"Bookmarks", + "watched_categories": "Watched categories", "watched": "Watched", "ignored": "Ignored", "followers": "Followers", diff --git a/src/controllers/accounts/categories.js b/src/controllers/accounts/categories.js index a97f770373..746c05e0e0 100644 --- a/src/controllers/accounts/categories.js +++ b/src/controllers/accounts/categories.js @@ -33,7 +33,7 @@ categoriesController.get = function (req, res, callback) { flattenArray(results); userData.categories = results.all; - userData.title = '[[pages:account/watched_categories]]'; + userData.title = '[[pages:account/watched_categories, ' + userData.username + ']]'; res.render('account/categories', userData); }, ], callback); @@ -49,7 +49,7 @@ function flattenArray(results) { var category = results.all[i]; category.isIgnored = false; - if (results.ignored.includes(category.cid)) { + if (results.ignored.includes(String(category.cid))) { category.isIgnored = true; }