Skip to content
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

[#3718] Drop FormDefinition.component_translations JSONField #3960

Conversation

vaszig
Copy link
Contributor

@vaszig vaszig commented Feb 29, 2024

Closes #3718

@vaszig vaszig marked this pull request as draft February 29, 2024 14:56
@vaszig vaszig force-pushed the task/3718-drop-formdefinition-component-translations-jsonfield branch from fc4d8c5 to d6fdf43 Compare March 1, 2024 15:30
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.09%. Comparing base (696652d) to head (423d9df).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3960      +/-   ##
==========================================
- Coverage   96.12%   96.09%   -0.04%     
==========================================
  Files         724      724              
  Lines       22631    22609      -22     
  Branches     2610     2602       -8     
==========================================
- Hits        21755    21726      -29     
- Misses        621      629       +8     
+ Partials      255      254       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vaszig vaszig force-pushed the task/3718-drop-formdefinition-component-translations-jsonfield branch from d6fdf43 to 5e8f153 Compare March 1, 2024 15:38
@vaszig vaszig marked this pull request as ready for review March 1, 2024 15:40
@vaszig vaszig marked this pull request as draft March 4, 2024 07:15
@vaszig vaszig requested a review from SilviaAmAm March 5, 2024 10:37
@vaszig vaszig marked this pull request as ready for review March 5, 2024 10:37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a general question: I see form definition translations are removed from the frontend here. What was happening until now when component translations were set, as well as fd translations? Did one took priority over the other?

Copy link
Contributor Author

@vaszig vaszig Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably I don't understand your point..I mean component_translations JSONField had the translations for all the components (literals) and it was part of the form definition model. Or maybe I have missed something in the old flow.

src/openforms/js/components/formio_builder/translation.js Outdated Show resolved Hide resolved
Copy link
Contributor

@SilviaAmAm SilviaAmAm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is file src/openforms/forms/fd_translations_converter.py still needed?

src/openforms/formio/rendering/default.py Show resolved Hide resolved
@vaszig
Copy link
Contributor Author

vaszig commented Mar 8, 2024

Question: is file src/openforms/forms/fd_translations_converter.py still needed?

I think you are right, maybe I missed that..I will have a look again.

src/openforms/formio/variables.py Outdated Show resolved Hide resolved
src/openforms/formio/variables.py Outdated Show resolved Hide resolved
src/openforms/formio/variables.py Outdated Show resolved Hide resolved
src/openforms/forms/api/serializers/form_definition.py Outdated Show resolved Hide resolved
src/openforms/forms/fd_translations_converter.py Outdated Show resolved Hide resolved
src/openforms/forms/tests/test_import_export.py Outdated Show resolved Hide resolved
src/openforms/forms/tests/test_translations_converter.py Outdated Show resolved Hide resolved
@vaszig vaszig force-pushed the task/3718-drop-formdefinition-component-translations-jsonfield branch 2 times, most recently from 25b2131 to 2d5943c Compare March 13, 2024 12:43
vaszig added 2 commits March 13, 2024 17:33
We removed the 'component_translations' field since it's deprecated. The
new formiobuilder handles the translations per component. The field is
still present in the FormDefinitionSerializer since we need it during import
of older forms, to process legacy format component translations.
@sergei-maertens sergei-maertens force-pushed the task/3718-drop-formdefinition-component-translations-jsonfield branch from 895670d to f32dc67 Compare March 13, 2024 16:35
@sergei-maertens sergei-maertens merged commit c4b2b93 into master Mar 13, 2024
20 of 21 checks passed
@sergei-maertens sergei-maertens deleted the task/3718-drop-formdefinition-component-translations-jsonfield branch March 13, 2024 16:54
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.

Drop FormDefinition.component_translations JSONField
4 participants