mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	chore(server): improve & translate DB not initialized message
This commit is contained in:
		| @@ -424,5 +424,9 @@ | |||||||
|     "board_status_todo": "To Do", |     "board_status_todo": "To Do", | ||||||
|     "board_status_progress": "In Progress", |     "board_status_progress": "In Progress", | ||||||
|     "board_status_done": "Done" |     "board_status_done": "Done" | ||||||
|  |   }, | ||||||
|  |   "sql_init": { | ||||||
|  |     "db_not_initialized_desktop": "DB not initialized, please follow on-screen instructions.", | ||||||
|  |     "db_not_initialized_server": "DB not initialized, please visit setup page - http://[your-server-host]:{{port}} to see instructions on how to initialize Trilium." | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -17,6 +17,7 @@ import zipImportService from "./import/zip.js"; | |||||||
| import password from "./encryption/password.js"; | import password from "./encryption/password.js"; | ||||||
| import backup from "./backup.js"; | import backup from "./backup.js"; | ||||||
| import eventService from "./events.js"; | import eventService from "./events.js"; | ||||||
|  | import { t } from "i18next"; | ||||||
|  |  | ||||||
| export const dbReady = deferred<void>(); | export const dbReady = deferred<void>(); | ||||||
|  |  | ||||||
| @@ -37,7 +38,11 @@ function isDbInitialized() { | |||||||
|  |  | ||||||
| async function initDbConnection() { | async function initDbConnection() { | ||||||
|     if (!isDbInitialized()) { |     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; |         return; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user