From: Sean Spade Date: Fri, 9 Jun 2023 03:29:24 +0000 (-0400) Subject: chore: switched to enabling language warning by prop rather than disabling X-Git-Url: http://these/git/%7Blink%7D?a=commitdiff_plain;h=23c4b685ed62520629697787ae4877bf7fa8dfc5;p=lemmy-ui.git chore: switched to enabling language warning by prop rather than disabling --- 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} />