]> Untitled Git - lemmy-ui.git/commitdiff
chore: switched to enabling language warning by prop rather than disabling
authorSean Spade <skspade@pm.me>
Fri, 9 Jun 2023 03:29:24 +0000 (23:29 -0400)
committerSean Spade <skspade@pm.me>
Fri, 9 Jun 2023 03:36:35 +0000 (23:36 -0400)
src/shared/components/common/language-select.tsx
src/shared/components/community/community-form.tsx
src/shared/components/person/settings.tsx

index a82d6517f818eec5474bdb8408d24ea4a2ce5570..fac3216f8dd5f267f773df1e664beb0bb01d776d 100644 (file)
@@ -16,7 +16,7 @@ interface LanguageSelectProps {
   showSite?: boolean;
   iconVersion?: boolean;
   disabled?: boolean;
-  hideLanguageWarning?: boolean;
+  showLanguageWarning?: boolean;
 }
 
 export class LanguageSelect extends Component<LanguageSelectProps, any> {
@@ -50,7 +50,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
       this.selectBtn
     ) : (
       <div>
-        {this.props.multiple && !this.props.hideLanguageWarning && (
+        {this.props.multiple && this.props.showLanguageWarning && (
           <div className="alert alert-warning" role="alert">
             {i18n.t("undetermined_language_warning")}
           </div>
index 25fd82f3fe0adb485178877db484e82b706f2dbe..372e66a641b947f83bc9b7d0213fba00d6050640 100644 (file)
@@ -265,7 +265,6 @@ export class CommunityForm extends Component<
             showSite
             selectedLanguageIds={this.state.form.discussion_languages}
             multiple={true}
-            hideLanguageWarning={true}
             onChange={this.handleDiscussionLanguageChange}
           />
           <div className="form-group row">
index a40b90491b5f3a10bd5382d62f0e1fe5ad89377a..40878f37fddc4fa93b3d751bc57e5458306247a9 100644 (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}
           />