aboutsummaryrefslogtreecommitdiff
path: root/src/app/js/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/js/settings.js')
-rw-r--r--src/app/js/settings.js9
1 files changed, 6 insertions, 3 deletions
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>`
}