diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-06-13 11:58:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 04:58:25 +0200 |
commit | 7faa1d9131fc28e1c0acd4b4c7b7c2bbeabc2281 (patch) | |
tree | 4de871f8f519d0a33b3a630b99da87b3cd42384a /src | |
parent | 28ba99917afb5d556a3cb3819cd45712eaf6d196 (diff) | |
download | voidsky-7faa1d9131fc28e1c0acd4b4c7b7c2bbeabc2281.tar.zst |
KnownFollowers localization (#4494)
* Update KnownFollowers.tsx * Update KnownFollowers.tsx * Update KnownFollowers.tsx
Diffstat (limited to 'src')
-rw-r--r-- | src/components/KnownFollowers.tsx | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/src/components/KnownFollowers.tsx b/src/components/KnownFollowers.tsx index 3d4d362ef..a8bdb763d 100644 --- a/src/components/KnownFollowers.tsx +++ b/src/components/KnownFollowers.tsx @@ -1,7 +1,7 @@ import React from 'react' import {View} from 'react-native' import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api' -import {msg, plural, Trans} from '@lingui/macro' +import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {makeProfileLink} from '#/lib/routes/links' @@ -164,31 +164,37 @@ function KnownFollowersInner({ }, ]} numberOfLines={2}> - <Trans>Followed by</Trans>{' '} {count > 2 ? ( - <> - {slice.slice(0, 2).map(({profile: prof}, i) => ( - <Text key={prof.did} style={textStyle}> - {prof.displayName} - {i === 0 && ', '} - </Text> - ))} - {', '} - {plural(count - 2, { - one: 'and # other', - other: 'and # others', - })} - </> + <Trans> + Followed by{' '} + <Text key={slice[0].profile.did} style={textStyle}> + {slice[0].profile.displayName} + </Text> + ,{' '} + <Text key={slice[1].profile.did} style={textStyle}> + {slice[1].profile.displayName} + </Text> + , and{' '} + <Plural value={count - 2} one="# other" other="# others" /> + </Trans> ) : count === 2 ? ( - slice.map(({profile: prof}, i) => ( - <Text key={prof.did} style={textStyle}> - {prof.displayName} {i === 0 ? _(msg`and`) + ' ' : ''} + <Trans> + Followed by{' '} + <Text key={slice[0].profile.did} style={textStyle}> + {slice[0].profile.displayName} + </Text>{' '} + and{' '} + <Text key={slice[1].profile.did} style={textStyle}> + {slice[1].profile.displayName} </Text> - )) + </Trans> ) : ( - <Text key={slice[0].profile.did} style={textStyle}> - {slice[0].profile.displayName} - </Text> + <Trans> + Followed by{' '} + <Text key={slice[0].profile.did} style={textStyle}> + {slice[0].profile.displayName} + </Text> + </Trans> )} </Text> </> |