Fallback formatting fails when key is not defined in fallback translation
tastendruecker opened this issue · 1 comments
tastendruecker commented
Reporting a bug?
The behaviour described in https://kazupon.github.io/vue-i18n/guide/fallback.html#fallback-interpolation does not work, at least with vue-i18n v9.10.2. One can not use the key as a template because included placeholder/parameters will not be replaced when a key and it's returned translation are identical, even if formatFallbackMessages is set to true.
Expected behavior
If formatFallbackMessages is set to true untranslated keys (i.e. key and its translation are identical) should have their parameters replaced.
Reproduction
Simply try the code from https://kazupon.github.io/vue-i18n/guide/fallback.html#fallback-interpolation
System Info
System:
OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Memory: 10.41 GB / 31.03 GB
Container: Yes
Shell: 5.1.4 - /bin/bash
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
Yarn: 1.22.21 - /usr/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
npmPackages:
@vue/cli-plugin-babel: ^5.0.8 => 5.0.8
@vue/cli-plugin-eslint: ^5.0.8 => 5.0.8
@vue/cli-plugin-vuex: ^5.0.8 => 5.0.8
@vue/cli-service: ^5.0.8 => 5.0.8
@vue/compiler-sfc: ^3.4.21 => 3.4.21
@vue/eslint-config-prettier: ^9.0.0 => 9.0.0
@vue/test-utils: ^2.4.5 => 2.4.5
vue: ^3.4.21 => 3.4.21
vue-axios: ^3.5.2 => 3.5.2
vue-content-loader: ^2.0.1 => 2.0.1
vue-directive-tooltip: ^1.6.3 => 1.6.3
vue-i18n: ^9.10.2 => 9.10.2
vue-lazyload: ^3.0.0 => 3.0.0
vue-loader: ^17.4.2 => 17.4.2
vue3-toastify: ^0.2.1 => 0.2.1
vuex: ^4.1.0 => 4.1.0
vuex-persist: ^3.1.3 => 3.1.3
vuex4-i18n: ^4.0.4 => 4.0.4
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 Discussion
- The provided reproduction is a minimal reproducible example of the bug.