Docs: add better error message when generateTranslations.ts fails

This commit is contained in:
Pieter Vander Vennet 2025-08-17 15:30:11 +02:00
parent ecf88f332c
commit e9bcc70049

View file

@ -567,6 +567,10 @@ function MergeTranslation(source: any, target: any, language: string, context: s
const sourceV = source[key]
const targetV = target[keyRemapping?.get(key) ?? key]
if(targetV === undefined){
throw `Merging translations failed; targetV is undefined for context ${context}; but we are trying to add ${sourceV} (${key}) to it`
}
if (typeof sourceV === "string") {
if (sourceV === "") {
console.log("Ignoring empty string in the translations")