From 13c08f56ba372c5c7f631c9771a215b82979eb20 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 30 May 2024 14:35:38 +0300 Subject: [PATCH] Fix native translations on iOS 17.5.1 (#4282) * enable translations on iOS 17.5.1 * add comment --- .../src/ExpoBlueskyTranslateView.ios.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx b/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx index daddfa02..290fabd3 100644 --- a/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx +++ b/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx @@ -15,7 +15,10 @@ export function NativeTranslationView() { return } -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 = [