FIX: Show the fallback locale warning when both settings are enabled. (#11787)

We only want to warn admins when both settings are enabled. When "set locale from accept language header" setting is enabled, the user locale will be set based on the header when they register an account on the site, which could be confusing.
This commit is contained in:
Roman Rizzi 2021-01-21 13:09:32 -03:00 committed by GitHub
parent b6afcf98b9
commit fb9e422bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,8 +45,8 @@ export default Controller.extend({
@discourseComputed("locale")
showFallbackLocaleWarning() {
return (
(this.siteSettings.allow_user_locale ||
this.siteSettings.set_locale_from_accept_language_header) &&
this.siteSettings.allow_user_locale &&
this.siteSettings.set_locale_from_accept_language_header &&
this.fallbackLocaleFullName
);
},