1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -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
+1 -1
View File
@@ -56,7 +56,7 @@ function Legend(props) {
if (showCutoffUnmetIcon) {
iconsToShow.push(
<LegendIconItem
name={translate('Cutoff Not Met')}
name={translate('CutoffNotMet')}
icon={icons.EPISODE_FILE}
kind={kinds.WARNING}
fullColorEvents={fullColorEvents}
@@ -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';