1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-26 22:56:23 -04:00

Console warnings for missing translations on development builds

This commit is contained in:
Bogdan
2024-11-04 15:24:45 +02:00
committed by Mark McDowall
parent 5bc943583c
commit 67a1ecb0fe
4 changed files with 13 additions and 2 deletions
@@ -27,6 +27,12 @@ export default function translate(
key: string,
tokens: Record<string, string | number | boolean> = {}
) {
const { isProduction = true } = window.Sonarr;
if (!isProduction && !(key in translations)) {
console.warn(`Missing translation for key: ${key}`);
}
const translation = translations[key] || key;
tokens.appName = 'Sonarr';