mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Remove confusing fallback locale warning (#18096)
This commit is contained in:
@@ -42,21 +42,11 @@ export default Controller.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("locale")
|
|
||||||
showFallbackLocaleWarning() {
|
|
||||||
return (
|
|
||||||
this.siteSettings.allow_user_locale &&
|
|
||||||
this.siteSettings.set_locale_from_accept_language_header &&
|
|
||||||
this.fallbackLocaleFullName
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
edit(siteText) {
|
edit(siteText) {
|
||||||
this.transitionToRoute("adminSiteText.edit", siteText.get("id"), {
|
this.transitionToRoute("adminSiteText.edit", siteText.get("id"), {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
locale: this.locale,
|
locale: this.locale,
|
||||||
localeFullName: this.availableLocales[this.locale],
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,39 +1,60 @@
|
|||||||
<div class="search-area">
|
<div class="search-area">
|
||||||
<p>{{i18n "admin.site_text.description"}}</p>
|
<p>{{i18n "admin.site_text.description"}}</p>
|
||||||
|
|
||||||
<TextField @value={{this.q}} @placeholderKey="admin.site_text.search" @class="no-blur site-text-search" @autofocus="true" @key-up={{action "search"}} />
|
<TextField
|
||||||
|
@value={{this.q}}
|
||||||
|
@placeholderKey="admin.site_text.search"
|
||||||
|
@class="no-blur site-text-search"
|
||||||
|
@autofocus="true"
|
||||||
|
@key-up={{action "search"}}
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="reseed">
|
<div class="reseed">
|
||||||
<DButton @action={{route-action "showReseedModal"}} @class="btn-default" @label="admin.reseed.action.label" @title="admin.reseed.action.title" @icon="sync" />
|
<DButton
|
||||||
|
@action={{route-action "showReseedModal"}}
|
||||||
|
@class="btn-default"
|
||||||
|
@label="admin.reseed.action.label"
|
||||||
|
@title="admin.reseed.action.title"
|
||||||
|
@icon="sync"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="filter-options">
|
<p class="filter-options">
|
||||||
<div class="locale">
|
<div class="locale">
|
||||||
<label>{{i18n "admin.site_text.locale"}}</label>
|
<label>{{i18n "admin.site_text.locale"}}</label>
|
||||||
<ComboBox @valueProperty="value" @content={{this.availableLocales}} @value={{this.locale}} @onChange={{action "updateLocale"}} @class="locale-search" @options={{hash filterable=true}} />
|
<ComboBox
|
||||||
|
@valueProperty="value"
|
||||||
|
@content={{this.availableLocales}}
|
||||||
|
@value={{this.locale}}
|
||||||
|
@onChange={{action "updateLocale"}}
|
||||||
|
@class="locale-search"
|
||||||
|
@options={{hash filterable=true}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<Input @type="checkbox" @checked={{this.overridden}} {{on "click" (action "toggleOverridden")}} />
|
<Input
|
||||||
|
@type="checkbox"
|
||||||
|
@checked={{this.overridden}}
|
||||||
|
{{on "click" (action "toggleOverridden")}}
|
||||||
|
/>
|
||||||
{{i18n "admin.site_text.show_overriden"}}
|
{{i18n "admin.site_text.show_overriden"}}
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ConditionalLoadingSpinner @condition={{this.searching}}>
|
<ConditionalLoadingSpinner @condition={{this.searching}}>
|
||||||
{{#if this.showFallbackLocaleWarning}}
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{{d-icon "exclamation-circle"}}
|
|
||||||
{{i18n "admin.site_text.fallback_locale_warning" fallback=this.fallbackLocaleFullName}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if this.siteTexts.extras.recommended}}
|
{{#if this.siteTexts.extras.recommended}}
|
||||||
<p><b>{{i18n "admin.site_text.recommended"}}</b></p>
|
<p><b>{{i18n "admin.site_text.recommended"}}</b></p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each this.siteTexts as |siteText|}}
|
{{#each this.siteTexts as |siteText|}}
|
||||||
<SiteTextSummary @siteText={{siteText}} @editAction={{action "edit"}} @term={{this.q}} @searchRegex={{this.siteTexts.extras.regex}} />
|
<SiteTextSummary
|
||||||
|
@siteText={{siteText}}
|
||||||
|
@editAction={{action "edit"}}
|
||||||
|
@term={{this.q}}
|
||||||
|
@searchRegex={{this.siteTexts.extras.regex}}
|
||||||
|
/>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
{{#if this.siteTexts.extras.has_more}}
|
{{#if this.siteTexts.extras.has_more}}
|
||||||
|
|||||||
@@ -5522,7 +5522,6 @@ en:
|
|||||||
recommended: "We recommend customizing the following text to suit your needs:"
|
recommended: "We recommend customizing the following text to suit your needs:"
|
||||||
show_overriden: "Only show overridden"
|
show_overriden: "Only show overridden"
|
||||||
locale: "Language:"
|
locale: "Language:"
|
||||||
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."
|
more_than_50_results: "There are more than 50 results. Please refine your search."
|
||||||
|
|
||||||
settings: # used by theme and site settings
|
settings: # used by theme and site settings
|
||||||
|
|||||||
Reference in New Issue
Block a user