diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-06-10 11:37:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 20:37:14 +0200 |
commit | 59f49bef68500c1719ed44470121f553208edc85 (patch) | |
tree | 811063867718d9393fd66b90e13965ae6f9146fd /src/platform | |
parent | 620ab887132855d447f0a328bf58989c8f3f3328 (diff) | |
download | voidsky-59f49bef68500c1719ed44470121f553208edc85.tar.zst |
Override legacy language codes for indonesian, hebrew, and yiddish (#4461)
* Manually override incorrect 'in' to 'id' lang code * Fix additional legacy language code issues
Diffstat (limited to 'src/platform')
-rw-r--r-- | src/platform/detection.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/detection.ts b/src/platform/detection.ts index fffde1be2..0c0360a82 100644 --- a/src/platform/detection.ts +++ b/src/platform/detection.ts @@ -2,6 +2,7 @@ import {Platform} from 'react-native' import {isReducedMotion} from 'react-native-reanimated' import {getLocales} from 'expo-localization' +import {fixLegacyLanguageCode} from '#/locale/helpers' import {dedupArray} from 'lib/functions' export const isIOS = Platform.OS === 'ios' @@ -17,7 +18,7 @@ export const isMobileWeb = export const deviceLocales = dedupArray( getLocales?.() - .map?.(locale => locale.languageCode) + .map?.(locale => fixLegacyLanguageCode(locale.languageCode)) .filter(code => typeof code === 'string'), ) as string[] |