chore(server): improve & translate DB not initialized message

This commit is contained in:
Elian Doran
2025-09-12 12:49:25 +03:00
parent 0e5e439f69
commit d6e6e78acc
2 changed files with 10 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ import zipImportService from "./import/zip.js";
import password from "./encryption/password.js";
import backup from "./backup.js";
import eventService from "./events.js";
import { t } from "i18next";
export const dbReady = deferred<void>();
@@ -37,7 +38,11 @@ function isDbInitialized() {
async function initDbConnection() {
if (!isDbInitialized()) {
log.info(`DB not initialized, please visit setup page` + (isElectron ? "" : ` - http://[your-server-host]:${port} to see instructions on how to initialize Trilium.`));
if (isElectron) {
log.info(t("sql_init.db_not_initialized_desktop"));
} else {
log.info(t("sql_init.db_not_initialized_server", { port }));
}
return;
}