From 845987ce23d816c528011ae35122afcadf113931 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Wed, 24 Feb 2021 04:25:55 +0200 Subject: [PATCH] FIX: Improve error message when login_required sites are under load Previously a confusing message would pop up making private communities thing that anonymous access is granted. --- .../javascripts/discourse/app/components/global-notice.js | 4 +++- config/locales/client.en.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/global-notice.js b/app/assets/javascripts/discourse/app/components/global-notice.js index c6a2e9e967b..9dc041b8636 100644 --- a/app/assets/javascripts/discourse/app/components/global-notice.js +++ b/app/assets/javascripts/discourse/app/components/global-notice.js @@ -72,7 +72,9 @@ export default Component.extend({ removeCookie("dosp", { path: "/" }); notices.push( Notice.create({ - text: I18n.t("forced_anonymous"), + text: this.siteSettings.login_required + ? I18n.t("forced_anonymous_login_required") + : I18n.t("forced_anonymous"), id: "forced-anonymous", }) ); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 3d100889dcf..a603f2fcc15 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -3634,6 +3634,7 @@ en: custom_message_template_topic: "Hey, I thought you might enjoy this topic!" forced_anonymous: "Due to extreme load, this is temporarily being shown to everyone as a logged out user would see it." + forced_anonymous_login_required: "The site is under extreme load and cannot be loaded at this time, try again in a few minutes." footer_nav: back: "Back"