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

i18n(zh-TW): Can add Traditional Chinese a i18n Translations #3223

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ i18n:
- src/content/docs/fr/**/*
- src/content/docs/it/**/*
- src/content/docs/zh-cn/**/*
- src/content/docs/zh-tw/**/*
- src/content/docs/ja/**/*

"i18n: es":
Expand All @@ -19,6 +20,9 @@ i18n:
"i18n: zh-cn":
- src/content/docs/zh-cn/**/*

"i18n: zh-tw":
- src/content/docs/zh-tw/**/*

"i18n: ja":
- src/content/docs/ja/**/*

22 changes: 22 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -145,41 +145,47 @@ export default defineConfig({
label: 'Guides',
translations: {
'zh-CN': '指引',
'zh-TW': '指南',
},
collapsed: true,
items: [
{
label: 'Quick Start',
translations: {
'zh-CN': '快速开始',
'zh-TW': '快速開始',
},
collapsed: true,
items: [
{
label: 'What is Tauri?',
translations: {
'zh-CN': '什么是 Tauri?',
'zh-TW': '什麼是 Tauri?',
},
link: '/start/',
},
{
label: 'Prerequisites',
translations: {
'zh-CN': '前置条件',
'zh-TW': '前置條件',
},
link: '/start/prerequisites/',
},
{
label: 'Create a Project',
translations: {
'zh-CN': '创建项目',
'zh-TW': '建立專案',
},
link: '/start/create-project/',
},
{
label: 'Frontend Configuration',
translations: {
'zh-CN': '前端配置',
'zh-TW': '前端組態設置',
},
collapsed: true,
autogenerate: { directory: 'start/frontend' },
Expand All @@ -188,6 +194,7 @@ export default defineConfig({
label: 'Upgrade & Migrate',
translations: {
'zh-CN': '升级和迁移',
'zh-TW': '升級和遷移',
},
collapsed: true,
autogenerate: { directory: 'start/migrate' },
Expand All @@ -198,6 +205,7 @@ export default defineConfig({
label: 'Core Concepts',
translations: {
'zh-CN': '核心概念',
'zh-TW': '核心概念',
},
collapsed: true,
autogenerate: { directory: 'concept' },
Expand All @@ -206,6 +214,7 @@ export default defineConfig({
label: 'Security',
translations: {
'zh-CN': '安全',
'zh-TW': '安全',
},
collapsed: true,
autogenerate: { directory: 'security' },
Expand All @@ -214,6 +223,7 @@ export default defineConfig({
label: 'Develop',
translations: {
'zh-CN': '开发',
'zh-TW': '開發',
},
collapsed: true,
autogenerate: { directory: 'develop' },
Expand All @@ -222,6 +232,7 @@ export default defineConfig({
label: 'Distribute',
translations: {
'zh-CN': '分发',
'zh-TW': '分發',
},
collapsed: true,
autogenerate: { directory: 'distribute' },
Expand All @@ -230,6 +241,7 @@ export default defineConfig({
label: 'Learn',
translations: {
'zh-CN': '学习',
'zh-TW': '學習',
},
collapsed: true,
autogenerate: { directory: 'learn' },
Expand All @@ -238,6 +250,7 @@ export default defineConfig({
label: 'Plugins',
translations: {
'zh-CN': '插件',
'zh-TW': '外掛',
},
collapsed: true,
autogenerate: { directory: 'plugin' },
Expand All @@ -246,6 +259,7 @@ export default defineConfig({
label: 'About',
translations: {
'zh-CN': '关于',
'zh-TW': '關於',
},
collapsed: true,
autogenerate: { directory: 'about' },
Expand All @@ -256,13 +270,15 @@ export default defineConfig({
label: 'References',
translations: {
'zh-CN': '参考',
'zh-TW': '參考',
},
collapsed: true,
items: [
{
label: 'Security',
translations: {
'zh-CN': '安全',
'zh-TW': '安全',
},
collapsed: true,
autogenerate: { directory: 'reference/acl' },
Expand All @@ -271,34 +287,39 @@ export default defineConfig({
label: 'Command Line Interface',
translations: {
'zh-CN': '命令行接口(CLI)',
'zh-TW': '命令列介面(CLI)',
},
link: '/reference/cli/',
},
{
label: 'Configuration',
translations: {
'zh-CN': '配置',
'zh-TW': '組態設置',
},
link: '/reference/config/',
},
{
label: 'Environment Variables',
translations: {
'zh-CN': '环境变量',
'zh-TW': '環境變數',
},
link: '/reference/environment-variables/',
},
{
label: 'Webview Versions',
translations: {
'zh-CN': 'Webview 版本',
'zh-TW': 'Webview 版本',
},
link: '/reference/webview-versions/',
},
{
label: 'Releases',
translations: {
'zh-CN': '发行版',
'zh-TW': '發行版',
},
collapsed: true,
autogenerate: { directory: 'release' },
Expand All @@ -318,6 +339,7 @@ export default defineConfig({
label: 'Blog',
translations: {
'zh-CN': '博客',
'zh-TW': '部落格',
},
collapsed: true,
items: [
Expand Down
4 changes: 4 additions & 0 deletions locales.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"label": "简体中文",
"lang": "zh-cn"
},
"zh-tw": {
"label": "繁體中文",
"lang": "zh-tw"
},
"ja": {
"label": "日本語",
"lang": "ja"
Expand Down
5 changes: 3 additions & 2 deletions lunaria/style.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
:root {
color-scheme: dark;

--font-fallback: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
Apple Color Emoji, Segoe UI Emoji;
--font-fallback:
-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji,
Segoe UI Emoji;
--font-body: system-ui, var(--font-fallback);
--theme-accent: hsl(186, 100%, 87%);
--theme-bg: hsl(186, 13%, 10%);
Expand Down
45 changes: 45 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Makefile for Node.js project using pnpm

NODE_ENV ?= development
PNPM = pnpm

.PHONY: all dev build test format clean update serve help

all: install

install:
$(PNPM) install

dev:
$(PNPM) run dev

build:
$(PNPM) run build

test:
$(PNPM) run test

format:
$(PNPM) run format

clean:
$(PNPM) store prune
rm -rf node_modules
rm -rf dist

update:
$(PNPM) update

serve:
$(PNPM) run start

help:
@echo "Available Make targets:"
@echo " install - Install project dependencies"
@echo " dev - Start development server"
@echo " build - Build production version"
@echo " test - Run tests"
@echo " format - Run code formatting"
@echo " clean - Clean build artifacts"
@echo " update - Update dependencies"
@echo " serve - Start server"
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"preview": "astro preview"
},
"dependencies": {
"@astrojs/markdown-remark": "^5.2.0",
"@astrojs/rss": "^4.0.7",
"@astrojs/markdown-remark": "^5.3.0",
"@astrojs/rss": "^4.0.11",
"@astrojs/starlight": "0.29.2",
"@lorenzo_lewis/starlight-utils": "^0.2.0",
"@lunariajs/core": "^0.1.1",
Expand All @@ -34,14 +34,14 @@
"astro-feelback": "^0.3.4",
"astrojs-service-worker": "^2.0.0",
"jsdom": "^26.0.0",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.14.0",
"prettier": "^3.5.3",
"prettier-plugin-astro": "^0.14.1",
"rehype-autolink-headings": "^7.1.0",
"sass": "^1.77.2",
"sharp": "^0.33.2",
"shiki": "^1.1.7",
"sass": "^1.86.0",
"sharp": "^0.33.5",
"shiki": "^1.29.2",
"starlight-blog": "^0.15.0",
"starlight-links-validator": "^0.13.0"
"starlight-links-validator": "^0.13.4"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tauri
Submodule tauri updated from 053b57 to 5ae507
Loading