-
Notifications
You must be signed in to change notification settings - Fork 4
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
query field translations + richtext #716
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
You should add to PR description that you have added localized value for title as well. |
7c9d77f
to
a4f8559
Compare
"Hijacked" this PR to also include handling of field translations in GROQ queries. |
a4f8559
to
51a3a40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure you also update the PR description
01e877a
to
63e475b
Compare
a0765b2
to
037c352
Compare
instead of "Missing title", which is a valid page title and not obviously an error
037c352
to
802cc57
Compare
Updated GROQ queries to take language into account. This way we only fetch the translation for the current language, and web components don't have to handle unpacking internationalized strings. The downside is added complexity in the GROQ queries. This is somewhat alleviated by defining reusable query "fragments".
Examples:
As an example on how to add translations to richText, this PR adds richtext translations in benefit
Visual Overview (Image/Video)
Translated rich text in benefits:
Checklist
Please ensure that you’ve completed the following checkpoints before submitting your pull request: