Translate some missing strings via global i18n instance (#5740)

This commit is contained in:
Samuel Newman
2024-10-14 18:19:30 +03:00
committed by GitHub
parent db7b875c52
commit a445489b53
3 changed files with 13 additions and 9 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
import {Share} from 'react-native'
// import * as Sharing from 'expo-sharing'
import {setStringAsync} from 'expo-clipboard'
// TODO: replace global i18n instance with one returned from useLingui -sfn
import {t} from '@lingui/macro'
import {isAndroid, isIOS} from 'platform/detection'
import {isAndroid, isIOS} from '#/platform/detection'
import * as Toast from '#/view/com/util/Toast'
/**
@@ -20,6 +22,6 @@ export async function shareUrl(url: string) {
// React Native Share is not supported by web. Web Share API
// has increasing but not full support, so default to clipboard
setStringAsync(url)
Toast.show('Copied to clipboard', 'clipboard-check')
Toast.show(t`Copied to clipboard`, 'clipboard-check')
}
}