mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	client: Use translations for critical error
This commit is contained in:
		
							parent
							
								
									22761d8a00
								
							
						
					
					
						commit
						584ba246e3
					
				@ -8,15 +8,16 @@ import macInit from './services/mac_init.js';
 | 
			
		||||
import electronContextMenu from "./menus/electron_context_menu.js";
 | 
			
		||||
import DesktopLayout from "./layouts/desktop_layout.js";
 | 
			
		||||
import glob from "./services/glob.js";
 | 
			
		||||
import { t } from "./services/i18n.js";
 | 
			
		||||
 | 
			
		||||
bundleService.getWidgetBundlesByParent().then(widgetBundles => {
 | 
			
		||||
    appContext.setLayout(new DesktopLayout(widgetBundles));    
 | 
			
		||||
    appContext.start()
 | 
			
		||||
        .catch((e) => {
 | 
			
		||||
            toastService.showPersistent({
 | 
			
		||||
                title: "Critical error",
 | 
			
		||||
                title: t("toast.critical-error.title"),
 | 
			
		||||
                icon: "alert",
 | 
			
		||||
                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.`,
 | 
			
		||||
                message: t("toast.critical-error.message", { message: e.message }),
 | 
			
		||||
            });
 | 
			
		||||
            console.error("Critical error occured", e);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
@ -8,5 +8,11 @@
 | 
			
		||||
    "build_date": "Build date:",
 | 
			
		||||
    "build_revision": "Build revision:",
 | 
			
		||||
    "data_directory": "Data directory:"
 | 
			
		||||
  },
 | 
			
		||||
  "toast": {
 | 
			
		||||
    "critical-error": {
 | 
			
		||||
      "title": "Critical error",
 | 
			
		||||
      "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."
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user