MX-236: Implement i18N for the messages sent by SMS or Email - #146
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe changes introduce internationalization and email templating capabilities to the self-service registration flow. Hard-coded email subjects, bodies, and SMS messages are replaced with locale-aware message properties and Thymeleaf-rendered HTML templates. Configuration beans for Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Registration Flow
participant Service as SelfServiceRegistrationWritePlatformServiceImpl
participant MessageSource as MessageSource (i18n)
participant TemplateEngine as Thymeleaf Engine
participant Resources as Template/Resource Files
Client->>Service: sendAuthorizationMessage()
rect rgba(100, 150, 200, 0.5)
Note over Service,MessageSource: SMS Authorization Flow
Service->>MessageSource: getMessage("sms.message", variables, locale)
MessageSource->>Resources: Look up locale-specific message
Resources-->>MessageSource: Message template with {0}, {1}, {2}
MessageSource-->>Service: Resolved SMS message
end
rect rgba(150, 100, 200, 0.5)
Note over Service,TemplateEngine: Email Authorization Flow
Service->>MessageSource: getMessage("email.subject", locale)
MessageSource-->>Service: Email subject
Service->>TemplateEngine: process("authorization-email", context)
TemplateEngine->>Resources: Load authorization-email.html template
TemplateEngine->>MessageSource: Resolve message keys (greeting, instructions, etc.)
MessageSource-->>TemplateEngine: Localized text
TemplateEngine->>TemplateEngine: Render with firstName, requestId, authToken
TemplateEngine-->>Service: HTML email body
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
MX-236: Implement i18N for the messages sent by SMS or Email
Summary by CodeRabbit
Release Notes