From 23ad3ad98b5b4c76ceb06bd4d4cffb9e5b42d087 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Thu, 30 Nov 2023 17:03:38 -0800
Subject: Various fixes (#2053)

* Fix invite code translations (plural api not availabe in ios)

* Speed up the composer animation a smidge
---
 src/view/shell/Drawer.tsx | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

(limited to 'src/view/shell/Drawer.tsx')

diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx
index a72f3fe36..b4710c2e1 100644
--- a/src/view/shell/Drawer.tsx
+++ b/src/view/shell/Drawer.tsx
@@ -41,8 +41,8 @@ import {getTabState, TabState} from 'lib/routes/helpers'
 import {NavigationProp} from 'lib/routes/types'
 import {useNavigationTabState} from 'lib/hooks/useNavigationTabState'
 import {isWeb} from 'platform/detection'
-import {formatCount, formatCountShortOnly} from 'view/com/util/numeric/format'
-import {Plural, Trans, msg, plural} from '@lingui/macro'
+import {formatCountShortOnly} from 'view/com/util/numeric/format'
+import {Trans, msg} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 import {useSetDrawerOpen} from '#/state/shell'
 import {useModalControls} from '#/state/modals'
@@ -500,12 +500,7 @@ function InviteCodes({style}: {style?: StyleProp<ViewStyle>}) {
       style={[styles.inviteCodes, style]}
       onPress={onPress}
       accessibilityRole="button"
-      accessibilityLabel={_(
-        plural(invitesAvailable, {
-          one: 'Invite codes: # available',
-          other: 'Invite codes: # available',
-        }),
-      )}
+      accessibilityLabel={_(msg`Invite codes: ${invitesAvailable} available`)}
       accessibilityHint={_(msg`Opens list of invite codes`)}
       disabled={invites?.disabled}>
       <FontAwesomeIcon
@@ -523,12 +518,10 @@ function InviteCodes({style}: {style?: StyleProp<ViewStyle>}) {
           <Trans>
             Your invite codes are hidden when logged in using an App Password
           </Trans>
+        ) : invitesAvailable === 1 ? (
+          <Trans>{invitesAvailable} invite code available</Trans>
         ) : (
-          <Plural
-            value={formatCount(invitesAvailable)}
-            one="# invite code available"
-            other="# invite codes available"
-          />
+          <Trans>{invitesAvailable} invite codes available</Trans>
         )}
       </Text>
     </TouchableOpacity>
-- 
cgit 1.4.1

