Skip to content
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

Fix default language in storybook preview #916

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

bHelland
Copy link
Contributor

Dersom man åpner designmanualen uten å ha språk satt i local-storage så defaultes det til engelsk. Dette fordi i18n i @ndla/ui har følgende detection-order: ['path', 'localStorage', 'htmlTag'].
Storybook sin preview tag har statisk "lang='en'" attributt og derfor blir det engelsk. Denne hacken fikser dette siden det ikke er mulig å sette preview sin "lang" attributt i html-elementet. Se issue storybookjs/storybook#11706

@bHelland bHelland requested a review from gunnarvelle November 15, 2021 13:04
@gunnarvelle gunnarvelle merged commit 3a20e67 into master Nov 16, 2021
@gunnarvelle gunnarvelle deleted the fix-storybook-default-language branch November 16, 2021 11:27
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