From 57aeddf997d1a71570ec2e339ee33a219baeedad Mon Sep 17 00:00:00 2001 From: Anna Manchenkova Date: Mon, 5 Jun 2023 14:43:21 +0300 Subject: [PATCH] fix: incorrect display of the localized name --- web/libs/shared/src/lib/utils/localize-schema.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/libs/shared/src/lib/utils/localize-schema.ts b/web/libs/shared/src/lib/utils/localize-schema.ts index 2e37f6a7..28db0e38 100644 --- a/web/libs/shared/src/lib/utils/localize-schema.ts +++ b/web/libs/shared/src/lib/utils/localize-schema.ts @@ -19,7 +19,10 @@ export const localizeSchemaAdditionalKeys = ( schemaKeys.add(String(match[1])); } - schemaKeys.forEach((key) => (plainSchema = plainSchema.replace(key, additionalKeys[key]?.[lang] || ''))); + schemaKeys.forEach( + (key) => + (plainSchema = plainSchema.replace(REGEX_PARSE_SCHEMA_LOCALIZATION, additionalKeys[key]?.[lang] || '')) + ); return JSON.parse(plainSchema); }