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

Update mixin.js #995

Merged
merged 5 commits into from Sep 11, 2020
Merged

Update mixin.js #995

merged 5 commits into from Sep 11, 2020

Conversation

ferencbeutel4711
Copy link
Contributor

@ferencbeutel4711 ferencbeutel4711 commented Sep 9, 2020

This PR fixes a bug that happens when a SFC has a <i18n> block aswell as a i18n configuration in the Vue Component options.
Previously, the i18n configuration from the Vue Component options would be overridden by the <i18n> block; Using this new behaviour, the <i18n> block and the i18n configuration from the Vue Component options are merged.
This also helps to provide mixin support, since now a consumer of this library can have a SFC as a parent component, which uses a Vue mixin, and using a custom vue optionMergeStrategy, full mixin support can be achieved from consumer side.

This issue fixes a bug that happens when a SFC has a <i18n> block aswell as a i18n configuration in the Vue Component options.
Previously, the i18n configuration from the Vue Component options would be overridden by the <i18n> block; Using this new behaviour, the <i18n> block and the i18n configuration from the Vue Component options are merged.
This also helps to provide mixin support, since now a consumer of this library can have a SFC as a parent component, which uses a Vue mixin, and using a custom vue optionMergeStrategy, full mixin support can be achieved from consumer side.
@kazupon
Copy link
Owner

kazupon commented Sep 10, 2020

Thank you for your PR!
Could you add the unit tests please? 🙏

@ferencbeutel4711
Copy link
Contributor Author

Hi kazupon, thank you for recognizing the PR :)
I have added a unit test. As I am not really familiar with the codebase, I hope that I've done it correctly.

@kazupon
Copy link
Owner

kazupon commented Sep 11, 2020

@ferencbeutel4711
Thanks! 👍
LGTM!

@kazupon kazupon merged commit 2b7eab7 into kazupon:v8.x Sep 11, 2020
@kazupon kazupon added the Type: Bug Bug or Bug fixes label Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants