This repository was archived by the owner on Dec 31, 2024. It is now read-only.
feat(examples/formatting): update custom formatter example#781
Merged
kazupon merged 2 commits intokazupon:v8.xfrom Feb 14, 2020
Merged
feat(examples/formatting): update custom formatter example#781kazupon merged 2 commits intokazupon:v8.xfrom
kazupon merged 2 commits intokazupon:v8.xfrom
Conversation
erickwilder
commented
Feb 12, 2020
|
|
||
| if (values !== null && values !== undefined) { | ||
| /** | ||
| * Component interpolation in the following format passes `values` as an Array-like `Object` |
Contributor
Author
There was a problem hiding this comment.
Is this an expected behaviour/known issue of vue-i18n or should I report this as a bug?
bf4fa03 to
f3a97e9
Compare
Use the new `messageformat` interface[1] that changes the data type from compiled messageformat functions to arrays, instead of the old behavior that converted everything to strings. The old behaviour of `messageformat` could not be used without some string manipulation hack to make component interpolation to work. This also takes into consideration the simplified interpolation, slot-based interpolation, and the _deprecated_ `place`/`places` interpolation styles. **Other changes** * Update dependencies; there was a bug in the vue-i18n version that prevented slot-based interpolation to correctly pass `values` to custom formatters. * Update all vue-related dependencies to remove compromised packages reported by `npm audit` [1] messageformat/messageformat#242
53f42a1 to
debb464
Compare
Contributor
Author
|
e2e tests seem to be failing due to a version mismatch between Chrome/ChromeDriver. I can't see in the CircleCI configuration which version of ChromeDriver is installed but their docs use different methods to install Chrome than what's used in here. If anyone could pick this up or point me in the right path to fix it, I'm glad to help. |
kazupon
approved these changes
Feb 14, 2020
Owner
|
Thanks! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Use the new
messageformatinterface[1] that changes the data type from compiled messageformatfunctions to arrays, instead of the old behaviour that converted everything to strings. The old
behaviour of
messageformatcould not be used without some string manipulation hack to makecomponent interpolation to work.
This also takes into consideration the simplified interpolation, slot-based interpolation, and
the deprecated
place/placesinterpolation styles.Other changes
to correctly pass
valuesto custom formatters.npm audit[1] messageformat/messageformat#242