mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 16:42:27 +03:00
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[key] || undefined;
|
||||
if (!lang[key]) {
|
||||
console.error(`Cannot find translation for requested key: "${key}"`);
|
||||
return key;
|
||||
}
|
||||
|
||||
return lang[key];
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue