diff options
author | surfdude29 <149612116+surfdude29@users.noreply.github.com> | 2025-02-24 21:10:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-24 13:10:53 -0800 |
commit | a383b9ba28d0fffa5692ffcc4f9ca744924a7d14 (patch) | |
tree | f69fd63eaa0958d0a88bc4330acbc32e2b5bfc6f /src | |
parent | bf4d3e89c27d08db27c513b2e84ea8a01e2c02bc (diff) | |
download | voidsky-a383b9ba28d0fffa5692ffcc4f9ca744924a7d14.tar.zst |
Plural formatting for `TimeIndicator` `accessibilityLabel` (#7826)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx b/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx index 75e544aca..95401309f 100644 --- a/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx +++ b/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx @@ -1,6 +1,6 @@ import {StyleProp, ViewStyle} from 'react-native' import {View} from 'react-native' -import {msg} from '@lingui/macro' +import {msg, plural} from '@lingui/macro' import {useLingui} from '@lingui/react' import {atoms as a, useTheme} from '#/alf' @@ -30,7 +30,12 @@ export function TimeIndicator({ return ( <View pointerEvents="none" - accessibilityLabel={_(msg`Time remaining: ${time} seconds`)} + accessibilityLabel={_( + msg`Time remaining: ${plural(Number(time) || 0, { + one: '# second', + other: '# seconds', + })}`, + )} accessibilityHint="" style={[ { |