diff options
author | Stanislas Signoud <signez@stanisoft.net> | 2024-12-31 22:27:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-31 13:27:14 -0800 |
commit | 9f075b13405c7711edbd9309ab521738b74a50c5 (patch) | |
tree | 33acdca882ef027bc670bb38de3a9d054f6ce721 /src/view/com/modals/lang-settings/PostLanguagesSettings.tsx | |
parent | 09297d92cb73fcf3b7eda7d683543661d3f30501 (diff) | |
download | voidsky-9f075b13405c7711edbd9309ab521738b74a50c5.tar.zst |
Localize lang selectors according to the app language (#6207)
* Localize lang selectors according to the app language * Explicitly ignore RangeError when translating locale names
Diffstat (limited to 'src/view/com/modals/lang-settings/PostLanguagesSettings.tsx')
-rw-r--r-- | src/view/com/modals/lang-settings/PostLanguagesSettings.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/com/modals/lang-settings/PostLanguagesSettings.tsx b/src/view/com/modals/lang-settings/PostLanguagesSettings.tsx index 2b0eb8cf2..8c2969674 100644 --- a/src/view/com/modals/lang-settings/PostLanguagesSettings.tsx +++ b/src/view/com/modals/lang-settings/PostLanguagesSettings.tsx @@ -5,6 +5,7 @@ import {Trans} from '@lingui/macro' import {usePalette} from '#/lib/hooks/usePalette' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {deviceLanguageCodes} from '#/locale/deviceLocales' +import {languageName} from '#/locale/helpers' import {useModalControls} from '#/state/modals' import { hasPostLanguage, @@ -91,7 +92,7 @@ export function Component() { return ( <ToggleButton key={lang.code2} - label={lang.name} + label={languageName(lang, langPrefs.appLanguage)} isSelected={isSelected} onPress={() => (isDisabled ? undefined : onPress(lang.code2))} style={[ |