chore: switched to enabling language warning by prop rather than disabling

This commit is contained in:
Sean Spade 2023-06-08 23:29:24 -04:00
parent 9d45b4afe3
commit 23c4b685ed
3 changed files with 3 additions and 3 deletions

View file

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

View file

@ -265,7 +265,6 @@ export class CommunityForm extends Component<
showSite showSite
selectedLanguageIds={this.state.form.discussion_languages} selectedLanguageIds={this.state.form.discussion_languages}
multiple={true} multiple={true}
hideLanguageWarning={true}
onChange={this.handleDiscussionLanguageChange} onChange={this.handleDiscussionLanguageChange}
/> />
<div className="form-group row"> <div className="form-group row">

View file

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