diff options
author | surfdude29 <149612116+surfdude29@users.noreply.github.com> | 2025-04-02 00:09:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 16:09:53 -0700 |
commit | 758cb731f05736895402860a5b8253278a356045 (patch) | |
tree | 172301bf2c4fc0942d2cc358ebd084610c200977 /src/view/com/composer/GifAltText.tsx | |
parent | 5130f932edc77774a19ba0b2020c87a31f4c0c58 (diff) | |
download | voidsky-758cb731f05736895402860a5b8253278a356045.tar.zst |
Add plural formatting for alt text truncated string (#7994)
* add plural formatting in GifAltText.tsx * add plural formatting in ImageAltTextDialog.tsx * import Plural * format
Diffstat (limited to 'src/view/com/composer/GifAltText.tsx')
-rw-r--r-- | src/view/com/composer/GifAltText.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/view/com/composer/GifAltText.tsx b/src/view/com/composer/GifAltText.tsx index bd99b9f28..4d2539c4e 100644 --- a/src/view/com/composer/GifAltText.tsx +++ b/src/view/com/composer/GifAltText.tsx @@ -1,6 +1,6 @@ import {useState} from 'react' import {TouchableOpacity, View} from 'react-native' -import {msg, Trans} from '@lingui/macro' +import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {HITSLOP_10, MAX_ALT_TEXT} from '#/lib/constants' @@ -177,8 +177,11 @@ function AltTextInner({ t.atoms.text_contrast_medium, ]}> <Trans> - Alt text will be truncated. Limit:{' '} - {i18n.number(MAX_ALT_TEXT)} characters. + Alt text will be truncated.{' '} + <Plural + value={MAX_ALT_TEXT} + other={`Limit: ${i18n.number(MAX_ALT_TEXT)} characters.`} + /> </Trans> </Text> </View> |