KnownFollowers localization (#4494)
* Update KnownFollowers.tsx * Update KnownFollowers.tsx * Update KnownFollowers.tsxzio/stable
parent
28ba99917a
commit
7faa1d9131
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api'
|
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 {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {makeProfileLink} from '#/lib/routes/links'
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
|
@ -164,31 +164,37 @@ function KnownFollowersInner({
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
numberOfLines={2}>
|
numberOfLines={2}>
|
||||||
<Trans>Followed by</Trans>{' '}
|
|
||||||
{count > 2 ? (
|
{count > 2 ? (
|
||||||
<>
|
<Trans>
|
||||||
{slice.slice(0, 2).map(({profile: prof}, i) => (
|
Followed by{' '}
|
||||||
<Text key={prof.did} style={textStyle}>
|
|
||||||
{prof.displayName}
|
|
||||||
{i === 0 && ', '}
|
|
||||||
</Text>
|
|
||||||
))}
|
|
||||||
{', '}
|
|
||||||
{plural(count - 2, {
|
|
||||||
one: 'and # other',
|
|
||||||
other: 'and # others',
|
|
||||||
})}
|
|
||||||
</>
|
|
||||||
) : count === 2 ? (
|
|
||||||
slice.map(({profile: prof}, i) => (
|
|
||||||
<Text key={prof.did} style={textStyle}>
|
|
||||||
{prof.displayName} {i === 0 ? _(msg`and`) + ' ' : ''}
|
|
||||||
</Text>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<Text key={slice[0].profile.did} style={textStyle}>
|
<Text key={slice[0].profile.did} style={textStyle}>
|
||||||
{slice[0].profile.displayName}
|
{slice[0].profile.displayName}
|
||||||
</Text>
|
</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 ? (
|
||||||
|
<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>
|
||||||
|
) : (
|
||||||
|
<Trans>
|
||||||
|
Followed by{' '}
|
||||||
|
<Text key={slice[0].profile.did} style={textStyle}>
|
||||||
|
{slice[0].profile.displayName}
|
||||||
|
</Text>
|
||||||
|
</Trans>
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue