-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
21075: MAJOR Refactored translations to use
Il8nBundles
(#9)
- Loading branch information
1 parent
08859f1
commit 4025b51
Showing
155 changed files
with
1,594 additions
and
962 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,30 +1,22 @@ | ||
import { initReactI18next } from "react-i18next"; | ||
import i18n from "i18next"; | ||
import LanguageDetector from "i18next-browser-languagedetector"; | ||
import { defaultTranslationNamespace as reactTailwindFlowbiteComponentsNs } from "@howso/react-tailwind-flowbite-components"; | ||
import howsoReactTailwindFlowbiteComponentsEn from "@howso/react-tailwind-flowbite-components/lib/public/locales/react-tailwind-flowbite-components/en.json" with { type: | ||
"json" }; | ||
import { defaultTranslationNamespace } from "../src/hooks/useDefaultTranslation"; | ||
import howsoEngineReactDisplayComponentsEn from "../public/locales/howso-engine-react-display-components/en.json" with { type: | ||
"json" }; | ||
import { addI18nBundlesToResources } from "@howso/ui-internationalization-utils"; | ||
import { I18nBundles as ReactTailwindFlowbiteComponentsI18nBundles } from "@howso/react-tailwind-flowbite-components"; | ||
import { I18nBundles } from "../src"; | ||
|
||
const ns = [reactTailwindFlowbiteComponentsNs, defaultTranslationNamespace]; | ||
const supportedLngs = ["en"]; | ||
|
||
export default i18n | ||
.use(initReactI18next) | ||
.use(LanguageDetector) | ||
.init({ | ||
lng: supportedLngs[0], | ||
ns, | ||
interpolation: { escapeValue: false }, | ||
// react: { useSuspense: true }, | ||
supportedLngs, | ||
resources: { | ||
en: { | ||
[reactTailwindFlowbiteComponentsNs]: | ||
howsoReactTailwindFlowbiteComponentsEn, | ||
[defaultTranslationNamespace]: howsoEngineReactDisplayComponentsEn, | ||
}, | ||
}, | ||
resources: addI18nBundlesToResources({}, [ | ||
...ReactTailwindFlowbiteComponentsI18nBundles, | ||
...I18nBundles, | ||
]), | ||
}); |
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
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
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Empty file.
Oops, something went wrong.