Comments (4)
I tried to reproduce this issue.
https://jsfiddle.net/kazupon/y1qtk2tq/16/
I'll try to improve this issue.
from vue-i18n.
Nice example! It is basically demonstrating what we are seeing as well, and when this error occurs it kills all Vue reactivity (in your example, if you try and switch back to 'en' from 'ja' the content does not update locale change).
I find it very odd though. Where in your example are you mutating state outside of the mutation handler? Does mutating state in the plugin count as mutating state outside mutation handlers?
In our example we are NOT using Vuex
to change language at all. As you'll see in my original post above we are changing language in the router
using the beforeEach
hook.
We are very confused why this error only appears in strict: true
mode and when we switch to french, and go to the next route. Any ideas?
Thanks for trying to reproduce!
from vue-i18n.
I find it very odd though. Where in your example are you mutating state outside of the mutation handler? Does mutating state in the plugin count as mutating state outside mutation handlers?
The cause of vuex mutation error is bacause force updating with watcher.update
in Vue instance.
This error occur in vue 1.0.x.
See the below implementation code:
https://github.com/kazupon/vue-i18n/blob/dev/src/override.js#L6-L8
by the way, In Vue 2.0, it does not occur.
http://jsfiddle.net/kazupon/k2z77mv7/7/
We are very confused why this error only appears in strict: true mode and when we switch to french, and go to the next route. Any ideas?
I think you can avoid with using $store.state
.
see the jsfiddle example:
http://jsfiddle.net/kazupon/gva8x8ct/2/
$t
or $tc
can pass the lang
.
from vue-i18n.
release v6.0.0
https://github.com/kazupon/vue-i18n/releases/tag/v6.0.0
from vue-i18n.
Related Issues (20)
- Fallback when value is undefined.
- [Vue3, Vite] Error if string value contain HTML and special characters HOT 3
- Parsing of language file fails when using functions HOT 1
- How to use component interpolation for array (multiple) translations
- Returning an Empty String for Undefined Keys in Vue-i18n HOT 1
- Use pluralization in component interpolation.
- The safari browser does not show words correctly when a language is switched.
- YAML parser doesn't process valid YAML HOT 1
- [v9.8.0] Suppressing automatic locale fallback with `!` breaks `n`/`$n` number formatting HOT 1
- Reuse of international fields
- Avoid duplicate code for `numberFormats` and `dateTimeFormats `
- Avaliblity to set `keySeperator`
- Dynamic currency
- 语言包在线修改
- Fallback formatting fails when key is not defined in fallback translation
- [vue-i18n] Cannot find VueI18n instance!
- Hyphens in placeholders causing error `Unterminated closing brace` in vue-i18n@9 HOT 1
- Uncaught (in promise) SyntaxError: Must be called at the top of a `setup` function
- Keys containing __proto__ are handled inconsistently
- Keys containing 'toString' may have surprising results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-i18n.