-
Notifications
You must be signed in to change notification settings - Fork 41
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
LINK-1367 | Support multilingual confirmation_message and instructions #610
LINK-1367 | Support multilingual confirmation_message and instructions #610
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #610 +/- ##
===========================================
+ Coverage 73.67% 73.74% +0.06%
===========================================
Files 231 233 +2
Lines 16128 16170 +42
===========================================
+ Hits 11882 11924 +42
Misses 4246 4246
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
registrations/models.py
Outdated
"event": getattr( | ||
self.registration.event, | ||
f"name_{service_language}", | ||
self.registration.event.name, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is a specific reason why not, it would be cleaner to use django-modeltranslation's standard way of accessing the translated fields, ie.
with translation.override(service_language):
email_variables = {
...
"event": self.registration.event
...
}
One thing to consider is what kind of fallback language logic we want to use with these fields, and configure modeltranslation accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I was quite sure that my approach wan't the best possible. Changed as suggested. Added Finnish, Swedish and English as fallback language for confirmation_message and instructions fields.
dda490d
to
786dee0
Compare
…uctions in correct language
786dee0
to
7c113ec
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! 👍 🦖
Description
At the moment confirmation_message and instructions fields in SignUp model are single text fields. Change them to multilingual text fields.
Closes
LINK-1367