Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cal.com website breaks when language change button pressed #14826

Open
thepradipvc opened this issue May 1, 2024 · 4 comments
Open

Cal.com website breaks when language change button pressed #14826

thepradipvc opened this issue May 1, 2024 · 4 comments
Labels
🐛 bug Something isn't working Low priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input

Comments

@thepradipvc
Copy link
Contributor

Issue Summary

On the homepage of Cal.com. When I press the language change button in the footer, the website breaks saying a client-side exception happened.

Steps to Reproduce

  1. Go to the footer of the Cal.com website
  2. Press the button saying "English" and the languages icon.
  3. The website breaks.

Actual Results

The website is breaking with a client-side exception.

Expected Results

There should be an option to change the language

Technical details

  • Happening in all the latest browsers.

Evidence

https://www.loom.com/share/8873a67ae3914fb498051824cdd9e6a8?sid=839d0754-9050-4cdb-8938-db7818108ec8

Copy link

dosubot bot commented May 1, 2024

Hey there, @thepradipvc! 👋 I'm Dosu, a friendly bot here to tackle bugs, answer your queries, and guide you through contributing while we wait for a human maintainer to join us. I'm diving into your issue about the language toggle snafu on Cal.com and will get back to you with some insights real soon. 🛠️😄

@thepradipvc thepradipvc changed the title Cal.com website breaks when language toggle button presses Cal.com website breaks when language change button pressed May 1, 2024
@dosubot dosubot bot added ui area: UI, frontend, button, form, input 🐛 bug Something isn't working labels May 1, 2024
@thepradipvc
Copy link
Contributor Author

I was trying to find the code for this but couldn't. Then I stumbled upon the cal.com handbook where there is a mention of the website app. But I couldn't find any app named website. Is is not public or what?
image

Copy link

dosubot bot commented May 1, 2024

The Cal.com website's code, including the functionality for changing languages, is located in the apps/web directory of the repository, referred to as @calcom/web within the apps/web/package.json. This is the "website app" mentioned in the Cal.com handbook.

For the language change issue you're encountering, it's related to how the website handles locale changes. The functionality involves dynamic locale and direction handling, particularly in the apps/web/pages/_document.tsx file, where the lang and dir attributes of the Html component are set based on the user's locale. This locale determination and setting are crucial for the language change feature to work correctly.

The translations for various text elements are stored in the apps/web/public/static/locales/ directory. The getLocale function from @calcom/features/auth/lib/getLocale is utilized to determine the user's locale, influencing the dynamic setting of language attributes on the website.

To assist further with the client-side exception you're facing, it would be beneficial to have the exact error message or details of the exception. This information would enable a more precise diagnosis of the issue.

Details

Sources


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.

@mritosa
Copy link

mritosa commented May 6, 2024

Hey , Im new to the Open source contributing. I would like to solve this issue if it's possible. Do I need some approval or I can just fork the project and try to fix the issue?

@ciaranha ciaranha added the Low priority Created by Linear-GitHub Sync label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working Low priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input
Projects
None yet
Development

No branches or pull requests

3 participants