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 i18n usage in flyout_session #31577

Merged
merged 4 commits into from
Feb 21, 2019
Merged

Fix i18n usage in flyout_session #31577

merged 4 commits into from
Feb 21, 2019

Conversation

flash1293
Copy link
Contributor

Switches to I18nContext instead of I18nProvider and documents this.

@flash1293 flash1293 changed the title Fix i18n Fix i18n usage in flyout_session Feb 20, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@azasypkin
Copy link
Member

Test failures seems legit, I guess you just need smth like jest.mock('ui/i18n', () => ({ I18nContext: () => null })); in the failing tests. @flash1293

Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

LGTM with green CI, thanks a lot!

CONTRIBUTING.md Outdated
@@ -21,6 +21,7 @@ A high level overview of our contributing guidelines.
- [Customizing `config/kibana.dev.yml`](#customizing-configkibanadevyml)
- [Setting Up SSL](#setting-up-ssl)
- [Linting](#linting)
- [I18N](#i18n)
Copy link
Member

Choose a reason for hiding this comment

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

nit: let's make it a bit more obvious with something like Internationalization (i18n)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense - I just went with Internationalization (more consistent with other headings)

CONTRIBUTING.md Outdated
@@ -278,6 +279,22 @@ IntelliJ | Settings » Languages & Frameworks » JavaScript » Code Quality To

Another tool we use for enforcing consistent coding style is EditorConfig, which can be set up by installing a plugin in your editor that dynamically updates its configuration. Take a look at the [EditorConfig](http://editorconfig.org/#download) site to find a plugin for your editor, and browse our [`.editorconfig`](https://github.com/elastic/kibana/blob/master/.editorconfig) file to see what config rules we set up.

### I18N

All labels and info texts in Kibana go through an i18n-function to add translation capabilities. Please take a look at the [readme](packages/kbn-i18n/README.md) and the [guideline](packages/kbn-i18n/GUIDELINE.md) of the i18n package on how to do so.
Copy link
Member

Choose a reason for hiding this comment

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

nit: All user-facing labels .....

nit: i18n-function sounds a bit confusing... Maybe something shorter and more pushy like All user-facing labels and info texts in Kibana should be internationalized. or something along these lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Way better, thanks for the suggestion.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293 flash1293 merged commit d253ec0 into elastic:master Feb 21, 2019
@flash1293 flash1293 deleted the fix-i18n branch February 21, 2019 10:14
flash1293 added a commit to flash1293/kibana that referenced this pull request Feb 21, 2019
flash1293 added a commit to flash1293/kibana that referenced this pull request Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants