« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js
index b2f5aa0b..4d51d7f7 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1332,6 +1332,9 @@ async function processLanguageFile(file) {
     }
     delete json['meta.languageName'];
 
+    const hidden = json['meta.hidden'] ?? false;
+    delete json['meta.hidden'];
+
     if (json['meta.baseDirectory']) {
         logWarn`(${code}) Language JSON still has unused meta.baseDirectory`;
         delete json['meta.baseDirectory'];
@@ -1341,6 +1344,7 @@ async function processLanguageFile(file) {
     language.code = code;
     language.intlCode = intlCode;
     language.name = name;
+    language.hidden = hidden;
     language.escapeHTML = string => he.encode(string, {useNamedReferences: true});
     language.strings = json;
     return language;
@@ -1972,7 +1976,7 @@ async function main() {
                 const directory = path[1];
 
                 const localizedPaths = Object.fromEntries(Object.entries(languages)
-                    .filter(([ key ]) => key !== 'default')
+                    .filter(([ key, language ]) => key !== 'default' && !language.hidden)
                     .map(([ key, language ]) => [language.code, writePage.paths(
                         (language === finalDefaultLanguage ? '' : language.code),
                         'localized.' + pageSubKey,