Skip to content

Scheduling infrastructure for absolutely everyone.

chore: remove hardcoded strings (#18156)

Benny Joo656a5bf42359
diff --git a/apps/web/app/future/org/[orgSlug]/embed/page.tsx b/apps/web/app/future/org/[orgSlug]/embed/page.tsx
index 111865eeaf5..cc874931185 100644
--- a/apps/web/app/future/org/[orgSlug]/embed/page.tsx
+++ b/apps/web/app/future/org/[orgSlug]/embed/page.tsx
@@ -15,11 +15,10 @@ const getData = withAppDirSsr<PageProps>(getServerSideProps);
export const generateMetadata = async ({ params, searchParams }: _PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
- const teamName = props.team.name || "Nameless Team";
return await _generateMetadata(
- () => teamName,
- () => teamName
+ (t) => props.team.name || t("nameless_team"),
+ (t) => props.team.name || t("nameless_team")
);
};
diff --git a/apps/web/app/future/org/[orgSlug]/page.tsx b/apps/web/app/future/org/[orgSlug]/page.tsx
index b84f78b9679..745d7e9547e 100644
--- a/apps/web/app/future/org/[orgSlug]/page.tsx
+++ b/apps/web/app/future/org/[orgSlug]/page.tsx
@@ -12,11 +12,10 @@ import TeamPage from "~/team/team-view";
export const generateMetadata = async ({ params, searchParams }: _PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
- const teamName = props.team.name || "Nameless Team";
return await _generateMetadata(
- () => teamName,
- () => teamName
+ (t) => props.team.name || t("nameless_team"),
+ (t) => props.team.name || t("nameless_team")
);
};
diff --git a/apps/web/app/future/org/[orgSlug]/team/[slug]/page.tsx b/apps/web/app/future/org/[orgSlug]/team/[slug]/page.tsx
index b84f78b9679..745d7e9547e 100644
--- a/apps/web/app/future/org/[orgSlug]/team/[slug]/page.tsx
+++ b/apps/web/app/future/org/[orgSlug]/team/[slug]/page.tsx
@@ -12,11 +12,10 @@ import TeamPage from "~/team/team-view";
export const generateMetadata = async ({ params, searchParams }: _PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
- const teamName = props.team.name || "Nameless Team";
return await _generateMetadata(
- () => teamName,
- () => teamName
+ (t) => props.team.name || t("nameless_team"),
+ (t) => props.team.name || t("nameless_team")
);
};
diff --git a/apps/web/app/future/team/[slug]/embed/page.tsx b/apps/web/app/future/team/[slug]/embed/page.tsx
index db822e4a912..889732c6ca3 100644
--- a/apps/web/app/future/team/[slug]/embed/page.tsx
+++ b/apps/web/app/future/team/[slug]/embed/page.tsx
@@ -13,11 +13,10 @@ import LegacyPage from "~/team/team-view";
export const generateMetadata = async ({ params, searchParams }: _PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
- const teamName = props.team.name || "Nameless Team";
return await _generateMetadata(
- () => teamName,
- () => teamName
+ (t) => props.team.name || t("nameless_team"),
+ (t) => props.team.name || t("nameless_team")
);
};
diff --git a/apps/web/app/future/team/[slug]/page.tsx b/apps/web/app/future/team/[slug]/page.tsx
index 73e8b4e81de..8cd056fe225 100644
--- a/apps/web/app/future/team/[slug]/page.tsx
+++ b/apps/web/app/future/team/[slug]/page.tsx
@@ -12,11 +12,10 @@ import LegacyPage from "~/team/team-view";
export const generateMetadata = async ({ params, searchParams }: _PageProps) => {
const props = await getData(buildLegacyCtx(headers(), cookies(), params, searchParams));
- const teamName = props.team.name || "Nameless Team";
return await _generateMetadata(
- () => teamName,
- () => teamName
+ (t) => props.team.name || t("nameless_team"),
+ (t) => props.team.name || t("nameless_team")
);
};
diff --git a/apps/web/components/settings/platform/dashboard/NoPlatformPlan.tsx b/apps/web/components/settings/platform/dashboard/NoPlatformPlan.tsx
index d58b6035b50..8daa38447d9 100644
--- a/apps/web/components/settings/platform/dashboard/NoPlatformPlan.tsx
+++ b/apps/web/components/settings/platform/dashboard/NoPlatformPlan.tsx
@@ -1,11 +1,13 @@
+import { useLocale } from "@calcom/lib/hooks/useLocale";
import { EmptyScreen, Button } from "@calcom/ui";
export default function NoPlatformPlan() {
+ const { t } = useLocale();
return (
<EmptyScreen
Icon="credit-card"
- headline="Subscription needed"
- description="You are not subscribed to a Platform plan."
+ headline={t("subscription_needed")}
+ description={t("subscription_needed_description")}
buttonRaw={
<div className="flex gap-2">
<Button
diff --git a/apps/web/components/settings/platform/oauth-clients/oauth-client-form/index.tsx b/apps/web/components/settings/platform/oauth-clients/oauth-client-form/index.tsx
index 6dc931abbe1..fcc2762444d 100644
--- a/apps/web/components/settings/platform/oauth-clients/oauth-client-form/index.tsx
+++ b/apps/web/components/settings/platform/oauth-clients/oauth-client-form/index.tsx
@@ -188,7 +188,7 @@ export const OAuthClientForm = ({
/>
</div> */}
<div className="mt-6">
- <Tooltip content="URL of your booking page">
+ <Tooltip content={t("booking_redirect_uri")}>
<TextField
type="url"
label="Booking redirect uri"
@@ -199,7 +199,7 @@ export const OAuthClientForm = ({
</Tooltip>
</div>
<div className="mt-6">
- <Tooltip content="URL of the page where your users can cancel their booking">
+ <Tooltip content={t("booking_cancel_redirect_uri")}>
<TextField
type="url"
label="Booking cancel redirect uri"
@@ -210,7 +210,7 @@ export const OAuthClientForm = ({
</Tooltip>
</div>
<div className="mt-6">
- <Tooltip content="URL of the page where your users can reschedule their booking">
+ <Tooltip content={t("booking_reschedule_redirect_uri")}>
<TextField
type="url"
label="Booking reschedule redirect uri"
@@ -242,7 +242,7 @@ export const OAuthClientForm = ({
<div>{permissionsCheckboxes}</div>
</div>
<Button className="mt-6" type="submit" loading={isPending}>
- {defaultValues ? "Update" : "Submit"}
+ {defaultValues ? t("update") : t("submit")}
</Button>
</form>
</div>
diff --git a/apps/web/modules/settings/platform/oauth-clients/[clientId]/edit/edit-webhooks-view.tsx b/apps/web/modules/settings/platform/oauth-clients/[clientId]/edit/edit-webhooks-view.tsx
index b6dca864a9c..4f728089f46 100644
--- a/apps/web/modules/settings/platform/oauth-clients/[clientId]/edit/edit-webhooks-view.tsx
+++ b/apps/web/modules/settings/platform/oauth-clients/[clientId]/edit/edit-webhooks-view.tsx
@@ -96,10 +96,10 @@ export default function EditOAuthClientWebhooks() {
webhookId,
body,
});
- showToast("Webhook updated successfully.", "success");
+ showToast(t("webhook_updated_successfully"), "success");
} else {
await createWebhook(body);
- showToast("Webhook created successfully.", "success");
+ showToast(t("webhook_created_successfully"), "success");
}
await refetchWebhooks();
router.push("/settings/platform/");
diff --git a/apps/web/modules/settings/platform/platform-view.tsx b/apps/web/modules/settings/platform/platform-view.tsx
index cff78782370..7cfa8f9e34f 100644
--- a/apps/web/modules/settings/platform/platform-view.tsx
+++ b/apps/web/modules/settings/platform/platform-view.tsx
@@ -39,7 +39,7 @@ export default function Platform() {
const { mutateAsync, isPending: isDeleting } = useDeleteOAuthClient({
onSuccess: () => {
- showToast("OAuth client deleted successfully", "success");
+ showToast(t("oauth_client_deletion_message"), "success");
refetchClients();
refetchManagedUsers();
},
diff --git a/apps/web/modules/team/team-view.tsx b/apps/web/modules/team/team-view.tsx
index c877318abbf..59feba41e73 100644
--- a/apps/web/modules/team/team-view.tsx
+++ b/apps/web/modules/team/team-view.tsx
@@ -44,7 +44,7 @@ function TeamPage({
const { t } = useLocale();
const isEmbed = useIsEmbed();
const telemetry = useTelemetry();
- const teamName = team.name || "Nameless Team";
+ const teamName = team.name || t("nameless_team");
const isBioEmpty = !team.bio || !team.bio.replace("<p><br></p>", "").length;
const metadata = teamMetadataSchema.parse(team.metadata);
diff --git a/apps/web/modules/upgrade/upgrade-view.tsx b/apps/web/modules/upgrade/upgrade-view.tsx
index cb3e8ff8668..dfeb0c645b9 100644
--- a/apps/web/modules/upgrade/upgrade-view.tsx
+++ b/apps/web/modules/upgrade/upgrade-view.tsx
@@ -33,8 +33,8 @@ export default function UpgradePage() {
<div className="max-w-screen-lg">
{doesUserHaveOrgToUpgrade.data ? (
<EmptyScreen
- headline="Your upgrade is here"
- description="Improve your scheduling experience by upgrading to the new plan and enjoy the new features."
+ headline={t("your_upgrade_is_here")}
+ description={t("your_upgrade_is_here_description")}
Icon="circle-arrow-up"
buttonRaw={
<Button
@@ -47,8 +47,8 @@ export default function UpgradePage() {
/>
) : (
<EmptyScreen
- headline="You are all set"
- description="You are already on the latest plan. Nothing to upgrade. Enjoy the new features and reach out to us with any questions!"
+ headline={t("you_are_all_set")}
+ description={t("you_are_all_set_description")}
Icon="circle-check"
buttonRaw={<Button href="mailto:[email protected]">{t("contact_support")}</Button>}
/>
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json
index 1e0f45dda9e..5c542e38521 100644
--- a/apps/web/public/static/locales/en/common.json
+++ b/apps/web/public/static/locales/en/common.json
@@ -208,6 +208,8 @@
"webhook_created_successfully": "Webhook created successfully!",
"webhook_updated_successfully": "Webhook updated successfully!",
"webhook_removed_successfully": "Webhook removed successfully!",
+ "subscription_needed": "Subscription needed",
+ "subscription_needed_description": "You are not subscribed to a Platform plan.",
"payload_template": "Payload Template",
"dismiss": "Dismiss",
"no_data_yet": "No data yet",
@@ -821,8 +823,13 @@
"file_not_named": "File is not named [idOrSlug]/[user]",
"create_team": "Create Team",
"name": "Name",
+ "nameless_team": "Nameless Team",
+ "oauth_client_deletion_message": "OAuth client deleted successfully",
"create_new_team_description": "Create a new team to collaborate with users.",
"create_new_team": "Create a new team",
+ "booking_redirect_uri": "URL of your booking page",
+ "booking_cancel_redirect_uri": "URL of the page where your users can cancel their booking",
+ "booking_reschedule_redirect_uri": "URL of the page where your users can reschedule their booking",
"open_invitations": "Open Invitations",
"new_team": "New Team",
"create_first_team_and_invite_others": "Create your first team and invite other users to work together.",
@@ -843,6 +850,10 @@
"little_something_about": "A little something about yourself.",
"profile_updated_successfully": "Profile updated successfully",
"your_user_profile_updated_successfully": "Your user profile has been updated successfully.",
+ "your_upgrade_is_here": "Your upgrade is here",
+ "your_upgrade_is_here_description": "Improve your scheduling experience by upgrading to the new plan and enjoy the new features.",
+ "you_are_all_set": "You are all set",
+ "you_are_all_set_description": "You are already on the latest plan. Nothing to upgrade. Enjoy the new features and reach out to us with any questions!",
"user_cannot_found_db": "User seems logged in but cannot be found in the db",
"embed_and_webhooks": "Embed & Webhooks",
"enabled": "Enabled",