Skip to content

onesuit/workshop-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Workshop Translator

🌐 Language: English | ν•œκ΅­μ–΄

AI-powered CLI tool for automatically translating AWS Workshop documents.

Key Features

  • πŸ€– AI-Powered Translation: High-quality translation using Claude models (Opus/Sonnet/Haiku)
  • πŸ“š AWS Documentation Integration: Accurate terminology via MCP integration with official AWS docs
  • ⚑ Parallel Processing: Process up to 5 files simultaneously with ThreadPoolExecutor
  • πŸ”„ Session Resume: Continue interrupted work from where you left off
  • πŸ“Š Quality Management: 3-stage workflow: Translation β†’ Review β†’ Validation
  • πŸ‘€ Local Preview: Instantly preview translation results

Architecture

Uses an Orchestrator-centric architecture.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Orchestrator (main.py)                      β”‚
β”‚                    Claude Opus / Sonnet                          β”‚
β”‚                                                                  β”‚
β”‚  Core Principle: Only Orchestrator modifies tasks.md             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   TaskManager     β”‚
                    β”‚   (Singleton)     β”‚
                    β”‚                   β”‚
                    β”‚ β€’ Task state mgmt β”‚
                    β”‚ β€’ Dependency checkβ”‚
                    β”‚ β€’ tasks.md sync   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                     β–Ό                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Translator   β”‚    β”‚   Reviewer    β”‚    β”‚   Validator   β”‚
β”‚    Worker     β”‚    β”‚    Worker     β”‚    β”‚    Worker     β”‚
β”‚  (Stateless)  β”‚    β”‚  (Stateless)  β”‚    β”‚  (Stateless)  β”‚
β”‚ Returns only  β”‚    β”‚ Returns only  β”‚    β”‚ Returns only  β”‚
β”‚   results     β”‚    β”‚   results     β”‚    β”‚   results     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Design Principles

Item Description
Centralized State Management Only Orchestrator (TaskManager) modifies tasks.md
Stateless Workers Sub-agents return results only, no direct state file modification
Automatic Dependency Management TaskManager automatically checks inter-task dependencies
Parallel Processing Up to 5 files processed simultaneously via ThreadPoolExecutor
Session Resume Load existing tasks.md state to continue work

Model Configuration

Model Purpose Features
Claude Opus 4.5 Orchestrator (remote mode) Extended thinking support
Claude Sonnet 4.5 Designer, Translator, Reviewer Balanced performance
Claude Haiku 4.5 Analyzer Fast processing

Workflow

Phase 1: Analysis/Design
    β”œβ”€β”€ analyze_workshop()     β†’ Analyze workshop structure
    └── generate_design()      β†’ Generate design document
           β”‚
           β–Ό
Phase 2: Workflow Initialization
    └── initialize_workflow()  β†’ Initialize TaskManager, create tasks.md
           β”‚
           β–Ό
Phase 3: Translation
    └── run_translation_phase() β†’ Execute parallel translation
           β”‚
           β–Ό
Phase 4: Review
    └── run_review_phase()     β†’ Review completed translations only
           β”‚                   β†’ Generate review_report.md
           β–Ό
Phase 5: Validation
    └── run_validate_phase()   β†’ Validate translated+reviewed files only
           β”‚                   β†’ Generate validate_report.md
           β–Ό
Phase 6: Preview
    └── run_preview_phase()    β†’ Run local preview server
           β”‚                   β†’ http://localhost:8080
           β–Ό
Phase 7: Complete
    └── get_workflow_status()  β†’ Final status report

Orchestrator Tools

Tool Description
analyze_workshop Analyze workshop structure, return target file list
generate_design Generate translation design document
initialize_workflow Initialize workflow, create tasks.md
run_translation_phase Execute translation phase in parallel
run_review_phase Execute review phase in parallel, generate review_report.md
run_validate_phase Execute validation phase in parallel, generate validate_report.md
run_preview_phase Run local preview server (background)
stop_preview Stop preview server
get_workflow_status Query overall progress
retry_failed_tasks Retry failed tasks
check_phase_completion Check phase completion status

Generated Files

The following files are created in the translation/ directory during translation:

File Description
design.md Translation design document
tasks.md Task progress status (checkbox format)
review_report.md Review phase report (scores, PASS/FAIL list)
validate_report.md Validation phase report (structure validation results)

Installation

Install from PyPI (Recommended)

# Using uvx (run without installation)
uvx wstranslator

# Or install via pip
pip install wstranslator
wstranslator

Development Mode (Local Development)

# After cloning the repository
cd workshop-translator/WsTranslator

# Using uv
uv sync
uv run wstranslator

# Or using pip
pip install -e .
wstranslator

Usage

Interactive Mode

wstranslator

In interactive mode, the Orchestrator automatically progresses through the workflow.

Example conversation:

User: Please translate the /path/to/workshop directory to Korean

Orchestrator: Analyzing workshop structure...
              β†’ Found 10 files
              β†’ Workflow initialization complete
              β†’ Starting translation (5 files in parallel)
              β†’ Translation complete: 10/10 (100%)
              β†’ Starting review...
              β†’ Review complete. review_report.md generated
              β†’ Validation complete. validate_report.md generated
              β†’ Preview server started: http://localhost:8080

Session Resume

You can continue interrupted work from a previous session:

User: Please continue the previous translation work

Orchestrator: Resuming existing workflow. Loaded 25/30 tasks completed.
              β†’ Starting translation of remaining 5 files...

Requirements

  • Python 3.10+
  • AWS credentials configured (AWS CLI or environment variables)
  • Bedrock model access (Claude Opus, Sonnet, Haiku)

Environment Variables

# AWS region setting (default: us-west-2)
export AWS_REGION=us-west-2

# AWS profile setting
export AWS_PROFILE=your-profile

Dependencies

Key packages:

  • strands-agents: AI agent framework
  • strands-agents-tools: File read/write tools
  • bedrock-agentcore: AWS Bedrock AgentCore runtime
  • mcp: Model Context Protocol client
  • boto3: AWS SDK

Troubleshooting

AWS Credentials Error

# AWS CLI configuration
aws configure

# Or set environment variables
export AWS_ACCESS_KEY_ID=your_key
export AWS_SECRET_ACCESS_KEY=your_secret
export AWS_REGION=us-west-2

Preview Server Error

# On macOS with execution permission issues
# Control-click preview_build file in Finder β†’ Open

# File open limit error
ulimit -n 10240

MCP Connection Error

# Check uvx installation
uvx --version

# Test AWS Documentation MCP server
uvx awslabs.aws-documentation-mcp-server@latest

Developer Information

About

aws workshop translator

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages