mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +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 i18next from "i18next";
|
||||||
import Backend from "i18next-fs-backend";
|
import Backend from "i18next-fs-backend";
|
||||||
import options from "./options.js";
|
import options from "./options.js";
|
||||||
|
import sql_init from "./sql_init.js";
|
||||||
|
|
||||||
export async function initializeTranslations() {
|
export async function initializeTranslations() {
|
||||||
// Initialize translations
|
// Initialize translations
|
||||||
@ -17,7 +18,9 @@ export async function initializeTranslations() {
|
|||||||
|
|
||||||
function getCurrentLanguage() {
|
function getCurrentLanguage() {
|
||||||
let language;
|
let language;
|
||||||
|
if (sql_init.isDbInitialized()) {
|
||||||
language = options.getOption("locale");
|
language = options.getOption("locale");
|
||||||
|
}
|
||||||
|
|
||||||
if (!language) {
|
if (!language) {
|
||||||
console.info("Language option not found, falling back to en.");
|
console.info("Language option not found, falling back to en.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user