« get me outta code hell

provide intl code through json - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-05-10 21:56:45 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-05-10 21:56:45 -0300
commita526f963e28cbad09e22822bc2bff5a3a88022d3 (patch)
tree99f8ff8009c6cc18d48d01917e61f090d70c4412 /src
parent861c4086c6355f6551f6d1dccbf6d9766c6b1d15 (diff)
provide intl code through json
Diffstat (limited to 'src')
-rwxr-xr-xsrc/upd8.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 6f04599a..bca6a0d0 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1238,6 +1238,9 @@ async function processLanguageFile(file) {
     }
     delete json['meta.languageCode'];
 
+    const intlCode = json['meta.languageIntlCode'] ?? null;
+    delete json['meta.languageIntlCode'];
+
     const name = json['meta.languageName'];
     if (!name) {
         throw new Error(`Missing language name (${code})`);
@@ -1251,6 +1254,7 @@ async function processLanguageFile(file) {
 
     const language = new Language();
     language.code = code;
+    language.intlCode = intlCode;
     language.name = name;
     language.escapeHTML = string => he.encode(string, {useNamedReferences: true});
     language.strings = json;