-
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.
- Loading branch information
Showing
7 changed files
with
411 additions
and
714 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { getLocales } from "expo-localization"; | ||
import i18n from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
|
||
import englishTranslation from "./locales/english.json"; | ||
import frenchTranslation from "./locales/french.json"; | ||
|
||
i18n.use(initReactI18next).init({ | ||
lng: getLocales().find(() => true)?.languageCode ?? "", | ||
resources: { | ||
en: { | ||
translation: englishTranslation, | ||
}, | ||
fr: { | ||
translation: frenchTranslation, | ||
}, | ||
}, | ||
fallbackLng: ["en"], | ||
}); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"helloWorld": "Panting template repo!" | ||
} |
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,3 @@ | ||
{ | ||
"helloWorld": "Panting dépôt de modèles." | ||
} |
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,2 +1,9 @@ | ||
// set/clear Immediate not available by default. | ||
global.setImmediate = jest.useRealTimers as unknown as typeof setImmediate; | ||
global.clearImmediate = jest.useRealTimers as unknown as typeof clearImmediate; | ||
// https://github.com/expo/expo/issues/27496 | ||
jest.mock("expo-localization", () => ({ | ||
getLocales: jest.fn(() => { | ||
return [{ languageCode: "en" }]; | ||
}), | ||
})); |
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