From 58234246ff45ccbf058398e3f5f9945c6dd8d70f Mon Sep 17 00:00:00 2001 From: Natalie Tay Date: Tue, 31 Jan 2023 01:41:25 +0800 Subject: [PATCH] DEV: Remove elder from codebase and also update 'regular' to 'member' (#20065) A while back the definition of TL was changed but many areas in the codebase still use the term 'Regular user' despite it having some implicit meaning (TL2). See 20140905055251_rename_trust_level_badges.rb --- app/assets/javascripts/discourse/app/models/user.js | 6 +++--- .../javascripts/discourse/tests/fixtures/badges-fixture.js | 4 ++-- app/controllers/composer_controller.rb | 2 +- config/locales/server.en.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.js index e36bc13c7ff..ade53f20757 100644 --- a/app/assets/javascripts/discourse/app/models/user.js +++ b/app/assets/javascripts/discourse/app/models/user.js @@ -368,9 +368,9 @@ const User = RestModel.extend({ }, isBasic: equal("trust_level", 0), - isLeader: equal("trust_level", 3), - isElder: equal("trust_level", 4), - canManageTopic: or("staff", "isElder"), + isRegular: equal("trust_level", 3), + isLeader: equal("trust_level", 4), + canManageTopic: or("staff", "isLeader"), @discourseComputed("previous_visit_at") previousVisitAt(previous_visit_at) { diff --git a/app/assets/javascripts/discourse/tests/fixtures/badges-fixture.js b/app/assets/javascripts/discourse/tests/fixtures/badges-fixture.js index 4ef98caae9e..489fd752b2d 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/badges-fixture.js +++ b/app/assets/javascripts/discourse/tests/fixtures/badges-fixture.js @@ -141,7 +141,7 @@ export default { }, { id: 2, - name: "Regular User", + name: "Member", description: null, grant_count: 467, allow_title: false, @@ -170,7 +170,7 @@ export default { }, { id: 4, - name: "Elder", + name: "Leader", description: null, grant_count: 4, allow_title: true, diff --git a/app/controllers/composer_controller.rb b/app/controllers/composer_controller.rb index f558a890eb5..d87441a5615 100644 --- a/app/controllers/composer_controller.rb +++ b/app/controllers/composer_controller.rb @@ -102,7 +102,7 @@ class ComposerController < ApplicationController :not_allowed end - # Regular users can see only basic information why the users cannot see the topic. + # Non-staff users can see only basic information why the users cannot see the topic. reason = nil if !guardian.is_staff? && reason != :private && reason != :category reason diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index b46bbf1cf72..695d67151ab 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -2197,9 +2197,9 @@ en: topic_page_title_includes_category: "Topic page title tag includes the category name." - native_app_install_banner_ios: "Displays DiscourseHub app banner on iOS devices to regular users (trust level 1 and up)." + native_app_install_banner_ios: "Displays DiscourseHub app banner on iOS devices to basic users (trust level 1) and up." - native_app_install_banner_android: "Displays DiscourseHub app banner on Android devices to regular users (trust level 1 and up)." + native_app_install_banner_android: "Displays DiscourseHub app banner on Android devices to basic users (trust level 1) and up." app_association_android: "Contents of .well-known/assetlinks.json endpoint, used for Google's Digital Asset Links API." app_association_ios: "Contents of apple-app-site-association endpoint, used to create Universal Links between this site and iOS apps."