fix(i18n): properly share i18n instance across JS modules#629
Merged
baptistegrimaud merged 2 commits intomainfrom Feb 3, 2026
Merged
fix(i18n): properly share i18n instance across JS modules#629baptistegrimaud merged 2 commits intomainfrom
baptistegrimaud merged 2 commits intomainfrom
Conversation
2d07cff to
de8d0ca
Compare
de8d0ca to
264f716
Compare
Member
|
Too bad we're forced to use We can keep changes in hydrogen, but I'd like the create-module hello world to stay the same (it does not make much sense to have a |
GauBen
approved these changes
Jan 30, 2026
javascript-create-module/templates/hello-world/settings/locales/en.json
Outdated
Show resolved
Hide resolved
javascript-create-module/templates/hello-world/settings/locales/fr.json
Outdated
Show resolved
Hide resolved
javascript-create-module/templates/hello-world/src/components/Hello/World/Celebrate.client.tsx
Outdated
Show resolved
Hide resolved
javascript-create-module/templates/hello-world/src/components/Hello/World/Celebrate.client.tsx
Outdated
Show resolved
Hide resolved
javascript-create-module/templates/hello-world/src/components/Hello/World/Celebrate.client.tsx
Outdated
Show resolved
Hide resolved
javascript-create-module/templates/hello-world/src/components/Hello/World/Celebrate.client.tsx
Outdated
Show resolved
Hide resolved
javascript-create-module/templates/hello-world/src/components/Hello/World/Celebrate.client.tsx
Outdated
Show resolved
Hide resolved
Member
|
All good! |
This was referenced Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #317.
Description
Resolves i18n context conflicts when multiple components of different JavaScript modules are rendered on the same page. It ensures a single i18next instance is shared, with proper namespace handling via React context.
Components must use the
useTranslation()hook to prevent hydration mismatches and enable seamless client-side translations across modules.Checklist
Tests
Tip
Documentation to guide the reviews: How to do a code review