mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
i18n: Move translations to backend serve
This commit is contained in:
parent
784891409f
commit
d14cf7c246
@ -4,37 +4,7 @@ await library_loader.requireLibrary(library_loader.I18NEXT);
|
||||
|
||||
i18next.init({
|
||||
lng: "ro",
|
||||
debug: true,
|
||||
resources: {
|
||||
en: {
|
||||
translation: {
|
||||
about: {
|
||||
title: "About TriliumNext Notes",
|
||||
homepage: "Homepage:",
|
||||
app_version: "App version:",
|
||||
db_version: "DB version:",
|
||||
sync_version: "Sync version:",
|
||||
build_date: "Build date:",
|
||||
build_revision: "Build revision:",
|
||||
data_directory: "Data directory:"
|
||||
}
|
||||
}
|
||||
},
|
||||
ro: {
|
||||
translation: {
|
||||
about: {
|
||||
title: "Despre TriliumNext Notes",
|
||||
homepage: "Site web:",
|
||||
app_version: "Versiune aplicație:",
|
||||
db_version: "Versiune bază de date:",
|
||||
sync_version: "Versiune sincronizare:",
|
||||
build_date: "Data compilării:",
|
||||
build_revision: "Revizia compilării:",
|
||||
data_directory: "Directorul de date:"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
debug: true
|
||||
});
|
||||
|
||||
export const t = i18next.t;
|
14
src/public/translations/en.json
Normal file
14
src/public/translations/en.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"translation": {
|
||||
"about": {
|
||||
"title": "About TriliumNext Notes",
|
||||
"homepage": "Homepage:",
|
||||
"app_version": "App version:",
|
||||
"db_version": "DB version:",
|
||||
"sync_version": "Sync version:",
|
||||
"build_date": "Build date:",
|
||||
"build_revision": "Build revision:",
|
||||
"data_directory": "Data directory:"
|
||||
}
|
||||
}
|
||||
}
|
14
src/public/translations/ro.json
Normal file
14
src/public/translations/ro.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"translation": {
|
||||
"about": {
|
||||
"title": "Despre TriliumNext Notes",
|
||||
"homepage": "Site web:",
|
||||
"app_version": "Versiune aplicație:",
|
||||
"db_version": "Versiune bază de date:",
|
||||
"sync_version": "Versiune sincronizare:",
|
||||
"build_date": "Data compilării:",
|
||||
"build_revision": "Revizia compilării:",
|
||||
"data_directory": "Directorul de date:"
|
||||
}
|
||||
}
|
||||
}
|
@ -70,7 +70,9 @@ function register(app: express.Application) {
|
||||
|
||||
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/')))
|
||||
// i18n
|
||||
app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')));
|
||||
app.use(`/${assetPath}/translations/`, persistentCacheStatic(path.join(srcRoot, "public", "translations/")));
|
||||
}
|
||||
|
||||
export = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user