1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add error logging for missing translation keys

This commit is contained in:
Bill Thornton 2021-06-08 23:48:51 -04:00
parent c8fcb9e664
commit ed67e601aa

View file

@ -188,10 +188,11 @@ import { Events } from 'jellyfin-apiclient';
if (!dictionary || !dictionary[key]) { if (!dictionary || !dictionary[key]) {
dictionary = getDictionary(module, fallbackCulture); dictionary = getDictionary(module, fallbackCulture);
} }
if (!dictionary) { if (!dictionary || !dictionary[key]) {
console.error(`Translation key is missing from dictionary: ${key}`);
return key; return key;
} }
return dictionary[key] || key; return dictionary[key];
} }
function replaceAll(str, find, replace) { function replaceAll(str, find, replace) {