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:
parent
82d2284ce6
commit
1e28d2900e
|
@ -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"), {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
|
||||
{{#conditional-loading-spinner condition=searching}}
|
||||
{{#if fallbackLocaleFullName}}
|
||||
{{#if showFallbackLocaleWarning}}
|
||||
<div class="alert alert-info">
|
||||
{{d-icon "exclamation-circle"}}
|
||||
{{i18n "admin.site_text.fallback_locale_warning" fallback=fallbackLocaleFullName}}
|
||||
|
|
|
@ -4847,7 +4847,7 @@ en:
|
|||
recommended: "We recommend customizing the following text to suit your needs:"
|
||||
show_overriden: "Only show overridden"
|
||||
locale: "Language:"
|
||||
fallback_locale_warning: "You are editing a variety of %{fallback}. Users who choose %{fallback} as their interface language won't see your changes."
|
||||
fallback_locale_warning: "You are editing a language based on %{fallback}. Users who choose %{fallback} as their interface language won't see your changes."
|
||||
more_than_50_results: "There are more than 50 results. Please refine your search."
|
||||
|
||||
settings: # used by theme and site settings
|
||||
|
|
|
@ -118,6 +118,7 @@ basic:
|
|||
default: false
|
||||
set_locale_from_accept_language_header:
|
||||
default: false
|
||||
client: true
|
||||
validator: "AllowUserLocaleEnabledValidator"
|
||||
support_mixed_text_direction:
|
||||
client: true
|
||||
|
|
Loading…
Reference in New Issue