Rename function to avoid dynamic translation detection in i18next parser

pull/2543/head
Jérémy Rialland 2023-03-15 13:48:55 +01:00 committed by Jérémy Rialland
parent 1c0fec52cf
commit 5f0b285c21
1 changed files with 2 additions and 2 deletions

View File

@ -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')