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/FeedItem.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/FeedItem.tsx')
-rw-r--r-- | src/view/com/notifications/FeedItem.tsx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx index 24b7e4fb6..e9d8b63e2 100644 --- a/src/view/com/notifications/FeedItem.tsx +++ b/src/view/com/notifications/FeedItem.tsx @@ -65,6 +65,7 @@ let FeedItem = ({ moderationOpts: ModerationOpts }): React.ReactNode => { const pal = usePalette('default') + const {_} = useLingui() const [isAuthorsExpanded, setAuthorsExpanded] = useState<boolean>(false) const itemHref = useMemo(() => { if (item.type === 'post-like' || item.type === 'repost') { @@ -151,24 +152,26 @@ let FeedItem = ({ let icon: Props['icon'] | 'HeartIconSolid' let iconStyle: Props['style'] = [] if (item.type === 'post-like') { - action = 'liked your post' + action = _(msg`liked your post`) icon = 'HeartIconSolid' iconStyle = [ s.likeColor as FontAwesomeIconStyle, {position: 'relative', top: -4}, ] } else if (item.type === 'repost') { - action = 'reposted your post' + action = _(msg`reposted your post`) icon = 'retweet' iconStyle = [s.green3 as FontAwesomeIconStyle] } else if (item.type === 'follow') { - action = 'followed you' + action = _(msg`followed you`) icon = 'user-plus' iconStyle = [s.blue3 as FontAwesomeIconStyle] } else if (item.type === 'feedgen-like') { - action = `liked your custom feed${ - item.subjectUri ? ` '${new AtUri(item.subjectUri).rkey}'` : '' - }` + action = _( + msg`liked your custom feed${ + item.subjectUri ? ` '${new AtUri(item.subjectUri).rkey}'` : '' + }`, + ) icon = 'HeartIconSolid' iconStyle = [ s.likeColor as FontAwesomeIconStyle, @@ -314,14 +317,16 @@ function CondensedAuthorsList({ onPress={onToggleAuthorsExpanded} accessibilityRole="button" accessibilityLabel={_(msg`Hide user list`)} - accessibilityHint="Collapses list of users for a given notification"> + accessibilityHint={_( + msg`Collapses list of users for a given notification`, + )}> <FontAwesomeIcon icon="angle-up" size={18} style={[styles.expandedAuthorsCloseBtnIcon, pal.text]} /> <Text type="sm-medium" style={pal.text}> - <Trans>Hide</Trans> + <Trans context="action">Hide</Trans> </Text> </TouchableOpacity> </View> @@ -343,7 +348,9 @@ function CondensedAuthorsList({ return ( <TouchableOpacity accessibilityLabel={_(msg`Show users`)} - accessibilityHint="Opens an expanded list of users in this notification" + accessibilityHint={_( + msg`Opens an expanded list of users in this notification`, + )} onPress={onToggleAuthorsExpanded}> <View style={styles.avis}> {authors.slice(0, MAX_AUTHORS).map(author => ( |