Skip to content

[Storybook][i18n] initialize i18n with english locale#185033

Merged
Bamieh merged 4 commits intoelastic:mainfrom
Bamieh:i18n_fix_storybook
Jun 7, 2024
Merged

[Storybook][i18n] initialize i18n with english locale#185033
Bamieh merged 4 commits intoelastic:mainfrom
Bamieh:i18n_fix_storybook

Conversation

@Bamieh
Copy link
Copy Markdown
Contributor

@Bamieh Bamieh commented Jun 7, 2024

Summary

We added a check to ensure that i18n is initialized on the browser before any javascript code uses i18n. We need to do the same in the storybook so it works properly.

To summarize in a couple of pictures 😄

Before PR:
image

After PR:

image

cc @petrklapka

@Bamieh Bamieh added release_note:skip Skip the PR/issue when compiling release notes 8.16 candidate labels Jun 7, 2024
@Bamieh Bamieh requested a review from a team as a code owner June 7, 2024 16:23
Copy link
Copy Markdown
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested for 2 plugin Storybook (Security Solution and Threat Intelligence) and 1 package Storybook (kbn-expandable-flyout) and they all work now!
Thanks for fixing this!

@Bamieh
Copy link
Copy Markdown
Contributor Author

Bamieh commented Jun 7, 2024

@elasticmachine merge upstream

@Bamieh Bamieh merged commit 75d6815 into elastic:main Jun 7, 2024
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kibanamachine kibanamachine added v8.15.0 backport:skip This PR does not require backporting labels Jun 7, 2024
@Bamieh Bamieh deleted the i18n_fix_storybook branch June 7, 2024 20:13
eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Jun 13, 2024
## Summary

We added a check to ensure that `i18n` is initialized on the browser
before any javascript code uses `i18n`. We need to do the same in the
storybook so it works properly.

To summarize in a couple of pictures 😄 

**Before PR:**

![image](https://github.com/elastic/kibana/assets/6191849/3a598dd9-963d-4f4a-aa2a-d98a3d7f379a)


**After PR:**


![image](https://github.com/elastic/kibana/assets/6191849/e0f0b4a7-69f4-4eb1-b5b6-14bdfa716caf)


cc @petrklapka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.16 candidate backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants