Merge pull request #1125 from skspade/1078-language-select-disable-warning

fix: Adds ability to hide language warning
This commit is contained in:
SleeplessOne1917 2023-06-10 01:00:34 +00:00 committed by GitHub
commit 6227b63ad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -16,6 +16,7 @@ interface LanguageSelectProps {
showSite?: boolean;
iconVersion?: boolean;
disabled?: boolean;
showLanguageWarning?: boolean;
}
export class LanguageSelect extends Component<LanguageSelectProps, any> {
@ -49,7 +50,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
this.selectBtn
) : (
<div>
{this.props.multiple && (
{this.props.multiple && this.props.showLanguageWarning && (
<div className="alert alert-warning" role="alert">
{i18n.t("undetermined_language_warning")}
</div>

View file

@ -604,6 +604,7 @@ export class Settings extends Component<any, SettingsState> {
siteLanguages={this.state.siteRes.discussion_languages}
selectedLanguageIds={selectedLangs}
multiple={true}
showLanguageWarning={true}
showSite
onChange={this.handleDiscussionLanguageChange}
/>