From a48c4a8a51b9afc2aa84193e8cc34cdab00a555b Mon Sep 17 00:00:00 2001 From: Udit Takkar Date: Tue, 31 Oct 2023 18:42:21 +0530 Subject: [PATCH] fix: use 18n --- apps/web/pages/event-types/[type]/index.tsx | 7 ++++--- apps/web/public/static/locales/en/common.json | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/pages/event-types/[type]/index.tsx b/apps/web/pages/event-types/[type]/index.tsx index 7265457c6f..5c48faa773 100644 --- a/apps/web/pages/event-types/[type]/index.tsx +++ b/apps/web/pages/event-types/[type]/index.tsx @@ -342,9 +342,10 @@ const EventTypePage = (props: EventTypeSetupProps) => { ctx.addIssue({ code: z.ZodIssueCode.custom, path: [eventLocationType?.defaultValueVariable ?? "link"], - message: `Invalid URL for ${eventLocationType.label}. ${ - sampleUrl ? `Sample URL: ${sampleUrl}` : "" - }`, + message: t("invalid_url_error_message", { + label: eventLocationType.label, + sampleUrl: sampleUrl ?? "https://cal.com", + }), }); } return; diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index f0b6749d7b..c4ebeca01b 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -1222,6 +1222,7 @@ "organizer_name_variable": "Organizer name", "app_upgrade_description": "In order to use this feature, you need to upgrade to a Pro account.", "invalid_number": "Invalid phone number", + "invalid_url_error_message": "Invalid URL for {{label}}. Sample URL: {{sampleUrl}}", "navigate": "Navigate", "open": "Open", "close": "Close",