diff --git a/src/components/views/settings/SpellCheckSettings.tsx b/src/components/views/settings/SpellCheckSettings.tsx index a7c9cd9e2d..58737773ea 100644 --- a/src/components/views/settings/SpellCheckSettings.tsx +++ b/src/components/views/settings/SpellCheckSettings.tsx @@ -18,10 +18,14 @@ import React from "react"; import SpellCheckLanguagesDropdown from "../../../components/views/elements/SpellCheckLanguagesDropdown"; import AccessibleButton, { ButtonEvent } from "../../../components/views/elements/AccessibleButton"; -import { _t } from "../../../languageHandler"; +import { _t, getUserLanguage } from "../../../languageHandler"; interface ExistingSpellCheckLanguageIProps { language: string; + /** + * The label to render on the component. If not provided, the language code will be used. + */ + label?: string; onRemoved(language: string): void; } @@ -45,7 +49,9 @@ export class ExistingSpellCheckLanguage extends React.Component - {this.props.language} + + {this.props.label ?? this.props.language} + {_t("action|remove")} @@ -87,8 +93,9 @@ export default class SpellCheckLanguages extends React.Component { - return ; + return ; }); const addButton = (