Using a implicit fallback throws a warning in the console
jleifeld opened this issue · comments
Reporting a bug?
When using implicit fallback values it would make sense not to throw warnings because this is intended. Example:
You are using en-GB
and en-US
as languages. You don't want to have duplicated snippets for almost the same language. So you are using en
for all these snippets like in this guide: https://vue-i18n.intlify.dev/guide/essentials/fallback.html#implicit-fallback-using-locales
But now you still get warnings that there is no snippet defined. For non-implicit fallbacks, e.g. jp to en, this makes sense. But for implicit fallbacks this should not be the case.
Expected behavior
No console warning should be thrown.
Reproduction
https://stackblitz.com/edit/vitejs-vite-4qtyea?file=src%2Fmain.js
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.3 - /usr/local/bin/pnpm
npmPackages:
@vitejs/plugin-vue: ^5.0.4 => 5.0.4
vite: ^5.1.6 => 5.1.6
vue: ^3.4.21 => 3.4.21
vue-i18n: ^9.10.2 => 9.10.2
Screenshot
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussions
Thank you for your feedback!
When using implicit fallback values it would make sense not to throw warnings because this is intended. Example:
You are usingen-GB
anden-US
as languages. You don't want to have duplicated snippets for almost the same language. So you are usingen
for all these snippets like in this guide: https://vue-i18n.intlify.dev/guide/essentials/fallback.html#implicit-fallback-using-locales
That is make sense.
let's improve it