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

Number and DateTime Formatting does not work for an fallbackLocale Array with multiple entries #852

Closed
JoCa96 opened this issue Apr 20, 2020 · 0 comments · Fixed by #858
Closed
Labels
help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes

Comments

@JoCa96
Copy link

JoCa96 commented Apr 20, 2020

vue & vue-i18n version

2.6.11, 8.17.3

Reproduction Link

https://codesandbox.io/s/number-and-datetime-formatting-does-not-work-for-an-fallbacklocale-array-with-multiple-entries-8g6nq

Steps to reproduce

  1. Setup vue & vue-i18n
  2. In the vue-i18n config provide numberFormats and dateTimeFormats for a language code
  3. In the vue-i18n config provide an array for fallbackLocale, where a language code is the one for which you defined numberFormats and dateTimeFormats
  4. Make sure that the fallbackLocale array does have multiple entries and the default locale does not have any formats defined
  5. In your template use $d and $n with a format that is only available for a language code of the fallbackLocal array
  6. When running the app, check the console logs

What is Expected?

The dates and numbers should be rendered using the available numberFormats and dateTimeFormats for the fallback locale in the fallbackLocale array

What is actually happening?

Nothing is rendered. Instead the console logs the following warnings:
[vue-i18n] Fall back to 'en-us,de' datetime formats from 'en-uk' datetime formats.
[vue-i18n] Fall back to 'en-us,de' number formats from 'en-uk' number formats.

@kazupon kazupon added Type: Bug Bug or Bug fixes help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request labels Apr 22, 2020
kazupon added a commit that referenced this issue Apr 25, 2020
kazupon added a commit that referenced this issue Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants