Skip to content

Commit

Permalink
Merge pull request #1125 from skspade/1078-language-select-disable-wa…
Browse files Browse the repository at this point in the history
…rning

fix: Adds ability to hide language warning
  • Loading branch information
SleeplessOne1917 authored Jun 10, 2023
2 parents ca74081 + cd6a2f4 commit 6227b63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/components/common/language-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface LanguageSelectProps {
showSite?: boolean;
iconVersion?: boolean;
disabled?: boolean;
showLanguageWarning?: boolean;
}

export class LanguageSelect extends Component<LanguageSelectProps, any> {
Expand Down Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/shared/components/person/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
Expand Down

0 comments on commit 6227b63

Please sign in to comment.