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

Linked messages doesn't support chinese character as key #1809

Closed
4 tasks done
yionr opened this issue Apr 19, 2024 · 1 comment · Fixed by #1813
Closed
4 tasks done

Linked messages doesn't support chinese character as key #1809

yionr opened this issue Apr 19, 2024 · 1 comment · Fixed by #1813
Labels
🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage Status: Review Needed Request for review comments Type: Bug Bug or Bug fixes

Comments

@yionr
Copy link

yionr commented Apr 19, 2024

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

image

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

@yionr yionr added the Status: Review Needed Request for review comments label Apr 19, 2024
@kazupon kazupon added Type: Bug Bug or Bug fixes 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage Status: Review Needed Request for review comments and removed Status: Review Needed Request for review comments labels Apr 20, 2024 — with Volta.net
@yionr
Copy link
Author

yionr commented Apr 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage Status: Review Needed Request for review comments Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants