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: crash on using nuxt-i18n properties in a component with i18n options #736

Merged
merged 1 commit into from
May 27, 2020

Conversation

rchl
Copy link
Collaborator

@rchl rchl commented May 27, 2020

When component specifies some VueI18n options using a plain i18n object
in component options, VueI18n creates a separate component-local instance
of itself. That instance wasn't extended with nuxt-i18n-specific properties
that root instance has.

Fix by adding an API in vue-i18n for handling that and use it here.

Resolves #557

@rchl rchl force-pushed the fix/component-local-crash branch 2 times, most recently from 55b6abd to e1f44f4 Compare May 27, 2020 12:09
…ions

When component specifies some VueI18n options using a plain i18n object
in component options, VueI18n creates a separate component-local instance
of itself. That instance wasn't extend with nuxt-i18n-specific properties
that root instance has.

Fix by adding an API in vue-i18n for handling that and use here.

Resolves #557
@rchl rchl force-pushed the fix/component-local-crash branch from e1f44f4 to 659f0aa Compare May 27, 2020 12:23
@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #736 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #736   +/-   ##
=======================================
  Coverage   97.67%   97.67%           
=======================================
  Files           3        3           
  Lines         129      129           
  Branches       35       35           
=======================================
  Hits          126      126           
  Misses          3        3           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b062044...659f0aa. Read the comment docs.

@rchl rchl merged commit fd8b684 into master May 27, 2020
@rchl rchl deleted the fix/component-local-crash branch May 27, 2020 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

this.$i18n.locales undefined when specifying i18n options through component option
1 participant