fix: translate location dropdown group labels and options in event-type settings#26784
Merged
ThyMinimalDev merged 7 commits intomainfrom Jan 14, 2026
Merged
Conversation
Co-Authored-By: morgan@cal.com <morgan@cal.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
sean-brydon
previously approved these changes
Jan 13, 2026
For team event types, the current user might not be in eventType.users, causing translations to default to English. This fix queries the user's locale directly from the database when not found in the event type users. Co-Authored-By: morgan@cal.com <morgan@cal.com>
ThyMinimalDev
commented
Jan 13, 2026
Per PR feedback, pass the authenticated user's locale as an optional parameter to getEventTypeById instead of making an extra database call. The locale is passed from ctx.user.locale in the tRPC handler. Co-Authored-By: morgan@cal.com <morgan@cal.com>
Contributor
E2E results are ready! |
Udit-takkar
reviewed
Jan 13, 2026
| isTrpcCall?: boolean; | ||
| isUserOrganizationAdmin: boolean; | ||
| currentOrganizationId: number | null; | ||
| userLocale?: string | null; |
Contributor
There was a problem hiding this comment.
why is this optional and nullable?
Contributor
There was a problem hiding this comment.
We can set the default locale to 'en'
Contributor
Author
There was a problem hiding this comment.
not required, comes from authenticated user
sean-brydon
approved these changes
Jan 13, 2026
volnei
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the location dropdown group labels not being translated in event-type settings. The group labels like "Conferencing", "in person", and "Other" were showing in English even when the UI was set to French.
Root cause #1: The category value
"in person"(with space) didn't match any translation key. The translation functiont("in person")was returning the key itself instead of the translated value.Fix #1: Changed the category value from
"in person"to"in_person_category"and added the corresponding translation keys for English and French.Root cause #2: For team/round-robin event types, the current user might not be in
eventType.users, causingcurrentUser?.localeto beundefinedand defaulting to English ("en").Fix #2: Added an optional
userLocaleparameter togetEventTypeByIdand pass the authenticated user's locale fromctx.user.localein the tRPC handler.Updates since last revision
ctx.user.localeVisual Demo
Before (from user's screenshot - group labels not translated):

After: Group labels and location options should now display in the user's locale (e.g., "En personne" in French).

Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Test 1: Regular event types
Test 2: Team/Round-robin event types
Checklist
Human Review Checklist
@ts-ignore→@ts-expect-error) are from biome linting and are safe