about summary refs log tree commit diff
path: root/src/view/com/util/post-ctrls/RepostButton.tsx
diff options
context:
space:
mode:
authorStanislas Signoud <signez@stanisoft.net>2024-01-09 23:37:15 +0100
committerGitHub <noreply@github.com>2024-01-09 14:37:15 -0800
commit008893b911c354ea70fbb4ceacefe2dafc7567b9 (patch)
tree817a76b7a5a3b324db025b0d9c9c2647bde5ce6e /src/view/com/util/post-ctrls/RepostButton.tsx
parentaeeacd10d322a6e599631c500de03172d69984de (diff)
downloadvoidsky-008893b911c354ea70fbb4ceacefe2dafc7567b9.tar.zst
Internationalize more strings (#2440)
Co-authored-by: Ansh <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/com/util/post-ctrls/RepostButton.tsx')
-rw-r--r--src/view/com/util/post-ctrls/RepostButton.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/view/com/util/post-ctrls/RepostButton.tsx b/src/view/com/util/post-ctrls/RepostButton.tsx
index 620852d8e..d45bf1d87 100644
--- a/src/view/com/util/post-ctrls/RepostButton.tsx
+++ b/src/view/com/util/post-ctrls/RepostButton.tsx
@@ -8,6 +8,8 @@ import {pluralize} from 'lib/strings/helpers'
 import {HITSLOP_10, HITSLOP_20} from 'lib/constants'
 import {useModalControls} from '#/state/modals'
 import {useRequireAuth} from '#/state/session'
+import {msg} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
 
 interface Props {
   isReposted: boolean
@@ -25,6 +27,7 @@ let RepostButton = ({
   onQuote,
 }: Props): React.ReactNode => {
   const theme = useTheme()
+  const {_} = useLingui()
   const {openModal} = useModalControls()
   const requireAuth = useRequireAuth()
 
@@ -53,7 +56,9 @@ let RepostButton = ({
       style={[styles.control, !big && styles.controlPad]}
       accessibilityRole="button"
       accessibilityLabel={`${
-        isReposted ? 'Undo repost' : 'Repost'
+        isReposted
+          ? _(msg`Undo repost`)
+          : _(msg({message: 'Repost', context: 'action'}))
       } (${repostCount} ${pluralize(repostCount || 0, 'repost')})`}
       accessibilityHint=""
       hitSlop={big ? HITSLOP_20 : HITSLOP_10}>