Fix i18n default formats injection into en.json#20929
Merged
LeanidShutau merged 2 commits intoelastic:masterfrom Jul 19, 2018
Merged
Fix i18n default formats injection into en.json#20929LeanidShutau merged 2 commits intoelastic:masterfrom
LeanidShutau merged 2 commits intoelastic:masterfrom
Conversation
Contributor
💚 Build Succeeded |
azasypkin
approved these changes
Jul 18, 2018
Contributor
azasypkin
left a comment
There was a problem hiding this comment.
LGTM, just a minor nit. Thanks!
|
|
||
| const extractedObject = JSON5.parse(extractedJSONBuffer.toString()); | ||
|
|
||
| expect(extractedObject).toHaveProperty('formats'); |
Contributor
There was a problem hiding this comment.
nit: maybe use toMatchSnapshot instead of toHaveProperty to make sure it's a valid formats object we expect?
771e9f9 to
d12d173
Compare
Contributor
💚 Build Succeeded |
LeanidShutau
added a commit
to LeanidShutau/kibana
that referenced
this pull request
Aug 3, 2018
* Fix i18n default formats injection into en.json * Use snapshots for tests
LeanidShutau
added a commit
that referenced
this pull request
Aug 3, 2018
Contributor
Author
|
6.x/6.5: ff39ac1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug:
en.jsongenerated by default messages extraction tool doesn't containformatsobject.#19620 imports
{ formats } from '@kbn/i18n'to inject it intoen.json, but@kbn/i18npackage structure was changed in #20513, soformatsisundefinednow.How to test
Copy https://gist.github.com/LeanidShutau/6026b1ab9cc7e7b9d457676616abeb68 to
src/core_plugins/kibana/common.Before fix
Run
node scripts/extract_default_translations src/core_plugins/kibana.Open
src/core_plugins/kibana/translations/en.json.formatsproperty is missing inen.json.After fix
Run
node scripts/extract_default_translations src/core_plugins/kibana.Open
src/core_plugins/kibana/translations/en.json.Default formats object is injected into
en.json.