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/UserAddRemoveLists.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/view/com/modals/UserAddRemoveLists.tsx') diff --git a/src/view/com/modals/UserAddRemoveLists.tsx b/src/view/com/modals/UserAddRemoveLists.tsx index f86e88439..efcfc43be 100644 --- a/src/view/com/modals/UserAddRemoveLists.tsx +++ b/src/view/com/modals/UserAddRemoveLists.tsx @@ -21,6 +21,8 @@ import {usePalette} from 'lib/hooks/usePalette' import {isWeb, isAndroid} from 'platform/detection' import isEqual from 'lodash.isequal' import {logger} from '#/logger' +import {Trans, msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' import {useModalControls} from '#/state/modals' export const snapPoints = ['fullscreen'] @@ -39,6 +41,7 @@ export const Component = observer(function UserAddRemoveListsImpl({ const store = useStores() const {closeModal} = useModalControls() const pal = usePalette('default') + const {_} = useLingui() const palPrimary = usePalette('primary') const palInverted = usePalette('inverted') const [originalSelections, setOriginalSelections] = React.useState( @@ -181,7 +184,7 @@ export const Component = observer(function UserAddRemoveListsImpl({ return ( - Update {displayName} in Lists + Update {displayName} in Lists