Fix native translations on iOS 17.5.1 (#4282)

* enable translations on iOS 17.5.1

* add comment
zio/stable
Samuel Newman 2024-05-30 14:35:38 +03:00 committed by GitHub
parent a72f55a11f
commit 13c08f56ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,10 @@ export function NativeTranslationView() {
return <NativeView />
}
export const isAvailable = Number(Platform.Version) >= 17.4
// can be something like "17.5.1", so just take the first two parts
const version = String(Platform.Version).split('.').slice(0, 2).join('.')
export const isAvailable = Number(version) >= 17.4
// https://en.wikipedia.org/wiki/Translate_(Apple)#Languages
const SUPPORTED_LANGUAGES = [