From 5f0b285c21bfd5f09900339c2545a2a989da2378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Wed, 15 Mar 2023 13:48:55 +0100 Subject: [PATCH] Rename function to avoid dynamic translation detection in i18next parser --- site/source/components/conversation/NumberInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/source/components/conversation/NumberInput.tsx b/site/source/components/conversation/NumberInput.tsx index 615cae91c..0ae6d554a 100644 --- a/site/source/components/conversation/NumberInput.tsx +++ b/site/source/components/conversation/NumberInput.tsx @@ -112,7 +112,7 @@ function getSerializedUnit( value: number, unit: Unit, locale: string, - t: (s?: string) => string | undefined + translate: (s?: string) => string | undefined ): string { // removing euro, which is a currency not a unit unit = { @@ -128,7 +128,7 @@ function getSerializedUnit( if (!formatUnit) { return ( - t( + translate( serializeUnit(unit) ?.replace(/\/([^\s])/, '/ $1') .replace('/', 'par')