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

Add translation validations for Editionable Worldwide Organisation parts #9048

Merged
merged 2 commits into from
May 16, 2024

Conversation

brucebolt
Copy link
Member

@brucebolt brucebolt commented May 16, 2024

This ensures that Worldwide Organisation Pages and Worldwide Offices can only have a translation if the parent Editionable Worldwide Organisation also has the same translation.

The condition was enforced in the controllers, but adding a validation to the models ensures this conditions is enforced everywhere.

Trello card

This ensures that a Worldwide Organisation Page can only have a
translation if the parent Editionable Worldwide Organisation also has
the same translation.
@brucebolt brucebolt force-pushed the add-ww-org-translation-validation branch from 71b7ff2 to 65d5af0 Compare May 16, 2024 14:15
@brucebolt brucebolt marked this pull request as ready for review May 16, 2024 14:23
@brucebolt brucebolt force-pushed the add-ww-org-translation-validation branch from 65d5af0 to dd77793 Compare May 16, 2024 15:34
test/unit/app/models/contact_test.rb Outdated Show resolved Hide resolved
test/unit/app/models/contact_test.rb Outdated Show resolved Hide resolved
@brucebolt brucebolt force-pushed the add-ww-org-translation-validation branch from dd77793 to cb2f83b Compare May 16, 2024 15:58
This ensures that a Worldwide Office can only have a translation if the
parent Editionable Worldwide Organisation also has the same translation.

The Worldwide Office itself isn't actually translatable, but the Contact
is. Therefore we add the validation to the contact rather than the
office itself.
@brucebolt brucebolt force-pushed the add-ww-org-translation-validation branch from cb2f83b to 9192c10 Compare May 16, 2024 16:00
@brucebolt brucebolt merged commit 554e731 into main May 16, 2024
19 checks passed
@brucebolt brucebolt deleted the add-ww-org-translation-validation branch May 16, 2024 16:07
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.

None yet

2 participants