calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
31.77k stars 7.75k forks source link

[CAL-3670] i18n: German translations missing from the booking and success page #14953

Open milospuac opened 5 months ago

milospuac commented 5 months ago

Screenshot 2024-05-09 at 10.27.15.png

From SyncLinear.com | CAL-3670

dosubot[bot] commented 5 months ago

To address the issue of missing German translations on the booking and success pages, you can automate the verification process using Playwright. Here's a concise guide to ensure your web interface correctly displays German translations, including maintaining an informal communication style:

  1. Set Playwright to German Locale: Configure your Playwright tests to operate in the German locale with locale: "de" to simulate the user environment accurately.

  2. Navigate and Verify Pages: Use page.goto() to navigate to the booking and success pages. Ensure the pages fully load by waiting for the domcontentloaded event.

  3. Check HTML Attributes: Verify the html tag includes lang="de" and dir="ltr" to ensure the page is correctly set for German and left-to-right text direction.

  4. Validate Translations: Employ Playwright's text selectors, like getByText or getByRole, to check for accurate German translations of static texts, dynamic fields (event titles, dates, email addresses), and ensure the informal tone is captured in phrases and sentences.

  5. Apply to Both Pages: Repeat these checks for both the booking and success pages to confirm consistency across your interface.

This approach helps automate the testing of German translations, ensuring a seamless and correctly localized user experience. For detailed implementation, refer to the locale.e2e.ts and common.json files for examples on setting up your tests.

#### Details **Sources** - [[CAL-2871] German Translation Issues](https://github.com/calcom/cal.com/issues/13035) - [UX issues on the german booking-pages](https://github.com/calcom/cal.com/issues/5855) - [[CAL-1677] Wrong language for months in confirmation email of a recurring booking.](https://github.com/calcom/cal.com/issues/8893) - [apps/web/playwright/locale.e2e.ts](https://github.com/calcom/cal.com/blob/main/apps/web/playwright/locale.e2e.ts) - [apps/web/public/static/locales/de/common.json](https://github.com/calcom/cal.com/blob/main/apps/web/public/static/locales/de/common.json) - [apps/web/server/lib/getTranslations.ts](https://github.com/calcom/cal.com/blob/main/apps/web/server/lib/getTranslations.ts) - [packages/platform/atoms/cal-provider/BaseCalProvider.tsx](https://github.com/calcom/cal.com/blob/main/packages/platform/atoms/cal-provider/BaseCalProvider.tsx) - [packages/config/next-i18next.config.js](https://github.com/calcom/cal.com/blob/main/packages/config/next-i18next.config.js) - [packages/lib/getLocaleFromRequest.ts](https://github.com/calcom/cal.com/blob/main/packages/lib/getLocaleFromRequest.ts) - [.yarn/patches/next-i18next-npm-13.3.0-bf25b0943c.patch](https://github.com/calcom/cal.com/blob/main/.yarn/patches/next-i18next-npm-13.3.0-bf25b0943c.patch)
**About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

smitgol commented 5 months ago

i am sure about the time format but there is already pr raised for translation