Browse Source

docs: dev translation guide

Jacky 1 month ago
parent
commit
1d45683b8e

+ 1 - 0
docs/.vitepress/config/en.ts

@@ -28,6 +28,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
             { text: 'Build', link: '/guide/build' },
             { text: 'Project Structure', link: '/guide/project-structure' },
             { text: 'Config Template', link: '/guide/nginx-ui-template' },
+            { text: 'Translation', link: '/guide/dev-translate' },
             { text: 'Contributing', link: '/guide/contributing' }
           ]
         },

+ 1 - 0
docs/.vitepress/config/zh_CN.ts

@@ -33,6 +33,7 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
             { text: '构建', link: '/zh_CN/guide/build' },
             { text: '项目结构', link: '/zh_CN/guide/project-structure' },
             { text: '配置模板', link: '/zh_CN/guide/nginx-ui-template' },
+            { text: '开发翻译', link: '/zh_CN/guide/dev-translate' },
             { text: '贡献代码', link: '/zh_CN/guide/contributing' }
           ]
         },

+ 1 - 0
docs/.vitepress/config/zh_TW.ts

@@ -33,6 +33,7 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
             { text: '構建', link: '/zh_TW/guide/build' },
             { text: '專案結構', link: '/zh_TW/guide/project-structure' },
             { text: '配置模板', link: '/zh_TW/guide/nginx-ui-template' },
+            { text: '開發翻譯', link: '/zh_TW/guide/dev-translate' },
             { text: '貢獻程式碼', link: '/zh_TW/guide/contributing' }
           ]
         },

+ 52 - 0
docs/guide/dev-translate.md

@@ -0,0 +1,52 @@
+# Translation Development Guide
+
+## Weblate Translation Platform
+
+We are excited to announce the public beta of our Weblate translation platform for Nginx UI! This is a significant milestone in our mission to make Nginx UI accessible to users worldwide through comprehensive multilingual support.
+
+**Quick Start:** Visit [Weblate Platform](https://weblate.nginxui.com) to begin translating.
+
+### About Weblate
+
+Weblate is a robust, user-friendly translation management platform that enables community members to contribute translations efficiently. The platform streamlines the localization process with an intuitive interface suitable for contributors of all experience levels.
+
+### How to Contribute
+
+We welcome all community members interested in improving global accessibility for Nginx UI. Your linguistic expertise, whether as a native speaker or proficient user, is valuable to the project.
+
+To begin contributing:
+1. Visit [https://weblate.nginxui.com](https://weblate.nginxui.com)
+2. Create an account or log in with GitHub
+3. Select your target language
+4. Start translating available strings
+
+Your contributions directly help expand Nginx UI's reach to a global audience.
+
+### Support and Feedback
+
+For issues, questions, or enhancement suggestions regarding the translation platform, please submit feedback through our GitHub issues or community channels.
+
+## Local Translation Environment
+
+For developers working on translations locally, we recommend using the i18n-gettext VSCode extension.
+
+**Extension Details:**
+- Documentation: [GitHub Repository](https://github.com/akinoccc/i18n-gettext)
+- VSCode Marketplace: [i18n-gettext Extension](https://marketplace.visualstudio.com/items?itemName=akino.i18n-gettext)
+
+This extension offers AI-powered translation capabilities with high-quality output and support for additional scoring models to validate translations.
+
+## Translation Workflow for Developers
+
+After making code changes that affect translatable content, run these commands to update translation templates:
+
+```bash
+# Generate Go i18n files
+go generate
+
+# Extract translatable strings from the frontend
+cd app
+pnpm gettext:extract
+```
+
+This process ensures all new translatable content is properly added to the translation system.

+ 52 - 0
docs/zh_CN/guide/dev-translate.md

@@ -0,0 +1,52 @@
+# 翻译开发指南
+
+## Weblate 在线翻译平台
+
+我们很高兴地宣布 Nginx UI 的 Weblate 翻译平台现已进入公测阶段!这是我们通过多语言支持让 Nginx UI 面向全球用户的重要里程碑。
+
+**快速开始:** 访问 [Weblate 平台](https://weblate.nginxui.com) 开始翻译工作。
+
+### 关于 Weblate
+
+Weblate 是一个功能强大且用户友好的翻译管理平台,它使社区成员能够高效地贡献翻译。该平台通过直观的界面简化了本地化流程,适合各种经验水平的贡献者使用。
+
+### 如何参与贡献
+
+我们欢迎所有对改善 Nginx UI 全球可访问性感兴趣的社区成员。无论您是母语使用者还是精通其他语言的用户,您的语言专长对项目都非常宝贵。
+
+参与贡献的步骤:
+1. 访问 [https://weblate.nginxui.com](https://weblate.nginxui.com)
+2. 创建账户或使用 GitHub 登录
+3. 选择您的目标语言
+4. 开始翻译可用字符串
+
+您的贡献将直接帮助扩大 Nginx UI 在全球的影响力。
+
+### 支持与反馈
+
+如果您对翻译平台有任何问题、疑问或改进建议,请通过 GitHub issues 或社区渠道提交反馈。
+
+## 本地翻译环境
+
+对于在本地进行翻译工作的开发者,我们推荐使用 i18n-gettext VSCode 扩展。
+
+**扩展详情:**
+- 文档:[GitHub 仓库](https://github.com/akinoccc/i18n-gettext)
+- VSCode 应用商店:[i18n-gettext 扩展](https://marketplace.visualstudio.com/items?itemName=akino.i18n-gettext)
+
+该扩展提供 AI 驱动的翻译功能,具有高质量输出,并支持额外的评分模型来验证翻译质量。
+
+## 开发者翻译工作流
+
+在进行影响可翻译内容的代码更改后,请运行以下命令更新翻译模板:
+
+```bash
+# 生成 Go i18n 文件
+go generate
+
+# 从前端提取可翻译字符串
+cd app
+pnpm gettext:extract
+```
+
+此过程确保所有新的可翻译内容都正确添加到翻译系统中。 

+ 52 - 0
docs/zh_TW/guide/dev-translate.md

@@ -0,0 +1,52 @@
+# 翻譯開發指南
+
+## Weblate 線上翻譯平臺
+
+我們很高興地宣布 Nginx UI 的 Weblate 翻譯平臺現已進入公測階段!這是我們透過多語言支援讓 Nginx UI 面向全球用戶的重要里程碑。
+
+**快速開始:** 訪問 [Weblate 平臺](https://weblate.nginxui.com) 開始翻譯工作。
+
+### 關於 Weblate
+
+Weblate 是一個功能強大且用戶友好的翻譯管理平臺,它使社區成員能夠高效地貢獻翻譯。該平臺透過直觀的界面簡化了本地化流程,適合各種經驗水平的貢獻者使用。
+
+### 如何參與貢獻
+
+我們歡迎所有對改善 Nginx UI 全球可訪問性感興趣的社區成員。無論您是母語使用者還是精通其他語言的用戶,您的語言專長對專案都非常寶貴。
+
+參與貢獻的步驟:
+1. 訪問 [https://weblate.nginxui.com](https://weblate.nginxui.com)
+2. 創建帳戶或使用 GitHub 登入
+3. 選擇您的目標語言
+4. 開始翻譯可用字符串
+
+您的貢獻將直接幫助擴大 Nginx UI 在全球的影響力。
+
+### 支援與反饋
+
+如果您對翻譯平臺有任何問題、疑問或改進建議,請透過 GitHub issues 或社區渠道提交反饋。
+
+## 本地翻譯環境
+
+對於在本地進行翻譯工作的開發者,我們推薦使用 i18n-gettext VSCode 擴展。
+
+**擴展詳情:**
+- 文檔:[GitHub 倉庫](https://github.com/akinoccc/i18n-gettext)
+- VSCode 應用商店:[i18n-gettext 擴展](https://marketplace.visualstudio.com/items?itemName=akino.i18n-gettext)
+
+該擴展提供 AI 驅動的翻譯功能,具有高品質輸出,並支援額外的評分模型來驗證翻譯品質。
+
+## 開發者翻譯工作流
+
+在進行影響可翻譯內容的代碼更改後,請運行以下命令更新翻譯模板:
+
+```bash
+# 生成 Go i18n 文件
+go generate
+
+# 從前端提取可翻譯字符串
+cd app
+pnpm gettext:extract
+```
+
+此過程確保所有新的可翻譯內容都正確添加到翻譯系統中。