diff options
author | surfdude29 <149612116+surfdude29@users.noreply.github.com> | 2025-04-01 23:50:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 15:50:58 -0700 |
commit | 98fe7edbc8b89b6355107e9b34eb4fb87ab99a90 (patch) | |
tree | db7997095acdc0c43122081e9d6c18e1acb2096c /src/screens/Profile/Header/EditProfileDialog.tsx | |
parent | 5cb49314d009e02179eec3bfc759376d134e2673 (diff) | |
download | voidsky-98fe7edbc8b89b6355107e9b34eb4fb87ab99a90.tar.zst |
Add plural formatting for "too long" error messages when editing profile info (#7998)
* add plural formatting for profile max graphemes errors * add missing tag * simplify
Diffstat (limited to 'src/screens/Profile/Header/EditProfileDialog.tsx')
-rw-r--r-- | src/screens/Profile/Header/EditProfileDialog.tsx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/screens/Profile/Header/EditProfileDialog.tsx b/src/screens/Profile/Header/EditProfileDialog.tsx index b3b73598c..62bb5e00e 100644 --- a/src/screens/Profile/Header/EditProfileDialog.tsx +++ b/src/screens/Profile/Header/EditProfileDialog.tsx @@ -2,7 +2,7 @@ import {useCallback, useEffect, useState} from 'react' import {Dimensions, View} from 'react-native' import {Image as RNImage} from 'react-native-image-crop-picker' import {AppBskyActorDefs} from '@atproto/api' -import {msg, Trans} from '@lingui/macro' +import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {compressIfNeeded} from '#/lib/media/manip' @@ -332,8 +332,11 @@ function DialogInner({ ]} label={_(msg`Display name is too long`)}> <Trans> - Display name is too long. The maximum number of characters is{' '} - {DISPLAY_NAME_MAX_GRAPHEMES}. + Display name is too long.{' '} + <Plural + value={DISPLAY_NAME_MAX_GRAPHEMES} + other="The maximum number of characters is #." + /> </Trans> </TextField.SuffixText> )} @@ -363,8 +366,11 @@ function DialogInner({ ]} label={_(msg`Description is too long`)}> <Trans> - Description is too long. The maximum number of characters is{' '} - {DESCRIPTION_MAX_GRAPHEMES}. + Description is too long.{' '} + <Plural + value={DESCRIPTION_MAX_GRAPHEMES} + other="The maximum number of characters is #." + /> </Trans> </TextField.SuffixText> )} |