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