Use non-pipe translation link (#740)
parent
a911250ea8
commit
deebe18aaa
|
@ -99,7 +99,11 @@ export const PostThreadItem = observer(function PostThreadItem({
|
||||||
|
|
||||||
const onOpenTranslate = React.useCallback(() => {
|
const onOpenTranslate = React.useCallback(() => {
|
||||||
Linking.openURL(
|
Linking.openURL(
|
||||||
encodeURI(`https://translate.google.com/#auto|en|${record?.text || ''}`),
|
encodeURI(
|
||||||
|
`https://translate.google.com/?sl=auto&tl=en&text=${
|
||||||
|
record?.text || ''
|
||||||
|
}`,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}, [record])
|
}, [record])
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,9 @@ const PostLoaded = observer(
|
||||||
const onOpenTranslate = React.useCallback(() => {
|
const onOpenTranslate = React.useCallback(() => {
|
||||||
Linking.openURL(
|
Linking.openURL(
|
||||||
encodeURI(
|
encodeURI(
|
||||||
`https://translate.google.com/#auto|en|${record?.text || ''}`,
|
`https://translate.google.com/?sl=auto&tl=en&text=${
|
||||||
|
record?.text || ''
|
||||||
|
}`,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}, [record])
|
}, [record])
|
||||||
|
|
|
@ -99,7 +99,11 @@ export const FeedItem = observer(function ({
|
||||||
|
|
||||||
const onOpenTranslate = React.useCallback(() => {
|
const onOpenTranslate = React.useCallback(() => {
|
||||||
Linking.openURL(
|
Linking.openURL(
|
||||||
encodeURI(`https://translate.google.com/#auto|en|${record?.text || ''}`),
|
encodeURI(
|
||||||
|
`https://translate.google.com/?sl=auto&tl=en&text=${
|
||||||
|
record?.text || ''
|
||||||
|
}`,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}, [record])
|
}, [record])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue