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/notifications/Feed.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/notifications/Feed.tsx')
-rw-r--r-- | src/view/com/notifications/Feed.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx index a99fe2c1d..2088acbac 100644 --- a/src/view/com/notifications/Feed.tsx +++ b/src/view/com/notifications/Feed.tsx @@ -13,6 +13,8 @@ import {logger} from '#/logger' import {cleanError} from '#/lib/strings/errors' import {useModerationOpts} from '#/state/queries/preferences' import {List, ListRef} from '../util/List' +import {useLingui} from '@lingui/react' +import {msg} from '@lingui/macro' const EMPTY_FEED_ITEM = {_reactKey: '__empty__'} const LOAD_MORE_ERROR_ITEM = {_reactKey: '__load_more_error__'} @@ -31,6 +33,7 @@ export function Feed({ }) { const [isPTRing, setIsPTRing] = React.useState(false) + const {_} = useLingui() const moderationOpts = useModerationOpts() const {checkUnread} = useUnreadNotificationsApi() const { @@ -101,14 +104,16 @@ export function Feed({ return ( <EmptyState icon="bell" - message="No notifications yet!" + message={_(msg`No notifications yet!`)} style={styles.emptyState} /> ) } else if (item === LOAD_MORE_ERROR_ITEM) { return ( <LoadMoreRetryBtn - label="There was an issue fetching notifications. Tap here to try again." + label={_( + msg`There was an issue fetching notifications. Tap here to try again.`, + )} onPress={onPressRetryLoadMore} /> ) @@ -117,7 +122,7 @@ export function Feed({ } return <FeedItem item={item} moderationOpts={moderationOpts!} /> }, - [onPressRetryLoadMore, moderationOpts], + [onPressRetryLoadMore, moderationOpts, _], ) const FeedFooter = React.useCallback( |