Skip to content

Conversation

sawyerh
Copy link
Contributor

@sawyerh sawyerh commented Aug 4, 2023

Changes

  • Define which i18n namespace should be loaded if not defined at the page/component level. This fixes an issue I observed when Storybook is deployed to Chromatic, where Chromatic would be very slow to load because it attempts to load translation.json which is the default ns when it's not defined in the config.

Context for reviewers

https://www.i18next.com/overview/configuration-options#languages-namespaces-resources

Testing

Before, in Chromatic

It would make several attempts to load the translation file, and would only render the story after six failed requests:

CleanShot 2023-08-04 at 14 24 34@2x

After, in Chromatic

No errors, and the Story loads right away

CleanShot 2023-08-04 at 14 26 49@2x

@sawyerh sawyerh requested review from lorenyu and a team August 4, 2023 21:51
@sawyerh sawyerh merged commit 83c1dc9 into main Aug 4, 2023
@sawyerh sawyerh deleted the sawyerh/fix-default-i18n-namepsace branch August 4, 2023 22:54
daphnegold added a commit to HHS/simpler-grants-gov that referenced this pull request Aug 21, 2023
daphnegold added a commit to HHS/simpler-grants-gov that referenced this pull request Aug 21, 2023
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.

2 participants