django-cartouche¶
Inline .po translation editing for Django. Click on any translated string in the browser to edit it directly during development.
How It Works¶
When running with DEBUG=True, django-cartouche:
- Tracks all
gettextandpgettextcalls during request processing - Injects an editor overlay into HTML responses
- Highlights strings with visual indicators (blue for translated, amber for untranslated)
- Makes strings clickable and editable inline
- Saves changes directly to your
.pofiles and recompiles messages
Quick Start¶
- Install as a dev dependency
- Add
cartouchetoINSTALLED_APPS - Add
CartoucheMiddlewareafterLocaleMiddleware - Include URLs and set
<html lang="{{ LANGUAGE_CODE }}">
See Configuration for complete setup instructions.
Requirements¶
- Python 3.10+
- Django 4.2+