Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 584ba24

Browse files
committed
client: Use translations for critical error
1 parent 22761d8 commit 584ba24

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

src/public/app/desktop.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ import macInit from './services/mac_init.js';
88
import electronContextMenu from "./menus/electron_context_menu.js";
99
import DesktopLayout from "./layouts/desktop_layout.js";
1010
import glob from "./services/glob.js";
11+
import { t } from "./services/i18n.js";
1112

1213
bundleService.getWidgetBundlesByParent().then(widgetBundles => {
1314
appContext.setLayout(new DesktopLayout(widgetBundles));
1415
appContext.start()
1516
.catch((e) => {
1617
toastService.showPersistent({
17-
title: "Critical error",
18+
title: t("toast.critical-error.title"),
1819
icon: "alert",
19-
message: `A critical error has occurred which prevents the client application from starting:\n\n${e.message}\n\nThis is most likely caused by a script failing in an unexpected way. Try starting the application in safe mode and addressing the issue.`,
20+
message: t("toast.critical-error.message", { message: e.message }),
2021
});
2122
console.error("Critical error occured", e);
2223
});
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{
2-
"about": {
3-
"title": "About TriliumNext Notes",
4-
"homepage": "Homepage:",
5-
"app_version": "App version:",
6-
"db_version": "DB version:",
7-
"sync_version": "Sync version:",
8-
"build_date": "Build date:",
9-
"build_revision": "Build revision:",
10-
"data_directory": "Data directory:"
2+
"about": {
3+
"title": "About TriliumNext Notes",
4+
"homepage": "Homepage:",
5+
"app_version": "App version:",
6+
"db_version": "DB version:",
7+
"sync_version": "Sync version:",
8+
"build_date": "Build date:",
9+
"build_revision": "Build revision:",
10+
"data_directory": "Data directory:"
11+
},
12+
"toast": {
13+
"critical-error": {
14+
"title": "Critical error",
15+
"message": "A critical error has occurred which prevents the client application from starting:\n\n{{message}}\n\nThis is most likely caused by a script failing in an unexpected way. Try starting the application in safe mode and addressing the issue."
1116
}
12-
}
17+
}
18+
}

0 commit comments

Comments
 (0)