mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
i18n: Implement HTTP backend loader
This commit is contained in:
parent
d4bf162e92
commit
5ea35dd851
@ -2,9 +2,14 @@ import library_loader from "./library_loader.js";
|
||||
|
||||
await library_loader.requireLibrary(library_loader.I18NEXT);
|
||||
|
||||
i18next.init({
|
||||
lng: "ro",
|
||||
debug: true
|
||||
});
|
||||
await i18next
|
||||
.use(i18nextHttpBackend)
|
||||
.init({
|
||||
lng: "ro",
|
||||
debug: true,
|
||||
backend: {
|
||||
loadPath: `/${window.glob.assetPath}/translations/{{lng}}/{{ns}}.json`
|
||||
}
|
||||
});
|
||||
|
||||
export const t = i18next.t;
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"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:"
|
||||
}
|
||||
}
|
||||
}
|
12
src/public/translations/en/translation.json
Normal file
12
src/public/translations/en/translation.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"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:"
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"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:"
|
||||
}
|
||||
}
|
||||
}
|
12
src/public/translations/ro/translation.json
Normal file
12
src/public/translations/ro/translation.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"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:"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user