-
Notifications
You must be signed in to change notification settings - Fork 30.1k
[FIX] survey: provide translations to frontend #204077
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] survey: provide translations to frontend #204077
Conversation
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.
ok as far as rd/http is concerned, I let the people at survey merge
This commit addresses translations not being exposed to the frontend. For surveys, no translatable terms existing in JavaScript are being translated. This mainly concerns `survey_form.js`. Lack of translations there easily results in a mix of languages being shown to a user answering a survey. Steps to reproduce: Install survey with demo data. Open and edit the "form feedback" survey. Change the question "What is your birth date" question. In the "option" tab, check the inbox "validate input" and set a min and max date. Start a live session with 1 attendee that uses another language than english. On the presenter side skip the first few questions to go to the "what is your birth date" question. On the attendee side, write down a date outside of the allowed range (don't use the date picket!). A warning message appears, that warning is not translated.
a58a5c3
to
ae68fb4
Compare
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.
But wait... I'm part of the survey team too!
I reproduced the problem on my laptop and made sure your fix was correct. I took the liberty to change the commit message in order to include steps to reproduce the problem.
Thanks for the fix!
@flch-odoo mind to r+?
Oh well there was already another PR in our pipe with the exact same diff. Let's go. @robodoo r+ |
This commit addresses translations not being exposed to the frontend. For surveys, no translatable terms existing in JavaScript are being translated. This mainly concerns `survey_form.js`. Lack of translations there easily results in a mix of languages being shown to a user answering a survey. Steps to reproduce: Install survey with demo data. Open and edit the "form feedback" survey. Change the question "What is your birth date" question. In the "option" tab, check the inbox "validate input" and set a min and max date. Start a live session with 1 attendee that uses another language than english. On the presenter side skip the first few questions to go to the "what is your birth date" question. On the attendee side, write down a date outside of the allowed range (don't use the date picket!). A warning message appears, that warning is not translated. closes #204077 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Description of the issue/feature this PR addresses:
This commit addresses translations not being exposed to the frontend for the survey module.
Current behavior before PR:
For surveys, no translatable terms existing in JavaScript are being translated. This mainly concerns
survey_form.js
.Lack of translations there easily results in a mix of languages being shown to a user answering a survey.
Desired behavior after PR is merged:
Translatable terms defined in JavaScript are translated to the user's language.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr