-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove injectI18n in management. #45876
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
014cb29
to
7b27091
Compare
Pinging @elastic/kibana-app-arch |
7b27091
to
f1e941e
Compare
retest |
💔 Build Failed
|
Looks like there are more changes to src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/snapshots/field.test.js.snap than wanted. |
It might be easier to break this PR up into a series of smaller PRs particularly due to the failing functional tests |
7b27091
to
bc909ac
Compare
Fixes. Fixes.
This reverts commit bc909ac791160c32581097107dad13c184fc77cb.
bc909ac
to
26eadbe
Compare
|
retest |
@@ -21,7 +21,7 @@ import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; | |||
|
|||
import { TableComponent } from '../table'; | |||
import { Table } from '../table'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
💔 Build Failed |
retest |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. thanks!
retest |
💔 Build Failed |
retest |
💚 Build Succeeded |
* Remove injectI18n in management
* Remove injectI18n in management
Summary
Inspired by #44043. Related to #38610.
Update to recommended usage of localization, using
i18n.translate
instead of injectedintl
prop in Dashboard app.According to the I18n doc, it is recommended to avoid
injectI18n
and usei18n.translate
instead.Notes
Field.js
, it wasn't simple. In jest test,Field.js
usessetProps
and it doesn't work with child node. It only works with the root node.. So, I had to remove allFormattedMessage
fromField.js
to usemount()
function.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
Note