i18n(backend_log): translate messages

This commit is contained in:
Panagiotis Papadopoulos 2025-01-11 13:41:32 +01:00 committed by Panagiotis Papadopoulos
parent dcfdb67539
commit 903988fec5
3 changed files with 11 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import { join } from "path";
import dateUtils from "../../services/date_utils.js";
import dataDir from "../../services/data_dir.js";
import log from "../../services/log.js";
import { t } from "i18next";
const { LOG_DIR } = dataDir;
@ -19,11 +20,11 @@ async function getBackendLog() {
// most probably the log file does not exist yet - https://github.com/zadam/trilium/issues/1977
if (isErrorInstance && "code" in e && e.code === "ENOENT") {
log.error(e);
return `The backend log file '${fileName}' does not exist (yet).`;
return t("backend_log.log-does-not-exist", { fileName });
}
log.error(isErrorInstance ? e : `Reading the backend log '${fileName}' failed with an unknown error: '${e}'.`);
return `Reading the backend log '${fileName}' failed.`;
return t("backend_log.reading-log-failed", { fileName });
}
}

View File

@ -193,5 +193,9 @@
"test_sync": {
"not-configured": "Der Synchronisations-Server-Host ist nicht konfiguriert. Bitte konfiguriere zuerst die Synchronisation.",
"successful": "Die Server-Verbindung wurde erfolgreich hergestellt, die Synchronisation wurde gestartet."
},
"backend_log": {
"log-does-not-exist": "Die Backend-Log-Datei '{{ fileName }}' existiert (noch) nicht.",
"reading-log-failed": "Das Lesen der Backend-Log-Datei '{{ fileName }}' ist fehlgeschlagen."
}
}

View File

@ -246,5 +246,9 @@
"new-note": "New note",
"duplicate-note-suffix": "(dup)",
"duplicate-note-title": "{{ noteTitle }} {{ duplicateNoteSuffix }}"
},
"backend_log": {
"log-does-not-exist": "The backend log file '{{ fileName }}' does not exist (yet).",
"reading-log-failed": "Reading the backend log file '{{ fileName }}' failed."
}
}