by Ronanxyz | 2025-11-02 11:54:04+00:00
## The Key Innovation: Agentic Reflection

Traditional translation: Source → LLM → Done Jta's approach: Source → LLM → LLM self-critique → LLM improvement

Here's a real example:

*Step 1: Initial Translation* ``` Source: "Welcome to {app_name}" Translation: "欢迎使用 {app_name}" ```

*Step 2: AI Self-Critique* The AI analyzes its own work as an expert reviewer: ``` "The translation '欢迎使用' is accurate but could be more natural. Consider '欢迎来到' which conveys a warmer, more inviting tone that better matches the welcoming nature of 'Welcome to'." ```

*Step 3: AI Self-Improvement* ``` Improved: "欢迎来到 {app_name}" ```

This isn't post-processing with static rules—it's the AI acting as its own expert reviewer. The same model that translated understands the context, nuances, and challenges, making it uniquely qualified to critique and improve its own work.

*Why it works:* - *Context awareness*: The AI knows what it was trying to achieve - *Dynamic analysis*: Identifies issues specific to each translation's context - *Actionable feedback*: Generates specific improvements, not generic fixes - *Iterative quality*: Every translation gets a complete review-and-refine cycle ```

## Automatic Terminology Detection

One of the biggest pain points in i18n: inconsistent terminology. Jta solves this by using the LLM to analyze your source file and automatically identify:

*Preserve Terms* (never translate): - Brand names: "GitHub", "OAuth", "MyApp" - Technical terms: "API", "JSON", "HTTP"

*Consistent Terms* (always translate the same way): - Domain terms: "workspace" → "工作空间" (always) - Feature names: "credits" → "积分" (consistent across all strings)

The AI saves these to `.jta/terminology.json`:

```json { "version": "1.0", "sourceLanguage": "en", "preserveTerms": ["GitHub", "API", "OAuth"], "consistentTerms": ["repository", "commit", "pull request"] } ```

Then creates language-specific translation files:

```json // .jta/terminology.zh.json { "translations": { "repository": "仓库", "commit": "提交", "pull request": "拉取请求" } } ```

All future translations automatically use this dictionary. You can manually refine it, and the AI will respect your choices. This ensures 100% consistency across thousands of strings.

## Incremental Translation (80-90% Cost Savings)

Real-world i18n workflow: 1. Release 1.0: Translate 500 strings 2. Update 1.1: Add 10 new strings, modify 5 strings 3. Problem: Most tools re-translate all 500 strings

Jta's incremental mode: - Detects new keys (10 strings) - Identifies modified content (5 strings) - Preserves unchanged translations (485 strings) - Only translates 15 strings

*Result: 80-90% API cost reduction on updates*

Usage is dead simple:

```bash # First time: Full translation jta en.json --to zh

# After updates: Incremental (saves cost) jta en.json --to zh --incremental

# Re-translate everything if needed (quality refresh) jta en.json --to zh ```

The tool intelligently diffs the source file against existing translations, maintaining a perfect sync while minimizing API calls.

*Best practices:* - Development: Use `--incremental` for frequent updates - Production release: Use full translation for maximum quality - CI/CD: Use `--incremental -y` for automated updates

This makes Jta practical for continuous i18n workflows where you're updating translations multiple times per day.