Linked messages doesn't support chinese character as key
yionr opened this issue · comments
Reporting a bug?
when use this feature like audit @:状态
, it won't work as expected.
Expected behavior
Linked message with chinese as key can work.
Reproduction
https://stackblitz.com/edit/vitejs-vite-ju6nqb?file=src%2Fmain.ts
System Info
System:
OS: Windows 11 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
Memory: 10.39 GB / 31.89 GB
Binaries:
Node: 21.7.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.18 - ~\env\npmDownload\packages\yarn.CMD
npm: 9.6.2 - ~\env\npmDownload\packages\npm.CMD
pnpm: 8.13.1 - ~\env\npmDownload\pnpm\pnpm.EXE
Browsers:
Edge: Chromium (123.0.2420.97)
Internet Explorer: 11.0.22621.1
Screenshot
Additional context
Use our native language as the translation key can help read page code more easily without some IDE a11y plugin. When use chinese , in most case it worked, now I found only this feature get some problem.
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
Hi @kazupon. Thanks for supporting! By the way can vue-i18n@8.x adopt this fix?
I found the code in src/index.js
, which linkKeyMatcher
and linkKeyPrefixMatcher
two pattern control this. But I have no more idea about how to do. Although /[\u4e00-\u9fa5]/
pattern can do chinese character matching, but in general, the fix should apply to broader scope. At present, I lack the knowledge in this field.