chore: remove hardcoded strings (#18156)
This commit is contained in:
@@ -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")
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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")
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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")
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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")
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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")
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
+2
-2
@@ -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/");
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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:support@cal.com">{t("contact_support")}</Button>}
|
||||
/>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user