aboutsummaryrefslogtreecommitdiff
path: root/src/app/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/js')
-rw-r--r--src/app/js/browser.js8
-rw-r--r--src/app/js/mods.js10
-rw-r--r--src/app/js/settings.js9
3 files changed, 15 insertions, 12 deletions
diff --git a/src/app/js/browser.js b/src/app/js/browser.js
index f3b11c9..8283e9b 100644
--- a/src/app/js/browser.js
+++ b/src/app/js/browser.js
@@ -231,7 +231,7 @@ var Browser = {
return
}
- Browser.msg(`<button id="loadmore">${lang("gui.browser.loadmore")}</button>`);
+ Browser.msg(`<button id="loadmore">${lang("gui.browser.load_more")}</button>`);
loadmore.addEventListener("click", () => {
Browser.loadpkgs(pkgs);
Browser.endoflist(! pkgs.length);
@@ -427,7 +427,7 @@ function BrowserEl(properties) {
<button class="visual">${properties.version}</button>
<button class="visual">
- ${lang("gui.browser.madeby")}
+ ${lang("gui.browser.made_by")}
${properties.author}
</button>
</div>
@@ -490,8 +490,8 @@ ipcRenderer.on("no-internet", (event, modname) => {
new Toast({
timeout: 10000,
scheme: "error",
- title: lang("gui.toast.noInternet.title"),
- description: lang("gui.toast.noInternet.desc")
+ title: lang("gui.toast.title.no_internet"),
+ description: lang("gui.toast.desc.no_internet")
})
})
diff --git a/src/app/js/mods.js b/src/app/js/mods.js
index 696f01a..b17cadd 100644
--- a/src/app/js/mods.js
+++ b/src/app/js/mods.js
@@ -63,7 +63,7 @@ mods.load = (mods_obj) => {
<button class="visual">${version.format(mod_details.version)}</button>
<button class="visual">
- ${lang("gui.browser.madeby")}
+ ${lang("gui.browser.made_by")}
${mod.author || lang("gui.mods.unknown_author")}
</button>
</div>
@@ -183,11 +183,11 @@ mods.load = (mods_obj) => {
mods.remove = (mod) => {
if (mod.toLowerCase().match(/^northstar\./)) {
- if (! confirm(lang("gui.mods.required.confirm"))) {
+ if (! confirm(lang("gui.mods.required_confirm"))) {
return;
}
} else if (mod == "allmods") {
- if (! confirm(lang("gui.mods.removeall.confirm"))) {
+ if (! confirm(lang("gui.mods.remove_all.confirm"))) {
return;
}
}
@@ -197,11 +197,11 @@ mods.remove = (mod) => {
mods.toggle = (mod) => {
if (mod.toLowerCase().match(/^northstar\./)) {
- if (! confirm(lang("gui.mods.required.confirm"))) {
+ if (! confirm(lang("gui.mods.required_confirm"))) {
return;
}
} else if (mod == "allmods") {
- if (! confirm(lang("gui.mods.toggleall.confirm"))) {
+ if (! confirm(lang("gui.mods.toggle_all_confirm"))) {
return;
}
}
diff --git a/src/app/js/settings.js b/src/app/js/settings.js
index 69ee7b8..db29300 100644
--- a/src/app/js/settings.js
+++ b/src/app/js/settings.js
@@ -65,15 +65,18 @@ var Settings = {
let div = options[i].querySelector("select");
div.innerHTML = "";
- let langs = fs.readdirSync(__dirname + "/../lang");
+ let lang_dir = __dirname + "/../lang";
+ let langs = fs.readdirSync(lang_dir);
for (let i in langs) {
+ let lang_file = require(lang_dir + "/" + langs[i]);
let lang_no_extension = langs[i].replace(/\..*$/, "");
- let title = lang("lang.title", lang_no_extension);
- if (title == "lang.title") {
+ if (! lang_file.lang || ! lang_file.lang.title) {
continue;
}
+ let title = lang_file.lang.title;
+
if (title) {
div.innerHTML += `<option value="${lang_no_extension}">${title}</option>`
}