mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	electron: Fix crash on first start due to i18n
This commit is contained in:
		
							parent
							
								
									c25c8c753d
								
							
						
					
					
						commit
						1fbc65b007
					
				@ -1,6 +1,7 @@
 | 
			
		||||
import i18next from "i18next";
 | 
			
		||||
import Backend from "i18next-fs-backend";
 | 
			
		||||
import options from "./options.js";
 | 
			
		||||
import sql_init from "./sql_init.js";
 | 
			
		||||
 | 
			
		||||
export async function initializeTranslations() {
 | 
			
		||||
  // Initialize translations
 | 
			
		||||
@ -17,7 +18,9 @@ export async function initializeTranslations() {
 | 
			
		||||
 | 
			
		||||
function getCurrentLanguage() {
 | 
			
		||||
  let language;
 | 
			
		||||
  language = options.getOption("locale");  
 | 
			
		||||
  if (sql_init.isDbInitialized()) {
 | 
			
		||||
    language = options.getOption("locale");  
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!language) {
 | 
			
		||||
    console.info("Language option not found, falling back to en.");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user