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

fix: ai translations description for atoms #17875

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ryukemeister
Copy link
Contributor

@Ryukemeister Ryukemeister commented Nov 27, 2024

What does this PR do?

  • Translations for event types description using ai was causing atoms to break, hence removed ai translations for atoms for the time being.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Nov 27, 2024
@Ryukemeister Ryukemeister marked this pull request as ready for review November 27, 2024 11:05
@graphite-app graphite-app bot requested a review from a team November 27, 2024 11:05
@dosubot dosubot bot added ai area: AI, cal.ai i18n area: i18n, translations labels Nov 27, 2024
Copy link

graphite-app bot commented Nov 27, 2024

Graphite Automations

"Add platform team as reviewer" took an action on this PR • (11/27/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@@ -358,6 +355,7 @@ const BookerComponent = ({
event={event.data}
isPending={event.isPending}
isPlatform={isPlatform}
i18nLocales={i18nLocales}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double checking: you don't need to pass userLocale here?

@@ -61,8 +61,9 @@ export const EventMeta = ({
eventMetaTitle?: string;
eventMetaTimezoneSelect?: string;
};
locale?: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be userLocale? based on the other changes you added

@@ -219,6 +225,9 @@ export const BookerWebWrapper = (props: BookerWebWrapperAtomProps) => {
schedule={schedule}
verifyCode={verifyCode}
isPlatform={false}
areInstantMeetingParametersSet={areInstantMeetingParametersSet}
userLocale={session?.user.locale}
i18nLocales={i18nLocales}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm passing a prop doesn't seem optimal. I'd suggest importing it from i18n.json where it's needed

@github-actions github-actions bot marked this pull request as draft November 27, 2024 11:24
Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 4:10pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 4:10pm

@Ryukemeister Ryukemeister marked this pull request as ready for review November 27, 2024 15:52
@dosubot dosubot bot added event-types area: event types, event-types 🐛 bug Something isn't working labels Nov 27, 2024
const translatedDescription = (event?.fieldTranslations ?? []).find(
(trans) =>
trans.field === EventTypeAutoTranslatedField.DESCRIPTION &&
i18nLocales.includes(trans.targetLocale) &&
i18nLocales.locale.targets.includes(trans.targetLocale) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. i18nLocales name is misleading
  2. i18n.locale.targets.concat([i18n.locale.source])

Copy link
Contributor

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai area: AI, cal.ai 🐛 bug Something isn't working core area: core, team members only event-types area: event types, event-types i18n area: i18n, translations platform Anything related to our platform plan ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants