diff --git a/build-languages.js b/build-languages.js index 53a9d3b7..26e31364 100644 --- a/build-languages.js +++ b/build-languages.js @@ -67,6 +67,10 @@ class BuildLanguages { if (k in translationsStrings[l]) { throw new Error(`Duplicate translation for key ${k} in lang ${l}.`) } + if ((typeof v) !== 'string') { + // ignoring untranslated strings. + continue + } translationsStrings[l][k] = v } } @@ -90,6 +94,10 @@ class BuildLanguages { if (!(k in reference)) { throw new Error(`File ${filePath} contains unknown keys. Key=${k}.`) } + if ((typeof o[k]) !== 'string') { + // ignoring untranslated strings. + continue + } const newKey = reference[k] this.translationsStrings[l][newKey] = o[k] }