Frappe Translator
AI-powered translation CLI for Frappe apps using Claude
- Author: alyf-de
- Repository: https://github.com/alyf-de/frappe-translator
- GitHub stars: 6
- Forks: 0
- License: MIT
- Category: HR & Payroll
- Maintenance: Minimally Maintained
Install Frappe Translator
bench get-app https://github.com/alyf-de/frappe-translator
Add the Frappe Gems badge to your README
Maintain Frappe Translator? Paste this into your README:
[](https://frappegems.com/gems/apps/alyf-de/frappe-translator)
About Frappe Translator
frappe-translator
AI-powered translation CLI for Frappe apps using the Claude CLI.
Massively parallelizes translation by assembling rich context (source code snippets, term glossaries, comments) and translating into all target languages simultaneously.
With Claude Code Max, this can translate around 500 strings into 30 languages per 4-hour token limit. However, the 4-hour token limit is already exhausted after 1 hour. So we're effectively doing 4 translations per second.
Requirements
- Python 3.10+
- Claude CLI with an active subscription (Pro/Max)
- A Frappe bench directory with apps containing
locale/main.potfiles
Installation
As a user
uv tool install https://github.com/alyf-de/frappe-translator.git
As a contributor
git clone https://github.com/alyf-de/frappe-translator
cd frappe-translator
uv sync
uv tool install -e .
Usage
Translate missing strings
frappe-translator translate /path/to/bench --mode fill-missing
Translate specific apps and languages
frappe-translator translate /path/to/bench \
--app frappe --app erpnext \
--language de --language fr \
--model sonnet
Skip glossary extraction (single-pass, faster)
frappe-translator translate /path/to/bench --skip-glossary
Check translation coverage
frappe-translator status /path/to/bench
Dry run (see what would be translated)
frappe-translator translate /path/to/bench --dry-run
Clear progress (start fresh)
frappe-translator clear-progress /path/to/bench
How it works
Two-pass pipeline
Pass 1 (term extraction): Batches all translatable strings and sends them to Claude to extract key domain-specific terms (e.g., "Invoice", "Purchase Order", "DocType"). Existing translations for these terms are looked up across all PO files to build a glossary. This pass is optional (
--skip-glossary) and cached across runs.Pass 2 (translation): Strings are batched (default 50 per call) and sent to Claude with full context:
- Source code snippets (up to 3 per string, from diverse files)
- Term glossary with existing translations
- Extractor comments from the POT file
- Per-language style instructions (formality, address form)
The LLM translates each string into all target languages at once. Failed batches are retried individually.
Key design decisions
- All languages at once: Context assembly is 80% of the work. Once rich context is assembled, translating into multiple languages simultaneously is efficient and produces more consistent results.
- Dependency ordering: Apps are processed in order (frappe, erpnext, hrms, ...) so earlier apps' translations inform downstream glossaries.
- Incremental writes: Translations are written to PO files every 50 entries. Re-runs skip already-translated entries.
- Per-language resume: If translation fails for one language (e.g., placeholder mismatch), only that language is retried on the next run.
Run modes
| Mode | Description |
|---|---|
fill-missing |
Only translate entries with empty msgstr in any target locale (default) |
review-existing |
Re-translate entries that already have translations |
full-correct |
Re-translate all entries regardless of existing translations |
Configuration
Create a frappe-translator.toml file:
[general]
concurrency = 5
batch_size = 50
timeout = 120
model = "sonnet"
[style.default]
formality = "formal"
notes = "Use formal address. Preserve technical terms commonly used in ERP software."
[style.de]
formality = "formal"
address = "Sie"
notes = "Use 'Sie' form. German compound nouns preferred over English loanwords."
[style.fr]
formality = "formal"
address = "vous"
[terminology.de]
"Workspace" = "Arbeitsbereich"
[apps.order]
priority = ["frappe", "erpnext", "hrms"]
Pass it with --config frappe-translator.toml.
Development
uv sync
uv run ruff check src/ tests/
uv run ty check src/
uv run pytest
License
MIT
Related HR & Payroll apps for Frappe & ERPNext
- Hrms — Open Source HR and Payroll Software
- Huf — Open-source, self-hosted multi-agent AI infrastructure for teams and apps with support for cloud and local models, tool integrations, workflows, and automation across business systems including Slack, ERPNext, Discord & Gmail.
- Bookings — Hotel Management App for Erpnext
- Employee Self Service — This is the backend component for Nesscale ESS - a mobile app that brings ERPNext to your phone. Employees can manage their HR tasks, sales activities, and projects right from their mobile devices.
- Inventory Tools — A collection of features to streamline and enhance inventory management and manufacturing workflows in ERPNext.
- Check Run — Payables utility for ERPNext
- Next Ai — NextAI is an AI-powered app for Frappe and ERPNext, delivering seamless content generation, automation, and productivity enhancements.
- Projectit — Open Source PWA mobile app to track the Employees out in the field. This mobile app is developed on Frappe Framework and it is integrated with the Project functionalities of ERPNext and integrated tightly with Frappe HR.