fix: translations for insights, routing-forms, apps store, etc (#16933)

* remove outdated translations for insights

* use i18n strings for insights

* use i18n strings for routing forms

* use i18n strings for apps store

* fix more pages

* refactor

* fix
This commit is contained in:
Benny Joo authored and GitHub committed 2024-10-04 09:45:51 -03:00
1 parent 7d4653296e
commit 7b5a2726ab
40 files changed
+51 -67

No files matched your search

@@ -1,5 +1,5 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
import type { PageProps } from "app/_types";
import { PageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { GetServerSidePropsResult } from "next";
@@ -27,12 +27,12 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
const legacyContext = buildLegacyCtx(headers(), cookies(), params, searchParams);
const data = await getData(legacyContext);
const form = "form" in data ? (data.form as { name?: string; description?: string }) : null;
const formName = form?.name ?? "Routing Forms";
const formDescription = form?.description ?? "";
const formName = form?.name;
const formDescription = form?.description;
return await _generateMetadata(
() => formName,
() => formDescription
(t) => formName ?? t("routing_forms"),
(t) => formDescription ?? t("routing_forms_description")
);
};
@@ -11,8 +11,8 @@ import CategoryPage, { type PageProps } from "~/apps/categories/[category]/categ
export const generateMetadata = async () => {
return await _generateMetadata(
() => "Apps Store",
() => "Connecting people, technology and the workplace."
(t) => t("app_store"),
(t) => t("app_store_description")
);
};
+2 -2
View File
@@ -8,8 +8,8 @@ import Page from "~/apps/categories/categories-view";
export const generateMetadata = async () => {
return await _generateMetadata(
() => "Apps Store",
() => "Connecting people, technology and the workplace."
(t) => t("app_store"),
(t) => t("app_store_description")
);
};
@@ -12,8 +12,8 @@ const getData = withAppDirSsg<Y>(getStaticProps);
export const generateMetadata = async () =>
await _generateMetadata(
() => "Bookings",
() => "Create events to share for people to book on your calendar."
(t) => t("bookings"),
(t) => t("bookings_description")
);
export const generateStaticParams = async () => {
+1 -1
View File
@@ -9,7 +9,7 @@ import InsightsPage from "~/insights/insights-view";
export const generateMetadata = async () =>
await _generateMetadata(
() => "Insights",
(t) => t("insights"),
(t) => t("insights_subtitle")
);
@@ -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")
);
};
+1 -1
View File
@@ -42,7 +42,7 @@ export default function EnterprisePage() {
];
return (
<div>
<ShellMain heading="Enterprise" subtitle={t("enterprise_description")}>
<ShellMain heading={t("enterprise")} subtitle={t("enterprise_description")}>
<UpgradeTip
plan="enterprise"
title={t("create_your_org")}
+4 -2
View File
@@ -98,10 +98,12 @@ export default function Apps({ categories, appStore, userAdminTeams }: PageProps
}
export const LayoutWrapper = (page: React.ReactElement) => {
const { t } = useLocale();
return (
<Shell
title="Apps Store"
description="Create forms to direct attendees to the correct destinations."
title={t("app_store")}
description={t("app_store_description")}
withoutMain={true}
hideHeadingOnMobile>
{page}
@@ -21,8 +21,8 @@ export default function Apps({ apps }: PageProps) {
<Shell
isPublic
backPath="/apps"
title="Apps Store"
description="Connecting people, technology and the workplace."
title={t("app_store")}
description={t("app_store_description")}
smallHeading
heading={
<>
@@ -15,12 +15,7 @@ export default function Apps({ categories }: PageProps) {
const { t, isLocaleReady } = useLocale();
return (
<Shell
isPublic
large
hideHeadingOnMobile
title="Apps Store"
description="Connecting people, technology and the workplace.">
<Shell isPublic large hideHeadingOnMobile title={t("app_store")} description={t("app_store_description")}>
<div className="text-md flex items-center gap-1 px-4 pb-3 pt-3 font-normal md:px-8 lg:px-0 lg:pt-0">
<Link
href="/apps"
@@ -213,11 +213,11 @@ export default function AvailabilityPage({ currentOrg }: PageProps) {
<div>
<Shell
heading={t("availability")}
title="Availability"
description="Configure times when you are available for bookings."
subtitle={t("configure_availability")}
title={t("availability")}
description={t("configure_availability")}
hideHeadingOnMobile
withoutMain={false}
subtitle={t("configure_availability")}
CTA={
<div className="flex gap-2">
<ToggleGroup
@@ -151,8 +151,8 @@ export default function Bookings() {
hideHeadingOnMobile
heading={t("bookings")}
subtitle={t("bookings_description")}
title="Bookings"
description="Create events to share for people to book on your calendar.">
title={t("bookings")}
description={t("bookings_description")}>
<div className="flex flex-col">
<div className="flex flex-row flex-wrap justify-between">
<HorizontalTabs tabs={tabs} />
+3 -3
View File
@@ -53,10 +53,10 @@ export default function InsightsPage() {
<div>
<Shell
withoutMain={false}
heading="Insights"
heading={t("insights")}
subtitle={t("insights_subtitle")}
title="Insights"
description="View booking insights across your events.">
title={t("insights")}
description={t("insights_subtitle")}>
<UpgradeTip
plan="team"
title={t("make_informed_decisions")}
@@ -4,6 +4,7 @@ import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
import { useState, useEffect } from "react";
import Shell from "@calcom/features/shell/Shell";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { showToast } from "@calcom/ui";
import {
@@ -22,6 +23,7 @@ import { PlatformPricing } from "@components/settings/platform/pricing/platform-
const queryClient = new QueryClient();
export default function Platform() {
const { t } = useLocale();
const [initialClientId, setInitialClientId] = useState("");
const [initialClientName, setInitialClientName] = useState("");
@@ -75,11 +77,12 @@ export default function Platform() {
<QueryClientProvider client={queryClient}>
<div>
<Shell
heading="Platform"
title="Platform"
heading={t("platform")}
subtitle={t("platform_description")}
title={t("platform")}
description={t("platform_description")}
hideHeadingOnMobile
withoutMain={false}
subtitle="Manage everything related to platform."
isPlatformUser={true}>
<HelpCards />
<OAuthClientsList oauthClients={data} isDeleting={isDeleting} handleDelete={handleDelete} />
+3 -3
View File
@@ -19,10 +19,10 @@ function Teams(props: PageProps) {
<Shell
withoutMain={false}
heading={t("teams")}
title="Teams"
description="Create and manage teams to use collaborative features."
hideHeadingOnMobile
subtitle={t("create_manage_teams_collaborative")}
title={t("teams")}
description={t("create_manage_teams_collaborative")}
hideHeadingOnMobile
CTA={
(!user.organizationId || user.organization.isOrgAdmin) && (
<Button
+1 -1
View File
@@ -33,7 +33,7 @@ export default function Custom404() {
const links = [
{
title: "Enterprise",
title: t("enterprise"),
description: "Learn more about organizations and subdomains in our enterprise plan.",
icon: "shield" as const,
href: `${WEBSITE_URL}/enterprise`,
+1 -1
View File
@@ -110,7 +110,7 @@ test.describe("Availablity", () => {
await expect(page.locator('[data-testid="date-overrides-list"] > li')).toHaveCount(1);
});
test("Schedule listing", async ({ page }) => {
test("@test Schedule listing", async ({ page }) => {
await test.step("Can add a new schedule", async () => {
await page.getByTestId("new-schedule").click();
await page.locator('[id="name"]').fill("More working hours");
@@ -2048,7 +2048,6 @@
"error_charging_card": "حدثت مشكلة في خصم رسوم عدم الحضور. يرجى المحاولة مرة أخرى لاحقًا.",
"collect_no_show_fee": "تحصيل رسوم عدم الحضور",
"no_show_fee_charged": "تم تحصيل رسوم عدم حضور",
"insights": "Insights",
"routing_forms": "نماذج التوجيه",
"testing_workflow_info_message": "عند اختبار سير العمل هذا، يجب أن تدرك أنه لا يمكن جدولة رسائل البريد الإلكتروني والرسائل القصيرة إلا قبل ساعة واحدة على الأقل",
"insights_no_data_found_for_filter": "لم يتم العثور على بيانات لعامل التصفية المحدد أو التواريخ المحددة.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Při strhávání poplatku za nedostavení se došlo k chybě. Zkuste to později.",
"collect_no_show_fee": "Vybrat poplatek za nedostavení se",
"no_show_fee_charged": "Poplatek za nedostavení se stržen",
"insights": "Insights",
"routing_forms": "Směrovací formuláře",
"testing_workflow_info_message": "Při testování tohoto pracovního postupu mějte na paměti, že e-maily a SMS lze naplánovat pouze nejméně 1 hodinu předem.",
"insights_no_data_found_for_filter": "Pro vybraný filtr nebo vybraná data nebyla nalezena žádná data.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Beim Berechnen der Nichterscheinungsgebühr ist etwas schiefgelaufen. Bitte versuchen Sie es später erneut.",
"collect_no_show_fee": "Gebühr für das Nichterscheinen anfordern",
"no_show_fee_charged": "Gebühr für das Nichterscheinen berechnet",
"insights": "Insights",
"routing_forms": "Weiterleitungsformulare",
"testing_workflow_info_message": "Bitte beachten Sie beim Testen dieses Workflows, dass E-Mails und SMS spätestens 1 Stunde im Voraus geplant werden können",
"insights_no_data_found_for_filter": "Keine Daten für den ausgewählten Filter oder das ausgewählte Datum gefunden.",
@@ -2113,6 +2113,8 @@
"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.",
"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.",
"must_enter_organization_name": "Must enter an organization name",
"must_enter_organization_admin_email": "Must enter your organization email address",
@@ -2332,6 +2334,7 @@
"unified_billing_description": "Add a single credit card to pay for all your team's subscriptions",
"advanced_managed_events": "Advanced Managed Event Types",
"advanced_managed_events_description": "Add a single credit card to pay for all your team's subscriptions",
"enterprise": "Enterprise",
"enterprise_description": "Upgrade to Enterprise to create your Organization",
"create_your_org": "Create your Organization",
"create_your_org_description": "Upgrade to Organizations and receive a subdomain, unified billing, Insights, extensive whitelabeling and more",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Algo salió mal al cobrar la tarifa por no presentarse. Inténtelo de nuevo más tarde.",
"collect_no_show_fee": "Cobrar comisión por no presentarse",
"no_show_fee_charged": "Comisión por no presentarse cobrada",
"insights": "Insights",
"routing_forms": "Formularios de enrutamiento",
"testing_workflow_info_message": "Al probar este flujo de trabajo, tenga en cuenta que los correos electrónicos y los SMS solo se pueden programar con al menos 1 hora de anticipación",
"insights_no_data_found_for_filter": "No se encontraron datos para el filtro seleccionado o las fechas seleccionadas.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "משהו השתבש בעת גביית דמי אי-הגעה. אפשר לנסות שוב מאוחר יותר.",
"collect_no_show_fee": "גביית דמי אי-הגעה",
"no_show_fee_charged": "דמי אי-הגעה חויבו",
"insights": "Insights",
"routing_forms": "טפסי ניתוב",
"testing_workflow_info_message": "במהלך בדיקת תהליך העבודה הזה, קח/י בחשבון שניתן לתזמן הודעות דוא\"ל ו-SMS לפחות שעה אחת מראש",
"insights_no_data_found_for_filter": "לא נמצאו נתונים עבור המסנן שנבחר או התאריכים שנבחרו.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "L'addebito della penale per mancata presentazione non è andato a buon fine. Riprovare più tardi.",
"collect_no_show_fee": "Riscuoti penale per mancata presentazione",
"no_show_fee_charged": "Penale per mancata presentazione addebitata",
"insights": "Insights",
"routing_forms": "Moduli di Routing",
"testing_workflow_info_message": "Durante il test di questo flusso di lavoro, tieni presente che le e-mail e i messaggi SMS devono essere programmati con almeno 1 ora di anticipo",
"insights_no_data_found_for_filter": "Nessun dato trovato per il filtro selezionato o le date selezionate.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "不参加費用の請求時にエラーが発生しました。後でもう一度お試しください。",
"collect_no_show_fee": "不参加費用を徴収する",
"no_show_fee_charged": "不参加費用が請求されました",
"insights": "Insights",
"routing_forms": "ルーティングフォーム",
"testing_workflow_info_message": "このワークフローをテストする場合、少なくとも 1 時間前でなければメールと SMS のスケジュール設定ができないことにご注意ください",
"insights_no_data_found_for_filter": "選択したフィルターまたは日付のデータが見つかりませんでした。",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Er is iets misgegaan met het in rekening brengen van de afwezigheidsvergoeding. Probeer het later opnieuw.",
"collect_no_show_fee": "Afwezigheidsvergoeding innen",
"no_show_fee_charged": "Afwezigheidsvergoeding in rekening gebracht",
"insights": "Insights",
"routing_forms": "Routeringsformulieren",
"testing_workflow_info_message": "Let er bij het testen van deze werkstroom op dat e-mails en sms minimaal 1 uur van tevoren kunnen gepland moeten worden",
"insights_no_data_found_for_filter": "Geen gegevens gevonden voor het geselecteerde filter of de geselecteerde datums.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Coś poszło nie tak podczas pobierania opłaty za niestawienie się. Spróbuj ponownie później.",
"collect_no_show_fee": "Pobierz opłatę za niestawienie się",
"no_show_fee_charged": "Pobrano opłatę za niestawienie się",
"insights": "Insights",
"routing_forms": "Formularze routingu",
"testing_workflow_info_message": "Podczas testowania tego przepływu pracy pamiętaj, że wiadomości e-mail i SMS można zaplanować jedynie z co najmniej 1-godzinnym wyprzedzeniem",
"insights_no_data_found_for_filter": "Nie znaleziono danych dotyczących wybranego filtru lub wskazanych dat.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Algo deu errado ao cobrar a taxa de não comparecimento. Tente novamente mais tarde.",
"collect_no_show_fee": "Coletar taxa de não comparecimento",
"no_show_fee_charged": "Taxa de não comparecimento cobrada",
"insights": "Insights",
"routing_forms": "Formulários de Roteamento",
"testing_workflow_info_message": "Ao testar este fluxo de trabalho, não se esqueça de que e-mails e SMS só podem ser reprogramados com pelo menos uma hora de antecedência",
"insights_no_data_found_for_filter": "Nenhum dado encontrado para o filtro ou dados selecionados.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Algo não correu bem no débito da taxa de não-comparência. Por favor, tente novamente mais tarde.",
"collect_no_show_fee": "Cobrar taxa de não-comparência",
"no_show_fee_charged": "A taxa de não-comparência debitada",
"insights": "Insights",
"routing_forms": "Formulários de Roteamento",
"testing_workflow_info_message": "Ao testar este fluxo de trabalho tenha em consideração que e-mails e SMS só podem ser agendados com, pelo menos, 1 hora de antecedência",
"insights_no_data_found_for_filter": "Não foram encontrados dados para as datas ou filtros selecionados.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "A survenit o eroare la perceperea taxei de neprezentare. Încercați din nou mai târziu.",
"collect_no_show_fee": "Colectare taxă de neprezentare",
"no_show_fee_charged": "Taxă de neprezentare percepută",
"insights": "Insights",
"routing_forms": "Formulare de Rutare",
"testing_workflow_info_message": "La testarea acestui flux de lucru, țineți cont de faptul că e-mailurile și SMS-urile pot fi programate doar cu cel puțin o oră în prealabil",
"insights_no_data_found_for_filter": "Nu s-au găsit date pentru filtrul selectat sau pentru datele selectate.",
@@ -2034,7 +2034,6 @@
"error_charging_card": "Не удалось списать комиссию за неявку. Повторите попытку позже.",
"collect_no_show_fee": "Списать комиссию за неявку",
"no_show_fee_charged": "Комиссия за неявку списана",
"insights": "Insights",
"testing_workflow_info_message": "При тестировании этого рабочего процесса помните, что отправку писем и SMS можно запланировать не менее чем за 1 час до начала",
"insights_no_data_found_for_filter": "Данные, соответствующие выбранному фильтру или диапазону дат, не найдены.",
"acknowledge_booking_no_show_fee": "Я подтверждаю, что в случае моей неявки на событие с моей карты будет списана комиссия в размере {{amount, currency}}.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Došlo je do greške prilikom naplate naknade za izostanak. Pokušajte ponovo kasnije.",
"collect_no_show_fee": "Prikupi naknadu za izostanak",
"no_show_fee_charged": "Naplaćena je naknada za izostanak",
"insights": "Insights",
"routing_forms": "Obrasci za usmeravanje",
"testing_workflow_info_message": "Kada testirate ovaj radni tok, imajte na umu da imejlovi i SMS-ovi mogu da budu zakazani najmanje 1 sat unapred",
"insights_no_data_found_for_filter": "Nisu pronađeni podaci za izabrani filter ili izabrane datume.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Något gick fel när avgiften för utebliven närvaro debiterades. Försök igen senare.",
"collect_no_show_fee": "Samla in avgift för utebliven närvaro",
"no_show_fee_charged": "Avgift för utebliven närvaro har debiterats",
"insights": "Insights",
"routing_forms": "Routningsformulär",
"testing_workflow_info_message": "När det här arbetsflödet testas ska du vara medveten om att e-postmeddelanden och SMS endast kan schemaläggas minst en timme i förväg",
"insights_no_data_found_for_filter": "Inga data hittades för valt filter eller valda datum.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Katılmama ücreti alınırken bir sorun oluştu. Lütfen daha sonra tekrar deneyin.",
"collect_no_show_fee": "Katılmama ücretini tahsil edin",
"no_show_fee_charged": "Katılmama ücreti tahsil edildi",
"insights": "Insights",
"routing_forms": "Yönlendirme Formları",
"testing_workflow_info_message": "Bu iş akışını test ederken, E-postaların ve SMS'lerin yalnızca en az 1 saat önceden planlanabileceğini unutmayın",
"insights_no_data_found_for_filter": "Seçili filtre veya tarihler için veri bulunamadı.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Сталася помилка під час стягнення плати за відсутність. Спробуйте пізніше.",
"collect_no_show_fee": "Стягнути плату за відсутність",
"no_show_fee_charged": "Стягнуто плату за відсутність",
"insights": "Insights",
"routing_forms": "Форми маршрутизації",
"testing_workflow_info_message": "Тестуючи цей робочий процес, зважайте на те, що надсилання електронних листів і SMS-повідомлень можна запланувати щонайменше за 1 годину",
"insights_no_data_found_for_filter": "Не знайдено жодних даних для вибраного фільтра або вибраних дат.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "Có sự cố khi tính phí vắng mặt. Vui lòng thử lại sau.",
"collect_no_show_fee": "Thu phí vắng mặt",
"no_show_fee_charged": "Phí vắng mặt đã tính",
"insights": "Insights",
"routing_forms": "Biểu mẫu Định tuyến",
"testing_workflow_info_message": "Khi kiểm tra tiến độ công việc này, hãy để ý rằng Email và SMS chỉ có thể được đặt lịch trước ít nhất 1 giờ",
"insights_no_data_found_for_filter": "Không tìm thấy dữ liệu cho bộ lọc hay ngày đã chọn.",
@@ -2048,7 +2048,6 @@
"error_charging_card": "收取失约费时出错。请稍后再试。",
"collect_no_show_fee": "收取失约费",
"no_show_fee_charged": "已收取失约费",
"insights": "Insights",
"routing_forms": "路由表单",
"testing_workflow_info_message": "测试此工作流程时请注意,电子邮件和短信必须提前至少 1 小时安排",
"insights_no_data_found_for_filter": "未找到所选筛选器或所选日期的数据。",
@@ -2048,7 +2048,6 @@
"error_charging_card": "收取缺席費時發生問題。請稍後再試一次。",
"collect_no_show_fee": "收取缺席費",
"no_show_fee_charged": "已收取缺席費",
"insights": "Insights",
"routing_forms": "路由表單",
"testing_workflow_info_message": "測試此工作流程時,請注意電子郵件和簡訊只能提前至少 1 小時預定",
"insights_no_data_found_for_filter": "找不到所選篩選條件或日期的資料。",
@@ -1,6 +1,5 @@
"use client";
// TODO: i18n
import { useAutoAnimate } from "@formkit/auto-animate/react";
import { useEffect } from "react";
import { useFormContext } from "react-hook-form";
@@ -151,7 +150,7 @@ export default function RoutingForms({
return (
<LicenseRequired>
<ShellMain
heading="Routing Forms"
heading={t("routing_forms")}
CTA={hasPaidPlan && forms?.length ? <NewFormButton /> : null}
subtitle={t("routing_forms_description")}>
<UpgradeTip
@@ -346,10 +345,12 @@ export default function RoutingForms({
}
RoutingForms.getLayout = (page: React.ReactElement) => {
const { t } = useLocale();
return (
<Shell
title="Routing Forms"
description="Create forms to direct attendees to the correct destinations."
title={t("routing_forms")}
description={t("routing_forms_description")}
withoutMain={true}
hideHeadingOnMobile>
{page}
@@ -68,8 +68,8 @@ function WorkflowsPage({ filteredList }: PageProps) {
<ShellMain
heading={t("workflows")}
subtitle={t("workflows_to_automate_notifications")}
title="Workflows"
description="Create workflows to automate notifications and reminders."
title={t("workflows")}
description={t("workflows_to_automate_notifications")}
hideHeadingOnMobile
CTA={
session.data?.hasValidLicense ? (