From 14c3028c2a5c54111bb4bdbdb7d7a92dd5de0727 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 f80967618f..61fd40cc41 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",