Allow setting user locale when bulk adding project members#2168
Allow setting user locale when bulk adding project members#2168
Conversation
When bulk-adding members to a project, newly created user accounts were always assigned LocalizationCode = "en" regardless of the admin's locale. This adds a Locale parameter (defaulting to "en") to BulkAddProjectMembersInput and passes the current user's locale from the frontend. https://claude.ai/code/session_01Hr9xWd97BEXEVMBUfrRF3c
The admin can now choose the display language for newly created users via a dropdown, defaulting to the admin's own locale. Uses the same DisplayLanguageSelect component as the register page and account settings, which gracefully handles unsupported locale values. https://claude.ai/code/session_01Hr9xWd97BEXEVMBUfrRF3c
📝 WalkthroughWalkthroughAdds locale/localization support to the bulk project member addition feature. Backend mutation now uses configurable locale from input instead of hardcoded "en". Frontend introduces DisplayLanguageSelect component enabling users to choose locale during bulk member addition. Locale flows through the entire stack via GraphQL input. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
UI unit Tests 1 files ± 0 3 suites - 47 0s ⏱️ -22s Results for commit d12c805. ± Comparison against base commit a43a321. This pull request removes 138 and adds 10 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
C# Unit Tests146 tests 146 ✅ 19s ⏱️ Results for commit d12c805. ♻️ This comment has been updated with latest results. |
|
Tested on develop ✅ |
Summary
This PR adds support for specifying a localization code when bulk adding project members, allowing newly created users to have their preferred language set during account creation rather than defaulting to English.
Key Changes
DisplayLanguageSelectcomponent to the bulk add members form, allowing users to select a locale for newly created membersBulkAddProjectMemberscomponent to acceptuserLocaleprop and pass the selected locale to the GraphQL mutationBulkAddProjectMembersInputrecord to include aLocaleparameter with a default value ofUser.DefaultLocalizationCodeProjectMutations.BulkAddProjectMembersto use the provided locale instead of hardcoded "en"localefield toBulkAddProjectMembersInputwith default value "en"Implementation Details
https://claude.ai/code/session_01Hr9xWd97BEXEVMBUfrRF3c