Skip to content

Conversation

LightSystem
Copy link
Contributor

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

@robodoo
Copy link
Contributor

robodoo commented Mar 30, 2025

Pull request status dashboard

@C3POdoo C3POdoo requested review from a team and Julien00859 and removed request for a team March 30, 2025 10:09
Copy link
Member

@Julien00859 Julien00859 left a 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.
@Julien00859 Julien00859 force-pushed the 16.0-provide-survey-frontend-translations branch from a58a5c3 to ae68fb4 Compare March 31, 2025 09:17
Copy link
Member

@Julien00859 Julien00859 left a 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+?

@Julien00859
Copy link
Member

Oh well there was already another PR in our pipe with the exact same diff. Let's go.

@robodoo r+

robodoo pushed a commit that referenced this pull request Mar 31, 2025
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>
@robodoo robodoo closed this Mar 31, 2025
@LightSystem LightSystem deleted the 16.0-provide-survey-frontend-translations branch April 26, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants