Show shorter text for account label badge (#10983)

This commit is contained in:
Alex Benzer
2026-06-25 14:53:49 -07:00
committed by GitHub
parent b1b0ad09cc
commit c33a35851e
+11 -17
View File
@@ -2,7 +2,7 @@ import {type StyleProp, View, type ViewStyle} from 'react-native'
import {type AppBskyFeedDefs, type ComAtprotoLabelDefs} from '@atproto/api' import {type AppBskyFeedDefs, type ComAtprotoLabelDefs} from '@atproto/api'
import {msg} from '@lingui/core/macro' import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {Plural, Trans} from '@lingui/react/macro' import {Plural} from '@lingui/react/macro'
import {useSession} from '#/state/session' import {useSession} from '#/state/session'
import {atoms as a} from '#/alf' import {atoms as a} from '#/alf'
@@ -60,23 +60,17 @@ export function LabelsOnMe({
<ButtonIcon position="left" icon={CircleInfo} /> <ButtonIcon position="left" icon={CircleInfo} />
<ButtonText style={[a.leading_snug]}> <ButtonText style={[a.leading_snug]}>
{type === 'account' ? ( {type === 'account' ? (
<Trans> <Plural
<Plural value={labels.length}
value={labels.length} one="# account label"
one="# label has" other="# account labels"
other="# labels have" />
/>{' '}
been placed on this account
</Trans>
) : ( ) : (
<Trans> <Plural
<Plural value={labels.length}
value={labels.length} one="# content label"
one="# label has" other="# content labels"
other="# labels have" />
/>{' '}
been placed on this content
</Trans>
)} )}
</ButtonText> </ButtonText>
</Button> </Button>