-
Notifications
You must be signed in to change notification settings - Fork 2
feat: specify lang via cli #187
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
Conversation
close IDP-1325
🦋 Changeset detectedLatest commit: 53f5d12 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 a new CLI option to specify the documentation language via the --lang parameter, allowing users to override the language configuration from the command line.
- Adds a new
langCLI option to specify documentation language - Integrates the language parameter through the configuration loading pipeline
- Updates documentation to reflect the new CLI option
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/doom/src/types.ts | Adds lang property to GlobalCliOptions interface |
| packages/doom/src/cli/load-config.ts | Implements language override logic in configuration loading |
| packages/doom/src/cli/index.ts | Adds the --lang CLI option definition |
| docs/zh/start.mdx | Documents the new CLI option in Chinese documentation |
| docs/en/start.mdx | Documents the new CLI option in English documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WalkthroughAdds a new global CLI option (--lang) to specify documentation language, threads it through config loading, updates types, and refreshes English/Chinese docs. Introduces a changeset marking @alauda/doom for a patch release. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as Doom CLI
participant LC as loadConfig
participant GCC as getCommonConfig
participant Plugins as Plugins/Transformers
User->>CLI: doom start --lang en
CLI->>LC: loadConfig({ lang: "en", ... })
LC->>GCC: getCommonConfig({ lang: "en", ... })
note over GCC: Set config.lang if provided<br/>Affects locale resolution and defaults
GCC-->>LC: merged config (lang respected)
LC-->>CLI: final config
CLI->>Plugins: initialize with config.lang
Plugins-->>CLI: ready
CLI-->>User: Dev server starts with selected language
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx,js,jsx,md,yml,yaml,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/doom/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (1)packages/doom/src/cli/load-config.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: JounQin <admin@1stg.me>
commit: |
close IDP-1325
Summary by CodeRabbit