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

20321 fix consistent interpolations check #2

Closed

Conversation

tom-brouwer-bex
Copy link

@tom-brouwer-bex tom-brouwer-bex commented Feb 6, 2024

Adds liquid tag consistency validation to the interpolation check, and rebased from the original repository.

Additional validations:

  • Content of {{ }} tags is the same, ignoring:
    • differences in whitespace around tags
    • Translation strings before the | passed to a function (e.g. {{ 'local language value' | method_name }}
  • Content {% %} tags is the same, ignoring:
    • differences in whitespace around tags

Note that the following commits from our own for were removed in this rebase, since they were implemented in the original repository:

Our Commit Replacement
Always set tag_handling to xml DeepL: Default to tag_handling: xml
Fix warn_deprecated calls Fix private method called for warn deprecated

Considerations for merging:

  • This pull-request is relative to the 'main-base' branch, which is the same as the 'main' branch on the original
  • Since this is a rebase, after merging the result has to be force-pushed to the existing main branch
  • WARNING: Please ensure that the consistency fixes on monorepo are on both staging and production, before merging this to main

Closes bookingexperts/support#20321

holstvoogd and others added 3 commits February 6, 2024 15:05
Finds largest glossary for a language pair and uses it
@tom-brouwer-bex tom-brouwer-bex self-assigned this Feb 6, 2024
@tom-brouwer-bex tom-brouwer-bex marked this pull request as draft February 6, 2024 14:43
…s check

Note that interpolation checks can be skipped on specific keys using
the 'ignore_inconsistent_interpolations' property in the yaml config
file

Ref bookingexperts/support#20321
@tom-brouwer-bex tom-brouwer-bex force-pushed the 20321-fix-consistent-interpolations-check branch from 0b427c7 to c23f0a0 Compare February 6, 2024 15:38
Introduced by previous commits, but never tested before

Closes bookingexperts/support#20321
@tom-brouwer-bex tom-brouwer-bex marked this pull request as ready for review February 7, 2024 12:42
Copy link

@gstokkink gstokkink left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@gstokkink
Copy link

@tom-brouwer-bex you will take care of merging and pushing to the main branch yourself?

@tom-brouwer-bex
Copy link
Author

@gstokkink Yes, I'll take care of that once the updated interpolations are on production. Since it's a rebase, I'll first copy the existing 'main' branch to another branch, before force-pushing, to ensure we can revert if we see any issues.

@tom-brouwer-bex
Copy link
Author

@gstokkink The interpolation fixes were on production, and I've now force-pushed this branch to the main branch. If we see issues, I've archived the old main branch under backup-main/20240214 so we can restore it again.

Manually closing this pull-request

@tom-brouwer-bex tom-brouwer-bex deleted the 20321-fix-consistent-interpolations-check branch July 9, 2024 07:57
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