From bac3067719624fb6d812f9ebc0554fd0aa48153d Mon Sep 17 00:00:00 2001 From: Arnaud Peich Date: Wed, 19 Oct 2022 15:45:19 +0200 Subject: [PATCH] Fix condition to check that a translation key exists --- app/client/lib/localization.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/lib/localization.ts b/app/client/lib/localization.ts index 102184b6..fb81ad0c 100644 --- a/app/client/lib/localization.ts +++ b/app/client/lib/localization.ts @@ -71,7 +71,7 @@ export async function setupLocale() { * Resolves the translation of the given key, using the given options. */ export function t(key: string, args?: any): string { - if (!i18next.exists(key)) { + if (!i18next.exists(key, args)) { const error = new Error(`Missing translation for key: ${key} and language: ${i18next.language}`); reportError(error); }