Closed Basaingeal closed 10 months ago
Since v0.12, linked messages, where the path has a hyphen in it, end parsing the path at the hyphen. This results in a blank string, plus the hyphenated bit of the path, or matches a path found without the hyphen.
{ "my-message": "'Hello world", "my-linked-message": "@:my-message" }
t('my-linked-message') should result in Hello world.
t('my-linked-message')
Hello world
Instead, it results in -message.
-message
If "my": "Test String" existed, it would result in Test String-message
"my": "Test String"
Test String-message
https://stackblitz.com/edit/github-yae1bq?file=src%2Flocales%2Fen.yml
unplugin-vue-i18n
System: OS: Windows 10 10.0.19045 CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz Memory: 21.54 GB / 63.73 GB Binaries: Node: 18.17.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD pnpm: 8.6.12 - ~\AppData\Roaming\npm\pnpm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (116.0.1938.54) Internet Explorer: 11.0.19041.1566 npmPackages: vite: ^4.0.1 => 4.4.9 vue: ^3.3.2 => 3.3.4 vue-i18n: ^9.3.0 => 9.3.0
No response
Same here... Rollbacked vue-i18n to 9.2.2 and @intlify/unplugin-vue-i18n to 0.12.3 to make it work...
close, this issue was fixed at vue-i18n thanks!
Reporting a bug?
Since v0.12, linked messages, where the path has a hyphen in it, end parsing the path at the hyphen. This results in a blank string, plus the hyphenated bit of the path, or matches a path found without the hyphen.
Expected behavior
t('my-linked-message')
should result inHello world
.Instead, it results in
-message
.If
"my": "Test String"
existed, it would result inTest String-message
Reproduction
https://stackblitz.com/edit/github-yae1bq?file=src%2Flocales%2Fen.yml
Issue Package
unplugin-vue-i18n
System Info
Screenshot
No response
Additional context
No response
Validations