Registry / web-framework / django-rosetta

django-rosetta

JSON →
library0.10.3pypypiunverified

django-rosetta is a Django application designed to simplify the translation process for Django projects. It works by providing a web-based interface to edit gettext `.po` files, without requiring any database models or creating tables. The library is actively maintained, with recent updates in version 0.10.3 adding support for Django 6.0 and modernizing its JavaScript codebase by dropping jQuery. It also features integration with various AI translation services like DeepL and OpenAI for translation suggestions.

pip install django-rosetta
INSTALL
IMPORT
SIG · DJANGO-ROSETTA
D
django-rosetta
web-frameworkpythonv0.10.3
Install
4.1s avg
Import
Disk
70MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.10.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 70.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.1s · import 0.000s · 71MB
70MB installed
● package 70MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

'rosetta'
# settings.py INSTALLED_APPS = [ # ... 'rosetta', ]
Add 'rosetta' to your INSTALLED_APPS list to enable the application.
include('rosetta.urls')
# urls.py from django.urls import include, path urlpatterns = [ # ... path('rosetta/', include('rosetta.urls')), ]
from django.conf.urls import patterns, url, include urlpatterns = patterns('', url(r'^rosetta/', include('rosetta.urls')), )
Modern Django uses `path` or `re_path` from `django.urls`. The `patterns` function was deprecated and removed in Django 2.0.

To quickly set up django-rosetta, first install it via pip. Then, add `'rosetta'` to your `INSTALLED_APPS` in `settings.py` and include `rosetta.urls` in your project's `urls.py`. Ensure your Django project is already configured for internationalization (i18n) by defining `LANGUAGES` and `LOCALE_PATHS`, and running `python manage.py makemessages` and `python manage.py compilemessages` to create and compile translation files.

import os # settings.py INSTALLED_APPS = [ # ... default Django apps 'rosetta', 'django.contrib.admin', # Rosetta often accessed via admin ] # Example for translation suggestions ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS = True # Configure DeepL or OpenAI if desired # DEEPL_AUTH_KEY = os.environ.get('DEEPL_AUTH_KEY', '') # OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY', '') # OPENAI_BASE_URL = os.environ.get('OPENAI_BASE_URL', '') # for self-hosted LLM # urls.py (in your project's main urls.py) from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('rosetta/', include('rosetta.urls')), ] # After configuration and running makemessages: # python manage.py makemessages -l es # python manage.py compilemessages # Then, navigate to /rosetta/ in your browser.
Debug
Known issues
breakingAs of version 0.10.2, django-rosetta has rewritten its `rosetta.js` to drop jQuery, modernizing its frontend. If your custom frontend JavaScript heavily relied on jQuery in the Rosetta interface, it might break.
fix
Review and update any custom JavaScript that interacts with Rosetta's frontend to remove jQuery dependencies or adapt to the new vanilla JS implementation.
affects: 0.10.2+
breakingDjango and Python version compatibility has been frequently updated. Version 0.10.0 and later require Django 4.2+ and Python 3.9+. Older versions (0.9.9) required Django 3.2+ and Python 3.8+. Ensure your environment meets the minimum requirements for your installed rosetta version.
fix
Check the official documentation or PyPI for the exact Django/Python version requirements for your django-rosetta version and upgrade your Django/Python environment if necessary.
affects: 0.9.9+
gotchaWhen running django-rosetta in a multi-process environment (e.g., Gunicorn, mod_wsgi) with Django's default `LocMemCache` as the cache backend, you may encounter issues with translation data not persisting between requests.
fix
Configure a persistent cache backend (e.g., Memcached, Redis) in your Django settings and ensure `ROSETTA_STORAGE_CLASS` is set to `'rosetta.storage.CacheRosettaStorage'`. Avoid using `signed_cookies` with `SessionRosettaStorage` for large PO files.
affects: All versions
gotchaVersion 0.10.1 improved Content Security Policy (CSP) support by avoiding inline styles and server-side rendered stylesheets. If your project has a very strict CSP, you might need to adjust your CSP directives to allow Rosetta's assets, especially if you had custom overrides.
fix
Review your `Content-Security-Policy` headers and potentially add `nonce` attributes or specific `'self'` sources for styles and scripts if you encounter CSP violations after upgrading.
affects: 0.10.1+
gotchaUsing translation suggestion APIs (DeepL, OpenAI, etc.) requires configuring API keys in your Django settings. These keys should be securely managed, ideally via environment variables, to avoid exposure.
fix
Set `DEEPL_AUTH_KEY`, `OPENAI_API_KEY`, or other relevant API keys in your `settings.py` (e.g., using `os.environ.get`) and ensure `ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS` is `True`.
affects: 0.10.1+
Upgrade
Version history
0.10.3latest on PyPI · released Dec 7, 2025
Audit
Dependencies
DjangorequiredCore dependency for a Django application. Specific versions are required by rosetta versions.
openaioptionalRequired for OpenAI translation suggestions if ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS is True and OpenAI API is configured.
google-cloud-translateoptionalRequired for Google Translation API suggestions if configured.
Agent activity
8 hits · last 30 days
node
8
Resources
django-rosetta — pip install django-rosetta · libregistry