-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [internationalization] the translation object keys are visible f…
…or a brief time
- Loading branch information
Showing
5 changed files
with
29 additions
and
27 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
import i18n from 'i18next'; | ||
import { initReactI18next } from 'react-i18next'; | ||
const supportedLngs = ['en', 'fr', 'ar', 'bg', 'zh', 'nl', 'de', 'he', 'it', 'pl', 'pt', 'ru', 'es']; | ||
export const ni18nConfig = { | ||
|
||
i18n.use(initReactI18next).init({ | ||
lng: 'en', | ||
fallbackLng: 'en', | ||
ns: ['common'], | ||
defaultNS: 'common', | ||
supportedLngs, | ||
ns: ['common'] | ||
}; | ||
interpolation: { | ||
escapeValue: false | ||
} | ||
}); | ||
|
||
supportedLngs.forEach((lang) => { | ||
i18n.addResourceBundle(lang, 'common', require(`/public/locales/${lang}/common.json`)); | ||
}); | ||
|
||
export default i18n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5095,7 +5095,7 @@ | |
lodash.merge "^4.6.2" | ||
postcss-selector-parser "6.0.10" | ||
|
||
"@tanstack/[email protected]": | ||
"@tanstack/react-table@^8.10.7": | ||
version "8.10.7" | ||
resolved "https://registry.yarnpkg.com/@tanstack/react-table/-/react-table-8.10.7.tgz#733f4bee8cf5aa19582f944dd0fd3224b21e8c94" | ||
integrity sha512-bXhjA7xsTcsW8JPTTYlUg/FuBpn8MNjiEPhkNhIGCUR6iRQM2+WEco4OBpvDeVcR9SE+bmWLzdfiY7bCbCSVuA== | ||
|