Show an error when using a translation key that does not exist
This commit is contained in:
parent
264328032b
commit
b15a051ee3
1 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,12 @@
|
||||||
return lang;
|
return lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
return lang[key] || undefined;
|
if (!lang[key]) {
|
||||||
|
console.error(`Cannot find translation for requested key: "${key}"`);
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
return lang[key];
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue