Skip to content

Conversation

@onno-timmerman
Copy link
Contributor

When using snippets and translations there is a gotcha you might encounter. This might save somebody couple of hours figuring it out.

Imagine you have a page with related tags added via snippets, and you want to query all pages with a specific tag.

When synchronous translation is enabled, the tag will refer to the default language. However, if the user turns off
synchronous translation, the tag will refer to the page’s language. This could mean the user references a translated tag
within the translated page, causing the query to miss some pages tagged with the original tag.

To solve this, you can query both the default language and the current language, then filter based on the active
language.

@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.07%. Comparing base (caf14b8) to head (e625887).

Additional details and impacted files
@@           Coverage Diff            @@
##             main     #836    +/-   ##
========================================
  Coverage   93.07%   93.07%            
========================================
  Files          47       47            
  Lines        4144     4144            
  Branches      704      529   -175     
========================================
  Hits         3857     3857            
  Misses        173      173            
  Partials      114      114            

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

@zerolab
Copy link
Collaborator

zerolab commented Dec 19, 2024

Thanks @onno-timmerman, merged in 2c2600a

@zerolab zerolab closed this Dec 19, 2024
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