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

Tame those translations - throw an error if a text string isn't defined with description #785

Merged
merged 11 commits into from
Dec 20, 2023

Conversation

Adamik10
Copy link
Contributor

Link to issue

https://reload.atlassian.net/browse/DDFLSBP-245

Description

This PR solves a problem we are having constantly - when dpl-react and dpl-cms isn't aligned properly and translatable strings don't match between the repositories. Now whenever that happens we now throw an descriptive error saying what translation string is missing a definition.

Screenshot of the result

n/a

Additional comments or questions

n/a

The initial values need to use translation strings in order to be
properly tranlslated.
Missing translations were for the order digital copy feedback message:
orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText
orderDigitalCopyFeedbackBorchkUserNotVerifiedText
orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText
orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText
orderDigitalCopyFeedbackUnknownUserText
Wrapping the components in withText() does the trick. Our Cypress tests
were failing because the stories didn't have access to translations.
Now that translations work in all Cypress tests we have to look for the
translated text strings, not theirDefinitions
Copy link
Contributor

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

Great work! Nice to have the strings tidyed up!
A have a few questions, apart from that it looks fine.

@Adamik10 Adamik10 changed the title Throw an error if a text string isn't defined with description of string Tame those translations - throw an error if a text string isn't defined with description Dec 19, 2023
@Adamik10 Adamik10 requested a review from spaceo December 19, 2023 10:13
@spaceo spaceo removed their assignment Dec 20, 2023
Copy link
Contributor

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Adamik10 Adamik10 merged commit 8d79a39 into develop Dec 20, 2023
16 checks passed
@Adamik10 Adamik10 deleted the tame-those-translations-by-throwing-errors branch December 20, 2023 14:27
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