UX: Fallback locale warning improvements. (#11775)

- Improve warning message.
- Only display the warning if the language has a fallback and either "allow_user_locale", or "set_locale_from_accept_language_header" are enabled.
This commit is contained in:
Roman Rizzi
2021-01-20 18:08:02 -03:00
committed by GitHub
parent 82d2284ce6
commit 1e28d2900e
4 changed files with 12 additions and 2 deletions
@@ -42,6 +42,15 @@ export default Controller.extend({
}
},
@discourseComputed("locale")
showFallbackLocaleWarning() {
return (
(this.siteSettings.allow_user_locale ||
this.siteSettings.set_locale_from_accept_language_header) &&
this.fallbackLocaleFullName
);
},
actions: {
edit(siteText) {
this.transitionToRoute("adminSiteText.edit", siteText.get("id"), {