-
Notifications
You must be signed in to change notification settings - Fork 99
feat(cli): translate #181
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
feat(cli): translate #181
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,105 @@ | ||||||
| import process from 'node:process'; | ||||||
| import createDebug from 'debug'; | ||||||
| import { CopilotClient } from '@github/copilot-sdk'; | ||||||
| import { pathExists } from '../util.js'; | ||||||
| import { defaultWorkshopFile } from '../constants.js'; | ||||||
|
|
||||||
| const debug = createDebug('translate'); | ||||||
| const translationsFolder = 'translations'; | ||||||
|
|
||||||
| const translatePrompt = (file: string, languages: string) => `## Role | ||||||
| You are an expert translator for technical documents. Your task is to translate the provided workshop content into the specified target language while preserving the original formatting, code snippets, and technical terminology. Ensure that the translated content is complete, clear, accurate, and maintains the instructional tone of the original text. | ||||||
| ## Task | ||||||
| 1. Translate the workshop file \`${file}\` in languages: \`${languages}\`. | ||||||
|
||||||
| 1. Translate the workshop file \`${file}\` in languages: \`${languages}\`. | |
| 1. Translate the workshop file \`${file}\` into languages: \`${languages}\`. |
Copilot
AI
Jan 23, 2026
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 'verbose' option is accepted in the TranslateOptions type and passed from the CLI, but it is never used in the translate function implementation. Either implement verbose logging (similar to other commands in the codebase) or remove this unused parameter.
Uh oh!
There was an error while loading. Please reload this page.