From a526f963e28cbad09e22822bc2bff5a3a88022d3 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 10 May 2022 21:56:45 -0300 Subject: provide intl code through json --- src/upd8.js | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit 1.3.0-6-gf8a5