diff --git a/frontend/src/Utilities/String/translate.ts b/frontend/src/Utilities/String/translate.ts index 8081995ab..f4cab8ec6 100644 --- a/frontend/src/Utilities/String/translate.ts +++ b/frontend/src/Utilities/String/translate.ts @@ -27,6 +27,12 @@ export default function translate( key: string, tokens: Record = {} ) { + const { isProduction = true } = window.Radarr; + + if (!isProduction && !(key in translations)) { + console.warn(`Missing translation for key: ${key}`); + } + const translation = translations[key] || key; tokens.appName = 'Radarr'; diff --git a/frontend/typings/Globals.d.ts b/frontend/typings/Globals.d.ts index 29136ac48..21e40447b 100644 --- a/frontend/typings/Globals.d.ts +++ b/frontend/typings/Globals.d.ts @@ -7,5 +7,6 @@ interface Window { theme: string; urlBase: string; version: string; + isProduction: boolean; }; }