Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename translation properties for clarity (#10061)

authored by

Eric Bailey and committed by
GitHub
45df50ec b9a3256e

+250 -173
+70 -11
src/analytics/metrics/types.ts
··· 708 708 709 709 translate: { 710 710 os: Platform['OS'] 711 - sourceLanguages: string[] 712 - targetLanguage: string 711 + /** 712 + * The languages the content might be in, such as the user-supplied 713 + * language codes on posts. Currently only available on posts. 714 + */ 715 + possibleSourceLanguages: string[] | undefined 716 + /** 717 + * This is the user's configured primary language, which is always defined. 718 + */ 719 + expectedTargetLanguage: string 720 + /** 721 + * The length of the text being translated. We assume shorter texts are 722 + * more likely to have inaccurate translations. 723 + */ 713 724 textLength: number 725 + googleTranslate: boolean 714 726 } 715 727 'translate:result': { 716 - method: 'on-device' | 'fallback-alert' 728 + success: boolean 717 729 os: Platform['OS'] 718 - sourceSelection: 'automatic' | 'manual' 719 - sourceLanguage: string | null 720 - targetLanguage: string 721 - 722 - /* Only relevant to posts */ 723 - postLanguages?: string[] 730 + /** 731 + * The languages the content might be in, such as the user-supplied 732 + * language codes on posts. Currently only available on posts. 733 + */ 734 + possibleSourceLanguages: string[] | undefined 735 + /** 736 + * The language we expected the content to be in. This could be based on 737 + * user selection or on our confidence in the detected language. This is 738 + * nullable because we may not always have an expected source language. 739 + */ 740 + expectedSourceLanguage: string | null 741 + /** 742 + * This is the user's configured primary language, which is always defined. 743 + */ 744 + expectedTargetLanguage: string 745 + /** 746 + * The language the translation result was actually in. This is nullable 747 + * because the translation could have failed, in which case we won't have a 748 + * result source language. 749 + */ 750 + resultSourceLanguage: string | null 751 + /** 752 + * The language the translation result was translated into. This should be 753 + * the same as `expectedTargetLanguage`, but we include it for completeness 754 + * and in case there are any edge cases where they differ. This is nullable 755 + * because if the translation failed, we won't have a result target 756 + * language. 757 + */ 758 + resultTargetLanguage: string | null 759 + /** 760 + * The length of the text being translated. We assume shorter texts are 761 + * more likely to have inaccurate translations. 762 + */ 763 + textLength: number 724 764 } 725 765 'translate:override': { 726 766 os: Platform['OS'] 727 - sourceLanguage: string 728 - targetLanguage: string 767 + /** 768 + * The languages the content might be in, such as the user-supplied 769 + * language codes on posts. Currently only available on posts. 770 + */ 771 + possibleSourceLanguages: string[] | undefined 772 + /** 773 + * The language the user has indicated the content is actually in, which 774 + * may be different from the expected source language if the user is 775 + * overriding the auto-detected language. This is the language the user 776 + * wants to translate from after overriding. 777 + */ 778 + expectedSourceLanguage: string 779 + /** 780 + * This is the user's configured primary language, which is always defined. 781 + */ 782 + expectedTargetLanguage: string 783 + /** 784 + * The language the translation result was actually in, which the user now 785 + * wishes to override. 786 + */ 787 + resultSourceLanguage: string 729 788 } 730 789 731 790 'postMenu:openMuteWordsDialog': {
+64 -59
src/components/Post/Translated/index.tsx
··· 1 1 import {useCallback, useMemo} from 'react' 2 2 import {Platform, type StyleProp, type TextStyle, View} from 'react-native' 3 - import {type AppBskyFeedDefs} from '@atproto/api' 3 + import {type AppBskyFeedDefs, AppBskyFeedPost} from '@atproto/api' 4 4 import {Trans, useLingui} from '@lingui/react/macro' 5 5 6 6 import {HITSLOP_30} from '#/lib/constants' 7 - import {useGoogleTranslate} from '#/lib/hooks/useGoogleTranslate' 8 7 import {useTranslate} from '#/lib/translation' 9 - import {type TranslationFunction} from '#/lib/translation' 8 + import { 9 + type TranslationFunction, 10 + type TranslationFunctionParams, 11 + } from '#/lib/translation' 10 12 import { 11 13 codeToLanguageName, 12 14 getPostLanguageTags, ··· 26 28 import {Text} from '#/components/Typography' 27 29 import {useAnalytics} from '#/analytics' 28 30 import {IS_WEB} from '#/env' 31 + import * as bsky from '#/types/bsky' 29 32 30 33 const X_ICON_OFFSET = 16 31 34 32 35 export function TranslatedPost({ 33 36 hideTranslateLink = false, 34 37 post, 35 - postText, 36 38 postTextStyle = a.text_md, 37 39 }: { 38 40 hideTranslateLink?: boolean 39 41 post: AppBskyFeedDefs.PostView 40 - postText: string 41 42 postTextStyle?: StyleProp<TextStyle> 42 43 }) { 43 44 const langPrefs = useLanguagePrefs() 44 45 const {clearTranslation, translate, translationState} = useTranslate({ 45 46 key: post.uri, 46 - postLangCodes: getPostLanguageTags(post), 47 47 }) 48 48 49 + const record = useMemo<AppBskyFeedPost.Record | undefined>(() => { 50 + return bsky.dangerousIsType<AppBskyFeedPost.Record>( 51 + post.record, 52 + AppBskyFeedPost.isRecord, 53 + ) 54 + ? post.record 55 + : undefined 56 + }, [post]) 57 + const initialTranslationParams = useMemo<TranslationFunctionParams>(() => { 58 + return { 59 + text: record?.text || '', 60 + expectedTargetLanguage: langPrefs.primaryLanguage, 61 + possibleSourceLanguages: getPostLanguageTags(post), 62 + } 63 + }, [post, record, langPrefs]) 49 64 const needsTranslation = useMemo(() => { 50 65 if (hideTranslateLink) return false 51 66 return !isPostInLanguage(post, [langPrefs.primaryLanguage]) ··· 57 72 case 'success': 58 73 return ( 59 74 <TranslationResult 60 - clearTranslation={clearTranslation} 61 75 translate={translate} 62 - postText={postText} 76 + clearTranslation={clearTranslation} 77 + initialTranslationParams={initialTranslationParams} 63 78 postTextStyle={postTextStyle} 64 - sourceLanguage={ 79 + resultSourceLanguage={ 65 80 translationState.sourceLanguage ?? null // Fallback primarily for iOS 66 81 } 67 82 translatedText={translationState.translatedText} ··· 70 85 case 'error': 71 86 return ( 72 87 <TranslationError 88 + translate={translate} 73 89 clearTranslation={clearTranslation} 74 90 message={translationState.message} 75 - postText={postText} 76 - primaryLanguage={langPrefs.primaryLanguage} 91 + initialTranslationParams={initialTranslationParams} 77 92 /> 78 93 ) 79 94 default: 80 95 return ( 81 96 needsTranslation && ( 82 97 <TranslationLink 83 - postText={postText} 84 - primaryLanguage={langPrefs.primaryLanguage} 85 98 translate={translate} 99 + initialTranslationParams={initialTranslationParams} 86 100 /> 87 101 ) 88 102 ) ··· 105 119 } 106 120 107 121 function TranslationLink({ 108 - postText, 109 - primaryLanguage, 110 122 translate, 123 + initialTranslationParams, 111 124 }: { 112 - postText: string 113 - primaryLanguage: string 114 125 translate: TranslationFunction 126 + initialTranslationParams: TranslationFunctionParams 115 127 }) { 116 128 const t = useTheme() 117 129 const {t: l} = useLingui() 118 - const ax = useAnalytics() 119 130 120 131 const handleTranslate = useCallback(() => { 121 - void translate({ 122 - text: postText, 123 - targetLangCode: primaryLanguage, 124 - }) 125 - 126 - ax.metric('translate', { 127 - os: Platform.OS, 128 - sourceLanguages: [], // todo: get from post maybe? 129 - targetLanguage: primaryLanguage, 130 - textLength: postText.length, 131 - }) 132 - }, [ax, postText, primaryLanguage, translate]) 132 + void translate(initialTranslationParams) 133 + }, [initialTranslationParams, translate]) 133 134 134 135 return ( 135 136 <View ··· 161 162 } 162 163 163 164 function TranslationError({ 165 + translate, 164 166 clearTranslation, 165 167 message, 166 - postText, 167 - primaryLanguage, 168 + initialTranslationParams, 168 169 }: { 170 + translate: TranslationFunction 169 171 clearTranslation: () => void 170 172 message: string 171 - postText: string 172 - primaryLanguage: string 173 + initialTranslationParams: TranslationFunctionParams 173 174 }) { 174 175 const t = useTheme() 175 176 const {t: l} = useLingui() 176 - const translate = useGoogleTranslate() 177 177 178 178 const handleFallback = () => { 179 - void translate(postText, primaryLanguage) 179 + void translate({ 180 + ...initialTranslationParams, 181 + forceGoogleTranslate: true, 182 + }) 180 183 } 181 184 182 185 return ( ··· 247 250 function TranslationResult({ 248 251 clearTranslation, 249 252 translate, 250 - postText, 251 253 postTextStyle, 252 - sourceLanguage, 254 + resultSourceLanguage, 253 255 translatedText, 256 + initialTranslationParams, 254 257 }: { 255 258 clearTranslation: () => void 256 259 translate: TranslationFunction 257 - postText: string 258 260 postTextStyle?: StyleProp<TextStyle> 259 - sourceLanguage: string | null 261 + resultSourceLanguage: string | null 260 262 translatedText: string 263 + initialTranslationParams: TranslationFunctionParams 261 264 }) { 262 265 const t = useTheme() 263 266 const langPrefs = useLanguagePrefs() 264 267 const {i18n, t: l} = useLingui() 265 268 266 - const langName = sourceLanguage 267 - ? codeToLanguageName(sourceLanguage, i18n.locale) 269 + const langName = resultSourceLanguage 270 + ? codeToLanguageName(resultSourceLanguage, i18n.locale) 268 271 : undefined 269 272 270 273 const flattenedStyle = flatten(postTextStyle) ?? {} ··· 323 326 <Trans>Translated</Trans> 324 327 </Text> 325 328 )} 326 - {sourceLanguage != null && ( 329 + {resultSourceLanguage != null && ( 327 330 <> 328 331 <Text 329 332 style={[ ··· 336 339 &middot;{' '} 337 340 </Text> 338 341 <TranslationLanguageSelect 339 - sourceLanguage={sourceLanguage} 342 + resultSourceLanguage={resultSourceLanguage} 340 343 translate={translate} 341 - postText={postText} 344 + initialTranslationParams={initialTranslationParams} 342 345 /> 343 346 </> 344 347 )} ··· 362 365 363 366 function TranslationLanguageSelect({ 364 367 translate, 365 - postText, 366 - sourceLanguage, 368 + resultSourceLanguage, 369 + initialTranslationParams, 367 370 }: { 368 371 translate: TranslationFunction 369 - postText: string 370 - sourceLanguage: string 372 + resultSourceLanguage: string 373 + initialTranslationParams: TranslationFunctionParams 371 374 }) { 372 375 const t = useTheme() 373 376 const ax = useAnalytics() ··· 383 386 ) 384 387 .sort((a, b) => { 385 388 // Prioritize sourceLanguage at the top 386 - if (a.code2 === sourceLanguage) return -1 387 - if (b.code2 === sourceLanguage) return 1 389 + if (a.code2 === resultSourceLanguage) return -1 390 + if (b.code2 === resultSourceLanguage) return 1 388 391 // Localized sort 389 392 return languageName(a, langPrefs.appLanguage).localeCompare( 390 393 languageName(b, langPrefs.appLanguage), ··· 395 398 label: languageName(l, langPrefs.appLanguage), // The viewer may not be familiar with the source language, so localize the name 396 399 value: l.code2, 397 400 })), 398 - [langPrefs, sourceLanguage], 401 + [langPrefs, resultSourceLanguage], 399 402 ) 400 403 401 404 const handleChangeTranslationLanguage = (sourceLangCode: string) => { 402 405 ax.metric('translate:override', { 403 406 os: Platform.OS, 404 - sourceLanguage: sourceLangCode, 405 - targetLanguage: langPrefs.primaryLanguage, 407 + possibleSourceLanguages: initialTranslationParams.possibleSourceLanguages, 408 + expectedSourceLanguage: sourceLangCode, 409 + expectedTargetLanguage: initialTranslationParams.expectedTargetLanguage, 410 + resultSourceLanguage, 406 411 }) 407 412 void translate({ 408 - text: postText, 409 - targetLangCode: langPrefs.primaryLanguage, 410 - sourceLangCode, 411 - sourceSelection: 'manual', 413 + text: initialTranslationParams.text, 414 + expectedTargetLanguage: initialTranslationParams.expectedTargetLanguage, 415 + expectedSourceLanguage: sourceLangCode, 416 + possibleSourceLanguages: initialTranslationParams.possibleSourceLanguages, 412 417 }) 413 418 } 414 419 415 420 return ( 416 421 <Select.Root 417 - value={sourceLanguage} 422 + value={resultSourceLanguage} 418 423 onValueChange={handleChangeTranslationLanguage}> 419 424 <Select.Trigger label={l`Change the source language`}> 420 425 {({props}) => {
+3 -18
src/components/PostControls/PostMenu/PostMenuItems.tsx
··· 8 8 import * as Clipboard from 'expo-clipboard' 9 9 import { 10 10 type AppBskyFeedDefs, 11 - AppBskyFeedPost, 11 + type AppBskyFeedPost, 12 12 type AppBskyFeedThreadgate, 13 13 AtUri, 14 14 type RichText as RichTextAPI, ··· 96 96 import * as Toast from '#/components/Toast' 97 97 import {useAnalytics} from '#/analytics' 98 98 import {IS_INTERNAL} from '#/env' 99 - import * as bsky from '#/types/bsky' 100 99 101 100 let PostMenuItems = ({ 102 101 post, ··· 138 137 const openLink = useOpenLink() 139 138 const {clearTranslation, translate, translationState} = useTranslate({ 140 139 key: post.uri, 141 - postLangCodes: getPostLanguageTags(post), 142 140 forceGoogleTranslate, 143 141 }) 144 142 const navigation = useNavigation<NavigationProp>() ··· 279 277 const onPressTranslate = () => { 280 278 void translate({ 281 279 text: record.text, 282 - targetLangCode: langPrefs.primaryLanguage, 280 + expectedTargetLanguage: langPrefs.primaryLanguage, 281 + possibleSourceLanguages: getPostLanguageTags(post), 283 282 }) 284 - 285 - if ( 286 - bsky.dangerousIsType<AppBskyFeedPost.Record>( 287 - post.record, 288 - AppBskyFeedPost.isRecord, 289 - ) 290 - ) { 291 - ax.metric('translate', { 292 - os: Platform.OS, 293 - sourceLanguages: post.record.langs ?? [], 294 - targetLanguage: langPrefs.primaryLanguage, 295 - textLength: post.record.text.length, 296 - }) 297 - } 298 283 } 299 284 300 285 const onHidePost = () => {
+3 -2
src/components/dms/MessageContextMenu.tsx
··· 68 68 69 69 ax.metric('translate', { 70 70 os: Platform.OS, 71 - sourceLanguages: [], 72 - targetLanguage: langPrefs.primaryLanguage, 71 + possibleSourceLanguages: [], // N/A for chats 72 + expectedTargetLanguage: langPrefs.primaryLanguage, 73 73 textLength: message.text.length, 74 + googleTranslate: true, 74 75 }) 75 76 }, [ax, langPrefs.primaryLanguage, message.text, translate]) 76 77
+55 -32
src/lib/translation/index.tsx
··· 103 103 export function useTranslate({ 104 104 key, 105 105 forceGoogleTranslate = false, 106 - postLangCodes, 107 106 }: TranslationOptions) { 108 107 const context = useContext(Context) 109 108 if (!context) { ··· 121 120 122 121 const translate = useCallback( 123 122 async (params: TranslationFunctionParams) => { 124 - return context.translate({ 125 - ...params, 126 - key, 127 - forceGoogleTranslate, 128 - postLangCodes, 129 - }) 123 + return context.translate( 124 + { 125 + ...params, 126 + }, 127 + { 128 + key, 129 + forceGoogleTranslate, 130 + }, 131 + ) 130 132 }, 131 - [context, forceGoogleTranslate, key, postLangCodes], 133 + [context, forceGoogleTranslate, key], 132 134 ) 133 135 134 136 const clearTranslation = useCallback( ··· 208 210 }, []) 209 211 210 212 const translate = useCallback<ContextType['translate']>( 211 - async ({ 212 - key, 213 - text, 214 - targetLangCode, 215 - sourceLangCode, 216 - sourceSelection = 'automatic', 217 - postLangCodes, 218 - ...options 219 - }) => { 220 - if (options?.forceGoogleTranslate || !HAS_ON_DEVICE_TRANSLATION) { 221 - await googleTranslate(text, targetLangCode, sourceLangCode) 213 + async ( 214 + { 215 + text, 216 + expectedTargetLanguage, 217 + expectedSourceLanguage, 218 + possibleSourceLanguages, 219 + forceGoogleTranslate: forceGoogleTranslateOverride, 220 + }, 221 + {key, forceGoogleTranslate}, 222 + ) => { 223 + const shouldForceGoogleTranslate = Boolean( 224 + forceGoogleTranslateOverride ?? forceGoogleTranslate, 225 + ) 226 + 227 + ax.metric('translate', { 228 + os: Platform.OS, 229 + possibleSourceLanguages, 230 + expectedTargetLanguage: expectedTargetLanguage, 231 + textLength: text.length, 232 + googleTranslate: shouldForceGoogleTranslate, 233 + }) 234 + 235 + if (shouldForceGoogleTranslate || !HAS_ON_DEVICE_TRANSLATION) { 236 + await googleTranslate( 237 + text, 238 + expectedTargetLanguage, 239 + expectedSourceLanguage, 240 + ) 222 241 return 223 242 } 224 243 ··· 232 251 try { 233 252 const result = await attemptTranslation( 234 253 text, 235 - targetLangCode, 236 - sourceLangCode, 254 + expectedTargetLanguage, 255 + expectedSourceLanguage, 237 256 ) 238 257 ax.metric('translate:result', { 239 - method: 'on-device', 258 + success: true, 240 259 os: Platform.OS, 241 - sourceSelection, 242 - sourceLanguage: result.sourceLanguage, 243 - targetLanguage: result.targetLanguage, 244 - postLanguages: postLangCodes, 260 + possibleSourceLanguages, 261 + expectedSourceLanguage: expectedSourceLanguage ?? null, 262 + expectedTargetLanguage, 263 + resultSourceLanguage: result.sourceLanguage, 264 + resultTargetLanguage: result.targetLanguage, 265 + textLength: text.length, 245 266 }) 246 267 if (!IS_ANDROID) { 247 268 LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut) ··· 253 274 translatedText: result.translatedText, 254 275 sourceLanguage: result.sourceLanguage, 255 276 targetLanguage: result.targetLanguage, 256 - postLanguages: postLangCodes, 277 + postLanguages: possibleSourceLanguages, 257 278 }, 258 279 })) 259 280 } catch (e) { ··· 261 282 // On-device translation failed (language pack missing or user 262 283 // dismissed the download prompt). 263 284 ax.metric('translate:result', { 264 - method: 'fallback-alert', 285 + success: false, 265 286 os: Platform.OS, 266 - sourceSelection, 267 - sourceLanguage: sourceLangCode ?? null, 268 - targetLanguage: targetLangCode, 269 - postLanguages: postLangCodes, 287 + possibleSourceLanguages, 288 + expectedSourceLanguage: expectedSourceLanguage ?? null, 289 + expectedTargetLanguage, 290 + resultSourceLanguage: null, 291 + resultTargetLanguage: null, 292 + textLength: text.length, 270 293 }) 271 294 let errorMessage = l`Device failed to translate :(` 272 295 if (!IS_ANDROID) {
+29 -10
src/lib/translation/index.web.tsx
··· 22 22 /** 23 23 * Web always opens Google Translate. 24 24 */ 25 - export function useTranslate({key, postLangCodes}: TranslationOptions) { 25 + export function useTranslate({key}: TranslationOptions) { 26 26 const context = useContext(Context) 27 27 if (!context) { 28 28 throw new Error( ··· 33 33 // Always call hooks in consistent order 34 34 const translate = useCallback( 35 35 async (params: TranslationFunctionParams) => { 36 - return context.translate({ 37 - ...params, 38 - key, 39 - forceGoogleTranslate: true, 40 - postLangCodes, 41 - }) 36 + return context.translate( 37 + { 38 + ...params, 39 + }, 40 + { 41 + key, 42 + forceGoogleTranslate: true, 43 + }, 44 + ) 42 45 }, 43 - [key, context, postLangCodes], 46 + [key, context], 44 47 ) 45 48 46 49 const clearTranslation = useCallback(() => { ··· 61 64 const googleTranslate = useGoogleTranslate() 62 65 63 66 const translate = useCallback<ContextType['translate']>( 64 - async ({text, targetLangCode, sourceLangCode}) => { 65 - await googleTranslate(text, targetLangCode, sourceLangCode) 67 + async ({ 68 + text, 69 + expectedTargetLanguage, 70 + expectedSourceLanguage, 71 + possibleSourceLanguages, 72 + }) => { 73 + ax.metric('translate', { 74 + os: 'web', 75 + possibleSourceLanguages, 76 + expectedTargetLanguage, 77 + textLength: text.length, 78 + googleTranslate: true, 79 + }) 80 + await googleTranslate( 81 + text, 82 + expectedTargetLanguage, 83 + expectedSourceLanguage, 84 + ) 66 85 }, 67 86 [ax, googleTranslate], 68 87 )
+21 -14
src/lib/translation/types.ts
··· 22 22 /** 23 23 * The language to translate the text into. 24 24 */ 25 - targetLangCode: string 25 + expectedTargetLanguage: string 26 26 /** 27 - * The source language of the text. Will auto-detect if not provided. 27 + * We auto-detect the source language by default, but the user has the option 28 + * to specify a source language if they want to. If this value is present, it 29 + * means the user selected a source language, or we were certain of the 30 + * source language and want to specify it explicitly. 28 31 */ 29 - sourceLangCode?: string 32 + expectedSourceLanguage?: string 30 33 /** 31 - * Whether we auto-detected the language or it was selected manually. Defaults to 'automatic'. 34 + * The languages the content might be in, such as the user-supplied 35 + * language codes on posts. Currently only available on posts. 36 + */ 37 + possibleSourceLanguages?: string[] 38 + /** 39 + * Override the default behavior and always use Google Translate. 32 40 */ 33 - sourceSelection?: 'automatic' | 'manual' 41 + forceGoogleTranslate?: boolean 34 42 } 35 43 36 44 export type TranslationOptions = { 45 + /** 46 + * A unique key to identify this translation instance e.g. the post URI 47 + */ 37 48 key: string 38 - forceGoogleTranslate?: boolean 39 49 /** 40 - * The language(s) of the post being translated. Used for analytics purposes 41 - * to understand translation usage patterns better. Optional because it may 42 - * not always be available (e.g. if the post text is empty or if the 43 - * translation is triggered from a non-post 44 - * context). 50 + * Override the default behavior and always use Google Translate. 45 51 */ 46 - postLangCodes?: string[] 52 + forceGoogleTranslate?: boolean 47 53 } 48 54 49 55 export type TranslationFunction = ( 50 - parameters: TranslationFunctionParams, 56 + params: TranslationFunctionParams, 51 57 ) => Promise<void> 52 58 53 59 export type ContextType = { 54 60 translationState: Record<string, TranslationState> 55 61 translate: ( 56 - parameters: TranslationFunctionParams & TranslationOptions, 62 + params: TranslationFunctionParams, 63 + options: TranslationOptions, 57 64 ) => Promise<void> 58 65 clearTranslation: (key: string) => void 59 66 acquireTranslation: (key: string) => () => void
+1 -5
src/screens/PostThread/components/ThreadItemAnchor.tsx
··· 411 411 shouldProxyLinks={true} 412 412 /> 413 413 ) : undefined} 414 - <TranslatedPost 415 - post={post} 416 - postText={record.text} 417 - postTextStyle={[a.text_lg]} 418 - /> 414 + <TranslatedPost post={post} postTextStyle={[a.text_lg]} /> 419 415 {post.embed && ( 420 416 <View style={[a.py_xs]}> 421 417 <Embed
+1 -5
src/screens/PostThread/components/ThreadItemPost.tsx
··· 321 321 )} 322 322 </View> 323 323 ) : undefined} 324 - <TranslatedPost 325 - hideTranslateLink={true} 326 - post={post} 327 - postText={record.text} 328 - /> 324 + <TranslatedPost hideTranslateLink post={post} /> 329 325 {post.embed && ( 330 326 <View style={[a.pb_xs]}> 331 327 <Embed
+1 -5
src/screens/PostThread/components/ThreadItemTreePost.tsx
··· 361 361 )} 362 362 </View> 363 363 ) : null} 364 - <TranslatedPost 365 - hideTranslateLink={true} 366 - post={post} 367 - postText={record.text} 368 - /> 364 + <TranslatedPost hideTranslateLink post={post} /> 369 365 {post.embed && ( 370 366 <View style={[a.pb_xs]}> 371 367 <Embed
+1 -5
src/view/com/post/Post.tsx
··· 219 219 )} 220 220 </View> 221 221 ) : undefined} 222 - <TranslatedPost 223 - hideTranslateLink={true} 224 - post={post} 225 - postText={record.text} 226 - /> 222 + <TranslatedPost hideTranslateLink post={post} /> 227 223 {post.embed ? ( 228 224 <Embed 229 225 embed={post.embed}
+1 -7
src/view/com/posts/PostFeedItem.tsx
··· 490 490 )} 491 491 </View> 492 492 ) : undefined} 493 - {record && ( 494 - <TranslatedPost 495 - hideTranslateLink={true} 496 - post={post} 497 - postText={record.text} 498 - /> 499 - )} 493 + {record && <TranslatedPost hideTranslateLink post={post} />} 500 494 {postEmbed ? ( 501 495 <View style={[a.pb_xs]}> 502 496 <Embed