From c7d3e7480395fa7e5cb0104c8c8efd87ecb6a1a4 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 28 Dec 2021 18:03:06 +0100 Subject: attempt at making localization This may or may not be how we actually do localization in the future, however for now this seems doable. I will obviously need to look at how we detect the language, as I think instead of relying on names like "en-US" just have "en", so we don't have to symlink various editions of English to the same file. But for now this is a draft, and the important part of this is rather how the underlying localization works. --- src/app/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/app/main.js') diff --git a/src/app/main.js b/src/app/main.js index d390962..a3a5676 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -2,6 +2,8 @@ const fs = require("fs"); const path = require("path"); const { ipcRenderer } = require("electron"); +const lang = require("../lang"); + var settings = { gamepath: "", zip: "/northstar.zip", @@ -15,7 +17,7 @@ if (fs.existsSync("viper.json")) { settings = {...settings, ...JSON.parse(fs.readFileSync("viper.json", "utf8"))}; settings.zip = path.join(settings.gamepath + "/northstar.zip"); } else { - alert("Game path is not set! Please select the path!"); + alert(lang("gui.missinggamepath")); setpath(); } -- cgit v1.2.3