chore: add missing i18n to metadata in settings/platform pages (#17476)

This commit is contained in:
Benny Joo authored and GitHub committed 2024-11-05 02:37:12 +00:00
1 parent ffc4b69edd
commit 42c4c134fa
8 files changed
+24 -17

No files matched your search

@@ -5,7 +5,7 @@ import EditWebhooksView from "~/settings/platform/oauth-clients/[clientId]/edit/
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("oAuth_client_updation_form"),
(t) => t("webhook_update_form"),
() => ""
);
@@ -1,14 +1,11 @@
import type { PageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import CreateNewView from "~/settings/platform/oauth-clients/create-new-view";
export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const p = { ...params, ...searchParams };
const clientId = p?.clientId ?? "";
export const generateMetadata = async () => {
return await _generateMetadata(
() => `OAuth client ${!!clientId ? "updation" : "creation"} form`,
(t) => t("oAuth_client_creation_form"),
() => ""
);
};
+2 -2
View File
@@ -5,8 +5,8 @@ import PlatformView from "~/settings/platform/platform-view";
export const generateMetadata = async () => {
return await _generateMetadata(
() => "Platform",
() => "Manage everything related to platform."
(t) => t("platform"),
(t) => t("platform_description")
);
};
@@ -5,7 +5,7 @@ import PlatformPlansView from "~/settings/platform/plans/platform-plans-view";
export const generateMetadata = async () => {
return await _generateMetadata(
() => "Platform plans",
(t) => `${t("platform")} ${t("plans")}`,
() => ""
);
};
@@ -85,10 +85,10 @@ export default function EditOAuthClient() {
<div className="border-subtle mx-auto block justify-between rounded-t-lg border px-4 py-6 sm:flex sm:px-6">
<div className="flex w-full flex-col">
<h1 className="font-cal text-emphasis mb-1 text-xl font-semibold leading-5 tracking-wide">
OAuth client updation form
{t("oAuth_client_updation_form")}
</h1>
<p className="text-default text-sm ltr:mr-4 rtl:ml-4">
This is the form to edit an existing OAuth client
{t("oAuth_client_updation_form_description")}
</p>
</div>
</div>
@@ -42,14 +42,16 @@ export default function EditOAuthClientWebhooks() {
if (isPlatformUser && isPaidUser) {
return (
<div>
<Shell title={t("oAuth_client_updation_form")} isPlatformUser={true}>
<Shell title={t("webhook_update_form")} isPlatformUser={true}>
<div className="m-2 md:mx-5">
<div className="border-subtle mx-auto block justify-between rounded-t-lg border px-4 py-6 sm:flex sm:px-6">
<div className="flex w-full flex-col">
<h1 className="font-cal text-emphasis mb-1 text-xl font-semibold leading-5 tracking-wide">
Webhook update form
{t("webhook_update_form")}
</h1>
<p className="text-default text-sm ltr:mr-4 rtl:ml-4">Add a webhook to your OAuthClient.</p>
<p className="text-default text-sm ltr:mr-4 rtl:ml-4">
{t("webhook_update_form_description")}
</p>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/navigation";
import Shell from "@calcom/features/shell/Shell";
import { ErrorCode } from "@calcom/lib/errorCodes";
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { PERMISSIONS_GROUPED_MAP } from "@calcom/platform-constants/permissions";
import { showToast } from "@calcom/ui";
@@ -18,6 +19,7 @@ import { OAuthClientForm } from "@components/settings/platform/oauth-clients/oau
export default function CreateOAuthClient() {
const searchParams = useCompatSearchParams();
const router = useRouter();
const { t } = useLocale();
const clientId = searchParams?.get("clientId") || "";
const { isUserLoading, isPlatformUser, isPaidUser } = useGetUserAttributes();
@@ -62,15 +64,15 @@ export default function CreateOAuthClient() {
if (isPlatformUser && isPaidUser) {
return (
<div>
<Shell title={`OAuth client ${!!clientId ? "updation" : "creation"} form`} isPlatformUser={true}>
<Shell title={t("oAuth_client_creation_form")} isPlatformUser={true}>
<div className="m-2 md:mx-5">
<div className="border-subtle mx-auto block justify-between rounded-t-lg border px-4 py-6 sm:flex sm:px-6">
<div className="flex w-full flex-col">
<h1 className="font-cal text-emphasis mb-1 text-xl font-semibold leading-5 tracking-wide">
OAuth client creation form
{t("oAuth_client_creation_form")}
</h1>
<p className="text-default text-sm ltr:mr-4 rtl:ml-4">
This is the form to create a new OAuth client
{t("oAuth_client_creation_form_description")}
</p>
</div>
</div>
@@ -198,6 +198,8 @@
"webhook_disabled": "Webhook Disabled",
"webhook_response": "Webhook response",
"webhook_test": "Webhook test",
"webhook_update_form": "Webhook update form",
"webhook_update_form_description": "Add a webhook to your OAuthClient.",
"manage_your_webhook": "Manage your webhook",
"webhook_created_successfully": "Webhook created successfully!",
"webhook_updated_successfully": "Webhook updated successfully!",
@@ -2140,6 +2142,7 @@
"set_up_your_organization": "Set up your organization",
"set_up_your_platform_organization": "Set up your platform",
"organizations_description": "Organizations are shared environments where teams can create shared event types, apps, workflows and more.",
"plans": "Plans",
"platform": "Platform",
"platform_description": "Manage everything related to platform.",
"platform_organization_description": "Cal.com Platform lets you integrate scheduling effortlessly into your app using platform apis and atoms.",
@@ -2277,7 +2280,10 @@
"seat_options_doesnt_multiple_durations": "Seat option doesn't support multiple durations",
"include_calendar_event": "Include calendar event",
"oAuth": "OAuth",
"oAuth_client_creation_form": "OAuth client creation form",
"oAuth_client_creation_form_description": "This is the form to create a new OAuth client",
"oAuth_client_updation_form": "OAuth client updation form",
"oAuth_client_updation_form_description": "This is the form to edit an existing OAuth client",
"recently_added": "Recently added",
"connect_all_calendars": "Connect all your calendars",
"connect_all_calendars_description": "{{appName}} reads availability from all your existing calendars.",