From 69217f9a0926dc5b8764ca782b151a389b2615ae Mon Sep 17 00:00:00 2001 From: surfdude29 <149612116+surfdude29@users.noreply.github.com> Date: Sat, 30 Mar 2024 00:51:35 +0000 Subject: [PATCH] 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 --- src/components/Error.tsx | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/Error.tsx b/src/components/Error.tsx index 1dbf6828..7df166c3 100644 --- a/src/components/Error.tsx +++ b/src/components/Error.tsx @@ -1,13 +1,15 @@ import React from 'react' +import {View} from 'react-native' +import {useNavigation} from '@react-navigation/core' +import {StackActions} from '@react-navigation/native' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {NavigationProp} from 'lib/routes/types' import {CenteredView} from 'view/com/util/Views' import {atoms as a, useBreakpoints, useTheme} from '#/alf' +import {Button, ButtonText} from '#/components/Button' import {Text} from '#/components/Typography' -import {View} from 'react-native' -import {Button} from '#/components/Button' -import {useNavigation} from '@react-navigation/core' -import {NavigationProp} from 'lib/routes/types' -import {StackActions} from '@react-navigation/native' import {router} from '#/routes' export function Error({ @@ -20,6 +22,7 @@ export function Error({ onRetry?: () => unknown }) { const navigation = useNavigation() + const {_} = useLingui() const t = useTheme() const {gtMobile} = useBreakpoints() @@ -68,21 +71,25 @@ export function Error({ )}