mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
i18n: Set up client dependency to i18next
This commit is contained in:
parent
33d6d51d59
commit
10ec7d6b2b
5
src/public/app/services/i18n.js
Normal file
5
src/public/app/services/i18n.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import library_loader from "./library_loader.js";
|
||||||
|
|
||||||
|
await library_loader.requireLibrary(library_loader.I18NEXT);
|
||||||
|
|
||||||
|
export const t = i18next.t;
|
@ -72,6 +72,8 @@ const MARKJS = {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const I18NEXT = { js: [ "node_modules/i18next/i18next.min.js" ] };
|
||||||
|
|
||||||
async function requireLibrary(library) {
|
async function requireLibrary(library) {
|
||||||
if (library.css) {
|
if (library.css) {
|
||||||
library.css.map(cssUrl => requireCss(cssUrl));
|
library.css.map(cssUrl => requireCss(cssUrl));
|
||||||
@ -129,5 +131,6 @@ export default {
|
|||||||
FORCE_GRAPH,
|
FORCE_GRAPH,
|
||||||
MERMAID,
|
MERMAID,
|
||||||
EXCALIDRAW,
|
EXCALIDRAW,
|
||||||
MARKJS
|
MARKJS,
|
||||||
|
I18NEXT
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,8 @@ function register(app: express.Application) {
|
|||||||
app.use(`/${assetPath}/node_modules/split.js/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/split.js/dist/')));
|
app.use(`/${assetPath}/node_modules/split.js/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/split.js/dist/')));
|
||||||
|
|
||||||
app.use(`/${assetPath}/node_modules/panzoom/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/panzoom/dist/')));
|
app.use(`/${assetPath}/node_modules/panzoom/dist/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/panzoom/dist/')));
|
||||||
|
|
||||||
|
app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')))
|
||||||
}
|
}
|
||||||
|
|
||||||
export = {
|
export = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user