Add plural formatting to "Group name is too long" strings (#10769)
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
} from 'react'
|
||||
import {LayoutAnimation, type TextInput, View} from 'react-native'
|
||||
import {moderateProfile, type ModerationOpts} from '@atproto/api'
|
||||
import {Trans, useLingui} from '@lingui/react/macro'
|
||||
import {Plural, Trans, useLingui} from '@lingui/react/macro'
|
||||
|
||||
import {MAX_GROUP_NAME_GRAPHEME_LENGTH} from '#/lib/constants'
|
||||
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
||||
@@ -600,8 +600,11 @@ export function InitiateChatFlow({
|
||||
{color: t.palette.negative_400},
|
||||
]}>
|
||||
<Trans>
|
||||
Group name is too long. The maximum number of characters
|
||||
is {MAX_GROUP_NAME_GRAPHEME_LENGTH}.
|
||||
Group name is too long.{' '}
|
||||
<Plural
|
||||
value={MAX_GROUP_NAME_GRAPHEME_LENGTH}
|
||||
other="The maximum number of characters is #."
|
||||
/>
|
||||
</Trans>
|
||||
</Text>
|
||||
) : null}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {View} from 'react-native'
|
||||
import {Trans, useLingui} from '@lingui/react/macro'
|
||||
import {Plural, Trans, useLingui} from '@lingui/react/macro'
|
||||
|
||||
import {MAX_GROUP_NAME_GRAPHEME_LENGTH} from '#/lib/constants'
|
||||
import {isOverMaxGraphemeCount} from '#/lib/strings/helpers'
|
||||
@@ -59,8 +59,11 @@ export function EditNamePrompt({
|
||||
{color: t.palette.negative_400},
|
||||
]}>
|
||||
<Trans>
|
||||
Group name is too long. The maximum number of characters is{' '}
|
||||
{MAX_GROUP_NAME_GRAPHEME_LENGTH}.
|
||||
Group name is too long.{' '}
|
||||
<Plural
|
||||
value={MAX_GROUP_NAME_GRAPHEME_LENGTH}
|
||||
other="The maximum number of characters is #."
|
||||
/>
|
||||
</Trans>
|
||||
</Text>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user