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

Fallback formatting fails when key is not defined in fallback translation #1700

Open
5 tasks done
tastendruecker opened this issue Mar 27, 2024 · 1 comment
Open
5 tasks done
Labels
Status: Review Needed Request for review comments

Comments

@tastendruecker
Copy link

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

@tastendruecker tastendruecker added the Status: Review Needed Request for review comments label Mar 27, 2024
@simondaigre
Copy link

Same issue with vue-i18n v10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

2 participants