From 23c4b685ed62520629697787ae4877bf7fa8dfc5 Mon Sep 17 00:00:00 2001 From: Sean Spade Date: Thu, 8 Jun 2023 23:29:24 -0400 Subject: [PATCH] chore: switched to enabling language warning by prop rather than disabling --- src/shared/components/common/language-select.tsx | 4 ++-- src/shared/components/community/community-form.tsx | 1 - src/shared/components/person/settings.tsx | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/components/common/language-select.tsx b/src/shared/components/common/language-select.tsx index a82d651..fac3216 100644 --- a/src/shared/components/common/language-select.tsx +++ b/src/shared/components/common/language-select.tsx @@ -16,7 +16,7 @@ interface LanguageSelectProps { showSite?: boolean; iconVersion?: boolean; disabled?: boolean; - hideLanguageWarning?: boolean; + showLanguageWarning?: boolean; } export class LanguageSelect extends Component { @@ -50,7 +50,7 @@ export class LanguageSelect extends Component { this.selectBtn ) : (
- {this.props.multiple && !this.props.hideLanguageWarning && ( + {this.props.multiple && this.props.showLanguageWarning && (
{i18n.t("undetermined_language_warning")}
diff --git a/src/shared/components/community/community-form.tsx b/src/shared/components/community/community-form.tsx index 25fd82f..372e66a 100644 --- a/src/shared/components/community/community-form.tsx +++ b/src/shared/components/community/community-form.tsx @@ -265,7 +265,6 @@ export class CommunityForm extends Component< showSite selectedLanguageIds={this.state.form.discussion_languages} multiple={true} - hideLanguageWarning={true} onChange={this.handleDiscussionLanguageChange} />
diff --git a/src/shared/components/person/settings.tsx b/src/shared/components/person/settings.tsx index a40b904..40878f3 100644 --- a/src/shared/components/person/settings.tsx +++ b/src/shared/components/person/settings.tsx @@ -604,6 +604,7 @@ export class Settings extends Component { siteLanguages={this.state.siteRes.discussion_languages} selectedLanguageIds={selectedLangs} multiple={true} + showLanguageWarning={true} showSite onChange={this.handleDiscussionLanguageChange} /> -- 2.44.1