Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Mark `Retry` and `Go Back` buttons in Error.tsx for localisation (#3352)

* Mark `Retry` and `Go Back` buttons in Error.tsx for localisation

* add and sort imports

* sort imports better

authored by

surfdude29 and committed by
GitHub
69217f9a ef24611a

+16 -9
+16 -9
src/components/Error.tsx
··· 1 1 import React from 'react' 2 + import {View} from 'react-native' 3 + import {useNavigation} from '@react-navigation/core' 4 + import {StackActions} from '@react-navigation/native' 5 + import {msg, Trans} from '@lingui/macro' 6 + import {useLingui} from '@lingui/react' 2 7 8 + import {NavigationProp} from 'lib/routes/types' 3 9 import {CenteredView} from 'view/com/util/Views' 4 10 import {atoms as a, useBreakpoints, useTheme} from '#/alf' 11 + import {Button, ButtonText} from '#/components/Button' 5 12 import {Text} from '#/components/Typography' 6 - import {View} from 'react-native' 7 - import {Button} from '#/components/Button' 8 - import {useNavigation} from '@react-navigation/core' 9 - import {NavigationProp} from 'lib/routes/types' 10 - import {StackActions} from '@react-navigation/native' 11 13 import {router} from '#/routes' 12 14 13 15 export function Error({ ··· 20 22 onRetry?: () => unknown 21 23 }) { 22 24 const navigation = useNavigation<NavigationProp>() 25 + const {_} = useLingui() 23 26 const t = useTheme() 24 27 const {gtMobile} = useBreakpoints() 25 28 ··· 68 71 <Button 69 72 variant="solid" 70 73 color="primary" 71 - label="Click here" 74 + label={_(msg`Press to retry`)} 72 75 onPress={onRetry} 73 76 size="large" 74 77 style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}> 75 - Retry 78 + <ButtonText> 79 + <Trans>Retry</Trans> 80 + </ButtonText> 76 81 </Button> 77 82 )} 78 83 <Button 79 84 variant="solid" 80 85 color={onRetry ? 'secondary' : 'primary'} 81 - label="Click here" 86 + label={_(msg`Return to previous page`)} 82 87 onPress={onGoBack} 83 88 size="large" 84 89 style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}> 85 - Go Back 90 + <ButtonText> 91 + <Trans>Go Back</Trans> 92 + </ButtonText> 86 93 </Button> 87 94 </View> 88 95 </CenteredView>