-
Notifications
You must be signed in to change notification settings - Fork 254
feat: 添加中文模板支持 (Add Chinese Template Support) #109
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @Pimzino , just created a PR to Add Chinese Template Support (and potentially any language support). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds internationalization (i18n) support to the Spec Workflow MCP server, enabling users to specify their preferred language for template generation. The implementation adds a --language CLI parameter that supports Chinese (zh) templates initially, with infrastructure to support additional languages (ja, es, fr, de, it, ko, ar) as mentioned in the help text.
Key changes:
- Added language parameter support to CLI with both
--language zhand--language=zhformats - Modified
WorkspaceInitializerto accept language parameter and implement template selection logic with fallback to English - Created Chinese (zh) translations for all 6 template files (product, requirements, design, tech, structure, tasks)
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Added --language CLI parameter parsing with validation and help documentation |
| src/server.ts | Updated WorkspaceInitializer instantiation to pass language parameter |
| src/core/workspace-initializer.ts | Implemented language-aware template loading with fallback mechanism |
| src/markdown/templates/zh/*.md | Added Chinese translations for all 6 template files |
| README.md | Added language support documentation with Chinese usage examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Use Japanese templates | ||
| npx -y @pimzino/spec-workflow-mcp@latest /path/to/your/project --language ja | ||
|
|
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation lists Japanese (ja) as a supported language in line 114 and in the help text (line 34 of index.ts), but no Japanese templates exist in the codebase. Either add the Japanese templates in src/markdown/templates/ja/ or remove references to Japanese language support from the documentation until templates are available.
| # Use Japanese templates | |
| npx -y @pimzino/spec-workflow-mcp@latest /path/to/your/project --language ja |
| --language <code> Set language for internationalization (e.g., zh, en, ja) | ||
| Supported languages: en, zh, ja, es, fr, de, it, ko, ar |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The help text claims support for 9 languages (en, zh, ja, es, fr, de, it, ko, ar), but only English and Chinese templates currently exist. This creates misleading expectations. Either add templates for all listed languages or update the documentation to reflect only currently available languages (en, zh).
| --language <code> Set language for internationalization (e.g., zh, en, ja) | |
| Supported languages: en, zh, ja, es, fr, de, it, ko, ar | |
| --language <code> Set language for internationalization (e.g., zh, en) | |
| Supported languages: en, zh |
🌟 Overview
This PR adds comprehensive Chinese language template support to the spec-workflow-mcp project, including Chinese Markdown templates and enhanced internationalization features.
📝 What's Added
1. Chinese Markdown Templates
src/markdown/templates/zh/tech-template.md- Chinese technical documentation template2. Template Structure
🔧 Technical Changes
File Changes
src/markdown/templates/zh/tech-template.mdInternationalization Support
✅ How to Verify
1. Local Verification
2. Functional Verification
3. Usage Verification
Also test with mcp server mode adding '--language zh'
🎯 Impact Scope
This PR provides complete technical documentation template support for Chinese users, enhancing the project's internationalization capabilities.