Skip to content

Commit

Permalink
Temporarily remove language detection
Browse files Browse the repository at this point in the history
  • Loading branch information
narin committed Dec 5, 2024
1 parent f4595db commit ff319ee
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
1 change: 0 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"homepage": "https://department-of-veterans-affairs.github.io/va-mobile-library",
"dependencies": {
"@os-team/i18next-react-native-language-detector": "^1.0.34",
"i18next": "^23.12.2",
"react-i18next": "^15.0.0",
"react-native-svg": "15.8.0",
Expand Down
8 changes: 1 addition & 7 deletions packages/components/src/utils/translation/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { initReactI18next } from 'react-i18next'
import RNLanguageDetector from '@os-team/i18next-react-native-language-detector'
import i18n from 'i18next'

import * as enTranslation from './en.json'
Expand All @@ -8,12 +7,7 @@ export const resources = {
en: { translation: enTranslation },
}

// Initialize the internationalization library

// Use RNLanguageDetector only if mobile
if (process.env.STORYBOOK_WEB !== 'true') {
i18n.use(RNLanguageDetector)
}
// TODO: Detect language on mobile

// If i18n is already initialized (in app), add our translations to the common namespace
if (i18n.isInitializing || i18n.isInitialized) {
Expand Down
11 changes: 0 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3609,7 +3609,6 @@ __metadata:
"@department-of-veterans-affairs/mobile-tokens": "npm:0.20.0"
"@expo/metro-runtime": "npm:~4.0.0"
"@expo/webpack-config": "npm:~19.0.1"
"@os-team/i18next-react-native-language-detector": "npm:^1.0.34"
"@react-native-async-storage/async-storage": "npm:1.23.1"
"@react-native-community/datetimepicker": "npm:8.2.0"
"@react-native-community/slider": "npm:4.5.5"
Expand Down Expand Up @@ -5014,16 +5013,6 @@ __metadata:
languageName: node
linkType: hard

"@os-team/i18next-react-native-language-detector@npm:^1.0.34":
version: 1.0.34
resolution: "@os-team/i18next-react-native-language-detector@npm:1.0.34"
peerDependencies:
i18next: "*"
react-native: "*"
checksum: 76d044e0b406368cc8d3ac80b0ee94a925b9319629009c1802ec1bed8fdf9cdbbd70360f0c6c9778fe4faf41ff53f4f498242f956c4a21b851f4f11536eab94f
languageName: node
linkType: hard

"@pkgjs/parseargs@npm:^0.11.0":
version: 0.11.0
resolution: "@pkgjs/parseargs@npm:0.11.0"
Expand Down

0 comments on commit ff319ee

Please sign in to comment.