feat(tools): add batch translation support with parallel processing #1099
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
翻訳ツール (
pnpm run translate) にディレクトリ対応と並列翻訳機能を追加しました。変更内容
機能追加
Glob パターン対応
.en.md/.en.ts/.en.jsonファイルを自動除外並列処理制御
-c/--concurrencyオプションで並列数を指定(デフォルト: 2)p-limitパッケージを使用して並列実行を制御翻訳済みファイル管理
.en.mdが存在するファイルをスキップ--forceオプションで翻訳済みファイルも再処理エラーハンドリング改善
使用例
技術的詳細
p-limit@7.2.0を新規追加/tmp/translate-errors-{timestamp}.logに詳細を保存.en.mdファイルの存在確認で判定動作確認
-c/--concurrency): ✅--forceオプション: ✅