From ed67e601aa395fdf9d75ff9af976d8397888807a Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 8 Jun 2021 23:48:51 -0400 Subject: [PATCH] Add error logging for missing translation keys --- src/scripts/globalize.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scripts/globalize.js b/src/scripts/globalize.js index dfd9071957..c66ed2b7f4 100644 --- a/src/scripts/globalize.js +++ b/src/scripts/globalize.js @@ -188,10 +188,11 @@ import { Events } from 'jellyfin-apiclient'; if (!dictionary || !dictionary[key]) { dictionary = getDictionary(module, fallbackCulture); } - if (!dictionary) { + if (!dictionary || !dictionary[key]) { + console.error(`Translation key is missing from dictionary: ${key}`); return key; } - return dictionary[key] || key; + return dictionary[key]; } function replaceAll(str, find, replace) {