feat: add Chinese i18n, code syntax highlighting, and site localization#4
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: markbang <119404476+markbang@users.noreply.github.com>
… support Co-authored-by: markbang <119404476+markbang@users.noreply.github.com>
Co-authored-by: markbang <119404476+markbang@users.noreply.github.com>
Co-authored-by: markbang <119404476+markbang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize site and add code highlighting with i18n support
feat: add Chinese i18n, code syntax highlighting, and site localization
Mar 7, 2026
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.
Adds Chinese (zh) locale support, integrates highlight.js for code block syntax highlighting in embeds, and localizes all hardcoded site UI text through Paraglide JS message functions.
i18n
zhlocale to Paraglide config and createdmessages/zh.jsonwith full Chinese translationsen.jsonandde.jsonwith ~65 new message keys covering nav, hero, features, integration cards, CTA, footerHeader,Footer,__root, andindex.tsxwithm.*()callsLocaleSwitcher— shows display names (EN / DE / 中文), dropped verbose "Current locale" prefixCode highlighting
highlight.jswith tree-shaken language imports (JS, TS, Python, Go, CSS, HTML, JSON, YAML, SQL, Shell, Markdown)src/lib/highlight.tsexportshighlightCodeBlocks()which runs hljs onpre[data-language] codeelements.dark;.hljs { background: transparent }defers to embed theme's--me-code-bgBuild optimization
hljs-vendormanual chunk in Vite configTest updates
Proxy-based — auto-returns key name for any undefined message, no need to manually add stubsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.jsdelivr.net/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/memos-embed/memos-embed/apps/site/node_modules/.bin/../vite/bin/vite.js build(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/memos-embed/memos-embed/apps/site/node_modules/.bin/../vite/bin/vite.js dev --port 3000 ighlighting o-authored-by: markbang <119404476+markbang@users.noreply.github.com>(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/memos-embed/memos-embed/apps/site/node_modules/.bin/../vite/bin/vite.js build grep -l PluginImportError nlang/paraglide-js/dist/compiler/runtime/strategy.test.js grep(dns block)eu.posthog.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/memos-embed/memos-embed/apps/site/node_modules/.bin/../vite/bin/vite.js build(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/memos-embed/memos-embed/apps/site/node_modules/.bin/../vite/bin/vite.js dev --port 3000 ighlighting o-authored-by: markbang <119404476+markbang@users.noreply.github.com>(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/memos-embed/memos-embed/apps/site/node_modules/.bin/../vite/bin/vite.js dev --port 3000 --local pull.rebase it(dns block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
Summary by cubic
Add full i18n with a new Chinese (zh) locale and language switching across header, footer, and home. Add theme-aware code syntax highlighting in embed previews.
New Features
Bug Fixes
Written for commit b048e39. Summary will update on new commits.