diff options
author | Stanislas Signoud <signez@stanisoft.net> | 2024-01-09 23:37:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 14:37:15 -0800 |
commit | 008893b911c354ea70fbb4ceacefe2dafc7567b9 (patch) | |
tree | 817a76b7a5a3b324db025b0d9c9c2647bde5ce6e /src/view/com/posts/FeedErrorMessage.tsx | |
parent | aeeacd10d322a6e599631c500de03172d69984de (diff) | |
download | voidsky-008893b911c354ea70fbb4ceacefe2dafc7567b9.tar.zst |
Internationalize more strings (#2440)
Co-authored-by: Ansh <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/com/posts/FeedErrorMessage.tsx')
-rw-r--r-- | src/view/com/posts/FeedErrorMessage.tsx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/view/com/posts/FeedErrorMessage.tsx b/src/view/com/posts/FeedErrorMessage.tsx index aeac45980..48ed49bb1 100644 --- a/src/view/com/posts/FeedErrorMessage.tsx +++ b/src/view/com/posts/FeedErrorMessage.tsx @@ -38,6 +38,7 @@ export function FeedErrorMessage({ error?: Error onPressTryAgain: () => void }) { + const {_: _l} = useLingui() const knownError = React.useMemo( () => detectKnownError(feedDesc, error), [feedDesc, error], @@ -60,7 +61,7 @@ export function FeedErrorMessage({ return ( <EmptyState icon="ban" - message="Posts hidden" + message={_l(msgLingui`Posts hidden`)} style={{paddingVertical: 40}} /> ) @@ -134,7 +135,9 @@ function FeedgenErrorMessage({ await removeFeed({uri}) } catch (err) { Toast.show( - 'There was an an issue removing this feed. Please check your internet connection and try again.', + _l( + msgLingui`There was an an issue removing this feed. Please check your internet connection and try again.`, + ), ) logger.error('Failed to remove feed', {error: err}) } @@ -160,20 +163,20 @@ function FeedgenErrorMessage({ {knownError === KnownError.FeedgenDoesNotExist && ( <Button type="inverted" - label="Remove feed" + label={_l(msgLingui`Remove feed`)} onPress={onRemoveFeed} /> )} <Button type="default-light" - label="View profile" + label={_l(msgLingui`View profile`)} onPress={onViewProfile} /> </View> ) } } - }, [knownError, onViewProfile, onRemoveFeed]) + }, [knownError, onViewProfile, onRemoveFeed, _l]) return ( <View @@ -191,7 +194,7 @@ function FeedgenErrorMessage({ {rawError?.message && ( <Text style={pal.textLight}> - <Trans>Message from server</Trans>: {rawError.message} + <Trans>Message from server: {rawError.message}</Trans> </Text> )} |