feat: Traditional Chinese (zh-TW) + CJK font fallback + global-hotkey unregister fix#333
Open
3134q108-del wants to merge 2 commits into
Open
feat: Traditional Chinese (zh-TW) + CJK font fallback + global-hotkey unregister fix#3333134q108-del wants to merge 2 commits into
3134q108-del wants to merge 2 commits into
Conversation
Register Traditional Chinese (Taiwan) as a selectable language and ship its locale files. Also add a CJK font fallback to the global font stack so Chinese characters render with one consistent font instead of per-glyph system fallback, which caused inconsistent stroke weights. - Add zhTW locale folder and register it in languges.ts - Map zhTW for time-ago (locales.ts) and date-fns (date-locales) - Add Microsoft JhengHei / PingFang TC / Noto Sans TC to the sans stack (globals.css body + tailwind.config.js) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changing a global hotkey registered the new shortcut without releasing the old one, so the previous combination stayed grabbed system-wide until restart (e.g. setting Ctrl+V then changing it left Ctrl+V hijacked, breaking normal paste). Call unregisterAll() before (re)registering on the main window so a hotkey change takes effect cleanly without a restart. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds Traditional Chinese (zh-TW) support, fixes CJK font rendering, and fixes a global-hotkey bug.
1. Traditional Chinese (zh-TW) — feat(i18n)
languges.ts) and ship its locale folder (src/locales/lang/zhTW).locales.ts) and date-fns (date-locales) for zh-TW.2. CJK font fallback — feat(i18n)
Interonly (Latin), so CJK characters fell back per-glyph to whatever system font, causing inconsistent stroke weights.Microsoft JhengHei/PingFang TC/Noto Sans TCto the sans stack (globals.cssbody +tailwind.config.js). This also improves the existingzhCNandjalocales.3. Global hotkey not released on change — fix
Ctrl+Vthen changing it leftCtrl+Vhijacked, breaking normal paste).unregisterAll()before (re)registering on the main window inApp.tsx.How to test
Notes
The zh-TW translation content has a companion PR to the translation repo: PasteBar/pastebar-localization#12
🤖 Generated with Claude Code