about summary refs log tree commit diff
path: root/src/App.native.tsx
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-11-20 13:29:27 -0800
committerGitHub <noreply@github.com>2023-11-20 13:29:27 -0800
commitc5b6f88e9a694d79126af4f742e66833dfd528bd (patch)
tree0bfdc49ace558adc3d9d5a76fc4726f16f853d4e /src/App.native.tsx
parent019aae5f01cb7b503d242917ae0092c2818f3b71 (diff)
downloadvoidsky-c5b6f88e9a694d79126af4f742e66833dfd528bd.tar.zst
Hindi Internationalization (#1914)
* get basic hindi support to work

* get web app language switcher in

* Refactor i18n implementation and remove unused
code

* add missing strings

* add dropdowns and modals missing strings

* complete all hindi translations

* fix merge conflicts

* fix legeacy persisted state

* fix data in RecommendedFeeds

* fix lint
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r--src/App.native.tsx26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx
index e1db6df83..b9f9519c9 100644
--- a/src/App.native.tsx
+++ b/src/App.native.tsx
@@ -28,6 +28,7 @@ import {Provider as LightboxStateProvider} from 'state/lightbox'
 import {Provider as MutedThreadsProvider} from 'state/muted-threads'
 import {Provider as InvitesStateProvider} from 'state/invites'
 import {Provider as PrefsStateProvider} from 'state/preferences'
+import I18nProvider from './locale/i18nProvider'
 import {
   Provider as SessionProvider,
   useSession,
@@ -35,11 +36,6 @@ import {
 } from 'state/session'
 import {Provider as UnreadNotifsProvider} from 'state/queries/notifications/unread'
 import * as persisted from '#/state/persisted'
-import {i18n} from '@lingui/core'
-import {I18nProvider} from '@lingui/react'
-import {messages} from './locale/locales/en/messages'
-i18n.load('en', messages)
-i18n.activate('en')
 
 enableFreeze(true)
 SplashScreen.preventAutoHideAsync()
@@ -76,15 +72,13 @@ function InnerApp() {
     <UnreadNotifsProvider>
       <ThemeProvider theme={colorMode}>
         <analytics.Provider>
-          <I18nProvider i18n={i18n}>
-            {/* All components should be within this provider */}
-            <RootSiblingParent>
-              <GestureHandlerRootView style={s.h100pct}>
-                <TestCtrls />
-                <Shell />
-              </GestureHandlerRootView>
-            </RootSiblingParent>
-          </I18nProvider>
+          {/* All components should be within this provider */}
+          <RootSiblingParent>
+            <GestureHandlerRootView style={s.h100pct}>
+              <TestCtrls />
+              <Shell />
+            </GestureHandlerRootView>
+          </RootSiblingParent>
         </analytics.Provider>
       </ThemeProvider>
     </UnreadNotifsProvider>
@@ -115,7 +109,9 @@ function App() {
               <InvitesStateProvider>
                 <ModalStateProvider>
                   <LightboxStateProvider>
-                    <InnerApp />
+                    <I18nProvider>
+                      <InnerApp />
+                    </I18nProvider>
                   </LightboxStateProvider>
                 </ModalStateProvider>
               </InvitesStateProvider>