{"id":8113,"library":"django-rosetta","title":"Django Rosetta","description":"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.","status":"active","version":"0.10.3","language":"python","source_language":"en","source_url":"https://github.com/mbi/django-rosetta","tags":["django","i18n","translation","admin","localization"],"install":[{"cmd":"pip install django-rosetta","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Core dependency for a Django application. Specific versions are required by rosetta versions.","package":"Django","optional":false},{"reason":"Required for OpenAI translation suggestions if ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS is True and OpenAI API is configured.","package":"openai","optional":true},{"reason":"Required for Google Translation API suggestions if configured.","package":"google-cloud-translate","optional":true}],"imports":[{"note":"Add 'rosetta' to your INSTALLED_APPS list to enable the application.","symbol":"'rosetta'","correct":"# settings.py\nINSTALLED_APPS = [\n    # ...\n    'rosetta',\n]"},{"note":"Modern Django uses `path` or `re_path` from `django.urls`. The `patterns` function was deprecated and removed in Django 2.0.","wrong":"from django.conf.urls import patterns, url, include\nurlpatterns = patterns('',\n    url(r'^rosetta/', include('rosetta.urls')),\n)","symbol":"include('rosetta.urls')","correct":"# urls.py\nfrom django.urls import include, path\n\nurlpatterns = [\n    # ...\n    path('rosetta/', include('rosetta.urls')),\n]"}],"quickstart":{"code":"import os\n\n# settings.py\nINSTALLED_APPS = [\n    # ... default Django apps\n    'rosetta',\n    'django.contrib.admin', # Rosetta often accessed via admin\n]\n\n# Example for translation suggestions\nROSETTA_ENABLE_TRANSLATION_SUGGESTIONS = True\n\n# Configure DeepL or OpenAI if desired\n# DEEPL_AUTH_KEY = os.environ.get('DEEPL_AUTH_KEY', '')\n# OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY', '')\n# OPENAI_BASE_URL = os.environ.get('OPENAI_BASE_URL', '') # for self-hosted LLM\n\n# urls.py (in your project's main urls.py)\nfrom django.contrib import admin\nfrom django.urls import include, path\n\nurlpatterns = [\n    path('admin/', admin.site.urls),\n    path('rosetta/', include('rosetta.urls')),\n]\n\n# After configuration and running makemessages:\n# python manage.py makemessages -l es\n# python manage.py compilemessages\n# Then, navigate to /rosetta/ in your browser.","lang":"python","description":"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."},"warnings":[{"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.","message":"As 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.","severity":"breaking","affected_versions":"0.10.2+"},{"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.","message":"Django 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.","severity":"breaking","affected_versions":"0.9.9+"},{"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.","message":"When 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Version 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.","severity":"gotcha","affected_versions":"0.10.1+"},{"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`.","message":"Using 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.","severity":"gotcha","affected_versions":"0.10.1+"}],"env_vars":null,"search_vec":"'0.10.3':51 '6.0':56 'activ':44 'ad':52 'admin':84 'ai':71 'also':66 'applic':9 'base':26 'codebas':61 'creat':39 'databas':36 'deepl':75 'design':10 'django':1,4,8,17,55,81 'django-rosetta':3 'drop':63 'edit':29 'featur':67 'file':32 'gettext':30 'i18n':82 'integr':68 'interfac':27 'javascript':60 'jqueri':64 'librari':42 'like':74 'local':85 'maintain':45 'model':37 'modern':58 'openai':77 'po':31 'process':15 'project':18 'provid':22 'recent':47 'requir':34 'rosetta':2,5 'servic':73 'simplifi':12 'suggest':80 'support':53 'tabl':40 'translat':14,72,79,83 'updat':48 'various':70 'version':50 'web':25 'web-bas':24 'without':33 'work':20","created_at":"2026-04-16T17:00:30.885178+00:00","updated_at":"2026-04-16T17:00:30.885178+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.10.3","cli_name":"","cli_version":null,"type":"library","homepage":"https://django-rosetta.readthedocs.io/","github":"https://github.com/mbi/django-rosetta","docs":null,"changelog":null,"pypi":"https://pypi.org/project/django-rosetta/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}