-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated filemapper, prettified all code
- Loading branch information
D-Unit
committed
Nov 20, 2024
1 parent
f2fb031
commit 1708ded
Showing
94 changed files
with
3,948 additions
and
3,251 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 |
---|---|---|
|
@@ -6,4 +6,4 @@ const authProvider = { | |
loadUserInfo: true, | ||
}; | ||
|
||
export default authProvider; | ||
export default authProvider; |
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,40 +1,40 @@ | ||
import i18n from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
import languages from "./languages"; | ||
import LanguageDetector from "i18next-browser-languagedetector"; | ||
import { i18n as i18nLayout } from "@dans-framework/layout"; | ||
import { i18n as i18nDeposit } from "@dans-framework/deposit"; | ||
import { i18n as i18nAuth } from "@dans-framework/user-auth"; | ||
import { i18n as i18nRepo } from "@dans-framework/repo-advisor"; | ||
|
||
// this is the main language provider for all subcomponents/libraries | ||
i18n | ||
.use(LanguageDetector) | ||
.use(initReactI18next) | ||
.init({ | ||
debug: import.meta.env.DEV, | ||
supportedLngs: languages, | ||
detection: { | ||
order: ["cookie", "localStorage"], | ||
lookupCookie: "i18next", | ||
lookupLocalStorage: "i18nextLng", | ||
caches: ["localStorage", "cookie"], | ||
}, | ||
fallbackLng: "en", | ||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
react: { | ||
useSuspense: true, | ||
}, | ||
}); | ||
|
||
// make sure to import languages for the components that need it | ||
i18n.on("languageChanged", (lng) => { | ||
i18nLayout.changeLanguage(lng); | ||
i18nDeposit.changeLanguage(lng); | ||
i18nAuth.changeLanguage(lng); | ||
i18nRepo.changeLanguage(lng); | ||
}); | ||
|
||
export default i18n; | ||
import i18n from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
import languages from "./languages"; | ||
import LanguageDetector from "i18next-browser-languagedetector"; | ||
import { i18n as i18nLayout } from "@dans-framework/layout"; | ||
import { i18n as i18nDeposit } from "@dans-framework/deposit"; | ||
import { i18n as i18nAuth } from "@dans-framework/user-auth"; | ||
import { i18n as i18nRepo } from "@dans-framework/repo-advisor"; | ||
|
||
// this is the main language provider for all subcomponents/libraries | ||
i18n | ||
.use(LanguageDetector) | ||
.use(initReactI18next) | ||
.init({ | ||
debug: import.meta.env.DEV, | ||
supportedLngs: languages, | ||
detection: { | ||
order: ["cookie", "localStorage"], | ||
lookupCookie: "i18next", | ||
lookupLocalStorage: "i18nextLng", | ||
caches: ["localStorage", "cookie"], | ||
}, | ||
fallbackLng: "en", | ||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
react: { | ||
useSuspense: true, | ||
}, | ||
}); | ||
|
||
// make sure to import languages for the components that need it | ||
i18n.on("languageChanged", (lng) => { | ||
i18nLayout.changeLanguage(lng); | ||
i18nDeposit.changeLanguage(lng); | ||
i18nAuth.changeLanguage(lng); | ||
i18nRepo.changeLanguage(lng); | ||
}); | ||
|
||
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import type { Language } from "@dans-framework/utils"; | ||
|
||
const languages: Language[] = ["en", "nl"]; | ||
|
||
export default languages; | ||
import type { Language } from "@dans-framework/utils"; | ||
|
||
const languages: Language[] = ["en", "nl"]; | ||
|
||
export default languages; |
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,33 +1,33 @@ | ||
import type { Page } from "@dans-framework/pages"; | ||
|
||
const depositPage: Page = { | ||
id: "deposit", | ||
name: { | ||
en: "Deposit", | ||
nl: "Deponeren", | ||
}, | ||
slug: "deposit", | ||
template: "deposit", | ||
inMenu: true, | ||
menuTitle: { | ||
en: "Deposit", | ||
nl: "Deponeren", | ||
}, | ||
}; | ||
|
||
const advisorPage: Page = { | ||
id: "advisor", | ||
name: { | ||
en: "Repository selector", | ||
nl: "Repository selector", | ||
}, | ||
slug: "/", | ||
template: "advisor", | ||
inMenu: true, | ||
menuTitle: { | ||
en: "Repository selector", | ||
nl: "Repository selector", | ||
}, | ||
}; | ||
|
||
export default [ advisorPage, depositPage ]; | ||
import type { Page } from "@dans-framework/pages"; | ||
|
||
const depositPage: Page = { | ||
id: "deposit", | ||
name: { | ||
en: "Deposit", | ||
nl: "Deponeren", | ||
}, | ||
slug: "deposit", | ||
template: "deposit", | ||
inMenu: true, | ||
menuTitle: { | ||
en: "Deposit", | ||
nl: "Deponeren", | ||
}, | ||
}; | ||
|
||
const advisorPage: Page = { | ||
id: "advisor", | ||
name: { | ||
en: "Repository selector", | ||
nl: "Repository selector", | ||
}, | ||
slug: "/", | ||
template: "advisor", | ||
inMenu: true, | ||
menuTitle: { | ||
en: "Repository selector", | ||
nl: "Repository selector", | ||
}, | ||
}; | ||
|
||
export default [advisorPage, depositPage]; |
Oops, something went wrong.