Show an error when using a translation key that does not exist

This commit is contained in:
Alex Tselegidis 2022-06-02 09:48:02 +02:00
parent 264328032b
commit b15a051ee3

View file

@ -7,7 +7,12 @@
return lang;
}
return lang[key] || undefined;
if (!lang[key]) {
console.error(`Cannot find translation for requested key: "${key}"`);
return key;
}
return lang[key];
};
})();
</script>