In-browser translation editing for Django superusers
Project description
django-live-translations
In-browser translation editing for Django superusers.
Edit translations directly on any page of your Django application. Toggle edit mode, click any translatable string, and save changes that take effect immediately - no deployment, no restarts, no context switching to .po file editors.
Features
- Inline editing - click any translatable string to open a multi-language editor
- Live preview - changes appear on the page instantly after saving
- Preview mode - review inactive translations before making them live
- Draft language support - prepare translations for unpublished languages before going live
- Edit history - word-level diffs with one-click restore
- Bulk activation - select and activate multiple pending translations at once
- Two storage backends - PO files (default) or database with cache-based sync
- Custom permissions - control who can edit with a simple callable
- Django admin integration - manage translation overrides from the admin panel
- Zero frontend dependencies - vanilla JS widget, no build step required
Quick start
pip install django-live-translations
# or
uv add django-live-translations
# or
poetry add django-live-translations
# settings.py
INSTALLED_APPS = [
# ...
"django.contrib.staticfiles",
"live_translations",
]
MIDDLEWARE = [
# ...
"django.contrib.auth.middleware.AuthenticationMiddleware",
"live_translations.middleware.LiveTranslationsMiddleware", # after auth
# ...
]
Log in as a superuser and press Ctrl+Shift+E to activate edit mode.
For the full setup guide, see the documentation.
Demo app
The repository includes a working example app:
git clone https://github.com/vojtechpetru/django-live-translations
cd django-live-translations
pip install -e ".[dev]"
cd example
python manage.py migrate
python manage.py runserver
Open localhost:8000 and click "Quick Login" to auto-create a superuser.
Compatibility
| Python | Django |
|---|---|
| 3.12, 3.13, 3.14 | 4.2, 5.0, 5.1, 5.2, 6.0 |
Contributing
Contributions are welcome! Here's how to get started:
Setup
git clone https://github.com/vojtechpetru/django-live-translations
cd django-live-translations
uv sync --all-extras
pre-commit install
Development commands
This project uses just as a task runner:
just unit # run unit tests
just e2e # run e2e tests (both backends)
just e2e-po # run e2e tests (PO backend only)
just e2e-db # run e2e tests (DB backend only)
just bench # run performance benchmarks
just demo # start the example app
just docs-serve # serve docs locally
Code quality
The project enforces strict quality standards through pre-commit hooks and CI:
- Formatting:
ruff format(120 char line length) - Linting:
ruff check - Type checking:
pyrefly - Test coverage: 90%+ required
- Test suite: 650+ unit tests, 290+ Playwright e2e tests
Pull requests
- Fork the repo and create your branch from
main - Add tests for any new functionality
- Ensure
just testpasses and coverage stays above 90% - Make sure pre-commit hooks pass (
ruff,pyrefly) - Open a pull request with a clear description of the change
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_live_translations-1.1.0.tar.gz.
File metadata
- Download URL: django_live_translations-1.1.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e7b51179866f3c45114e90d1e179e449eb842e5eaad23078c7900cfd0329fe0
|
|
| MD5 |
88cd3fa260d19e70e22253807482226f
|
|
| BLAKE2b-256 |
b695f4c36f403806964817520cad401a714e4e142eff00ff3d32aecf74e7cb90
|
Provenance
The following attestation bundles were made for django_live_translations-1.1.0.tar.gz:
Publisher:
publish.yml on VojtechPetru/django-live-translations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_live_translations-1.1.0.tar.gz -
Subject digest:
9e7b51179866f3c45114e90d1e179e449eb842e5eaad23078c7900cfd0329fe0 - Sigstore transparency entry: 1191104139
- Sigstore integration time:
-
Permalink:
VojtechPetru/django-live-translations@f006af5e0e06513decabbb44435cf34548c29915 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/VojtechPetru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f006af5e0e06513decabbb44435cf34548c29915 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_live_translations-1.1.0-py3-none-any.whl.
File metadata
- Download URL: django_live_translations-1.1.0-py3-none-any.whl
- Upload date:
- Size: 92.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a263566202aabdf100a5bcff57a732419a1a94c1bccdb73fb24fcca4cc428737
|
|
| MD5 |
b40cc003b65758653a538c835306720f
|
|
| BLAKE2b-256 |
d4c70e043f1eab9c58509fa45f8e1de590054ee6b48eaca035226ca0fe5a7b75
|
Provenance
The following attestation bundles were made for django_live_translations-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on VojtechPetru/django-live-translations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_live_translations-1.1.0-py3-none-any.whl -
Subject digest:
a263566202aabdf100a5bcff57a732419a1a94c1bccdb73fb24fcca4cc428737 - Sigstore transparency entry: 1191104143
- Sigstore integration time:
-
Permalink:
VojtechPetru/django-live-translations@f006af5e0e06513decabbb44435cf34548c29915 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/VojtechPetru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f006af5e0e06513decabbb44435cf34548c29915 -
Trigger Event:
release
-
Statement type: