Add storybook-react-i18next
addon
#9879
Replies: 5 comments 5 replies
-
Nice idea @TylerAPfledderer Since translations are an important thing on the website I think this is something we would require for testing purposes. Talking about the implementation, this addon is not compatible with SB v7 yet. There is currently a PR to tackle this stevensacks/storybook-react-i18next#17 we might need to wait until they merge that PR in order to make it work. |
Beta Was this translation helpful? Give feedback.
-
Another thing I was thinking is whether there is a way we can avoid using There is another addon called just |
Beta Was this translation helpful? Give feedback.
-
@pettinarip so There are also loader issues with Gatsby in regards to any Gatsby-specific methods or similar (i.e. Gatsby The reason the stories I initially made or ones in open PRs seem to work is because Gatsby components or methods are not involved. This means that the There look to be two known GH issues addressing this: storybookjs/storybook#22065 And there is a 7.0 project burndown (filter to just items that mention Gatsby) I was not expecting this to be a problem 😞 |
Beta Was this translation helpful? Give feedback.
-
Uhmm I see. So the I guess that we don't have any other thing to do until someone has a fix for that. Maybe...as a temporary patch, until there is an official solution, we could create a new |
Beta Was this translation helpful? Give feedback.
-
@pettinarip Opened up PR #10234 in draft for now.
|
Beta Was this translation helpful? Give feedback.
-
This discussion is to consider adding the addon
storybook-react-i18next
to the Storybook configuration to account for stories attached to components that run translations.Without this addon, a story might throw the following error stack. (Example is the custom
Link
component):There are two variations in approach to the setup described in the Storybook docs.
With this addon, you can customize the languages that you want to cycle through in the story using the context provided by react-i18next.
Known issue(s) and point(s) of note
Beta Was this translation helpful? Give feedback.
All reactions