Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius committed May 30, 2024
1 parent 72048ce commit f07d173
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ export function NativeTranslationView() {
return <NativeView />
}

const twoDigitVersion = String(Platform.Version)
.split('.')
.slice(0, 2)
.join('.')
// 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(twoDigitVersion) >= 17.4
export const isAvailable = Number(version) >= 17.4

// https://en.wikipedia.org/wiki/Translate_(Apple)#Languages
const SUPPORTED_LANGUAGES = [
Expand Down

0 comments on commit f07d173

Please sign in to comment.