-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Add fallback formatting #637
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #637 +/- ##
=========================================
+ Coverage 96.18% 96.2% +0.01%
=========================================
Files 10 10
Lines 787 791 +4
=========================================
+ Hits 757 761 +4
Misses 30 30
Continue to review full report at Codecov.
|
Any comments, @kazupon? |
@sebwas That's a very interesting feature request! We can use that feature for key like message (e.g. |
src/index.js
Outdated
|
||
return this._render(key, 'string', parsedArgs.params, key) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/kazupon/vue-i18n/pull/637/files#diff-1fdf421c05c1140f6d71444ea2b27638R266
We need to change from _warnDefault
, due to have some behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't exactly understand what you mean. Do you mean we should change the wording here, or?
Hello what about this issue #296 ? I think this would be worth to reopen, can I submit a PR ? |
This pull request aims to add formatting of fallback messages if that's desired (it's completely controllable by the i18n options and the default is to turn it off (so that it's 100% backwards compatible))
Turn it on by setting the
formatFallbackMessages
totrue
.The use case is simple: When using the whole string to be translated as key, you will want to format the messages nonetheless: