From 4c7850f8c48a0cb3f83f33b1701a99066c6b31db Mon Sep 17 00:00:00 2001 From: Ansh Date: Thu, 9 Nov 2023 10:04:16 -0800 Subject: Internationalization & localization (#1822) * install and setup lingui * setup dynamic locale activation and async loading * first pass of automated replacement of text messages * add some more documentaton * fix nits * add `es` and `hi`locales for testing purposes * make accessibilityLabel localized * compile and extract new messages * fix merge conflicts * fix eslint warning * change instructions from sending email to opening PR * fix comments --- src/view/com/modals/Repost.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/view/com/modals/Repost.tsx') diff --git a/src/view/com/modals/Repost.tsx b/src/view/com/modals/Repost.tsx index 13728b62b..a72da29b4 100644 --- a/src/view/com/modals/Repost.tsx +++ b/src/view/com/modals/Repost.tsx @@ -6,6 +6,8 @@ import {Text} from '../util/text/Text' import {usePalette} from 'lib/hooks/usePalette' import {RepostIcon} from 'lib/icons' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {Trans, msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' import {useModalControls} from '#/state/modals' export const snapPoints = [250] @@ -21,6 +23,7 @@ export function Component({ // TODO: Add author into component }) { const pal = usePalette('default') + const {_} = useLingui() const {closeModal} = useModalControls() const onPress = async () => { closeModal() @@ -38,7 +41,7 @@ export function Component({ accessibilityHint={isReposted ? 'Remove repost' : 'Repost '}> - {!isReposted ? 'Repost' : 'Undo repost'} + {!isReposted ? 'Repost' : 'Undo repost'} - Quote Post + Quote Post @@ -58,7 +61,7 @@ export function Component({ testID="cancelBtn" onPress={onPress} accessibilityRole="button" - accessibilityLabel="Cancel quote post" + accessibilityLabel={_(msg`Cancel quote post`)} accessibilityHint="" onAccessibilityEscape={onPress}> - Cancel + + Cancel + -- cgit 1.4.1