From e7708f2fa94075b796ecab75f058632976f54162 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 14 Aug 2025 10:04:10 -0500 Subject: [PATCH] Add plural formatting to a11y hint translation Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/com/composer/SelectMediaButton.tsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/view/com/composer/SelectMediaButton.tsx b/src/view/com/composer/SelectMediaButton.tsx index a2b867aca3..d313942ef0 100644 --- a/src/view/com/composer/SelectMediaButton.tsx +++ b/src/view/com/composer/SelectMediaButton.tsx @@ -485,10 +485,26 @@ export function SelectMediaButton({ accessibilityHint={ isNative ? _( - msg`Opens device gallery to select up to ${MAX_IMAGES} images, or a single video.`, + msg({ + message: `Opens device gallery to select up to ${plural( + MAX_IMAGES, + { + other: '# images', + }, + )}, or a single video.`, + comment: `Accessibility hint on native for button in composer to add images or a video to a post. Maximum number of images that can be selected is currently 4 but may change.`, + }), ) : _( - msg`Opens device gallery to select up to ${MAX_IMAGES} images, or a single video or GIF.`, + msg({ + message: `Opens device gallery to select up to ${plural( + MAX_IMAGES, + { + other: '# images', + }, + )}, or a single video or GIF.`, + comment: `Accessibility hint on web for button in composer to add images, a video, or a GIF to a post. Maximum number of images that can be selected is currently 4 but may change.`, + }), ) } style={a.p_sm}