-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors when importing common packages (#432)
* fix: temporarily comment out error codes in Feeds * fix: update esbuild and fix tailwind build command * fix: temporarily change the target of ReactModal.setAppElement * fix: commented out translation & navigation function and fix typo of color variables * fix: language switch icon size * fix: move i18n config from packages folder to each microfrontend * fix: recover sign in modal
- Loading branch information
1 parent
d04f3c6
commit b317b62
Showing
36 changed files
with
6,361 additions
and
5,971 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { initReactI18next } from "react-i18next" | ||
import i18next from "i18next" | ||
import { getCoreTranslation, getI18nLanguageDetector, getI18nHttpBackend, Lang } from "wasedatime-ui" | ||
import translationEN from "@app/constants/locales/en/translation.json" | ||
import translationJA from "@app/constants/locales/ja/translation.json" | ||
|
||
const resources = { | ||
[Lang.EN]: { | ||
translation: { ...getCoreTranslation(Lang.EN), ...translationEN }, | ||
}, | ||
[Lang.JA]: { | ||
translation: { ...getCoreTranslation(Lang.JA), ...translationJA }, | ||
}, | ||
} | ||
|
||
const detectorOptions = { | ||
order: ["localStorage"], | ||
lookupLocalStorage: "wasedatime-lng", | ||
caches: ["localStorage"], | ||
} | ||
|
||
i18next | ||
.use(getI18nHttpBackend()) | ||
.use(getI18nLanguageDetector()) | ||
.use(initReactI18next) // passes i18n down to react-i18next | ||
.init({ | ||
resources, | ||
fallbackLng: Lang.EN, | ||
keySeparator: ".", | ||
interpolation: { | ||
// react already safes from xss | ||
escapeValue: false, | ||
}, | ||
// Configure the withNamespaces / NamespacesConsumer to | ||
// not render the content until needed namespaces are loaded. | ||
// react: { | ||
// wait: true, | ||
// }, | ||
detection: detectorOptions, | ||
}) |
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
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
Oops, something went wrong.