diff --git a/.travis.yml b/.travis.yml index c24a221..10ff54a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,21 +3,13 @@ services: memcached matrix: include: - - python: "3.6" - env: TOX_ENV=py36-django20 - - python: "3.6" - env: TOX_ENV=py36-django21 - python: "3.6" env: TOX_ENV=py36-django22 - - python: "3.7" - env: TOX_ENV=py37-django20 - - python: "3.7" - env: TOX_ENV=py37-django21 - python: "3.7" env: TOX_ENV=py37-django22 - python: "3.7" env: TOX_ENV=py37-django30 - - python: "3.7" + - python: "3.8" env: TOX_ENV=py37-django31 diff --git a/CHANGES b/CHANGES index 08a2f7f..c6fe8a9 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ Version History Version 0.9.6 (unreleased) -------------------------- * Remove 'providing_args' kwarg from signals instanciation (#250, thanks @mondeja) +* Removed support and tests for Django <= 2.1 Version 0.9.5 diff --git a/README.rst b/README.rst index cd44bfb..73c0ea7 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ Rosetta .. image:: https://travis-ci.org/mbi/django-rosetta.svg?branch=develop :target: http://travis-ci.org/mbi/django-rosetta - + .. image:: https://img.shields.io/pypi/v/django-rosetta :target: https://pypi.org/project/django-rosetta/ @@ -16,13 +16,12 @@ Rosetta is a `Django `_ application that facilita Because it doesn't export any models, Rosetta doesn't create any tables in your project's database. Rosetta can be installed and uninstalled by simply adding and removing a single entry in your project's `INSTALLED_APPS` and a single line in your main ``urls.py`` file. -Note: as of version 0.7.13 django-rosetta requires Django 1.8 or later. As of version 0.9.0, django-rosetta requires Django 1.11 or later. +Note: as of version 0.9.0, django-rosetta requires Django 1.11 or later, as of version 0.9.6, django-rosetta requires Django 2.2 or later ******** Features ******** -* Database independent * Reads and writes your project's `gettext` catalogs (po and mo files) * Installed and uninstalled in under a minute * Uses Django's admin interface CSS diff --git a/docs/installation.rst b/docs/installation.rst index ee7838b..4e4f318 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -14,10 +14,11 @@ Install Rosetta 3. Add an URL entry to your project's ``urls.py``, for example:: from django.conf import settings + from django.conf.urls import include, re_path if 'rosetta' in settings.INSTALLED_APPS: urlpatterns += [ - url(r'^rosetta/', include('rosetta.urls')) + re_path(r'^rosetta/', include('rosetta.urls')) ] diff --git a/rosetta/locale/ky/LC_MESSAGES/django.mo b/rosetta/locale/ky/LC_MESSAGES/django.mo index 6a0670c..84d7e55 100644 Binary files a/rosetta/locale/ky/LC_MESSAGES/django.mo and b/rosetta/locale/ky/LC_MESSAGES/django.mo differ diff --git a/rosetta/urls.py b/rosetta/urls.py index 6b2ca39..9232720 100644 --- a/rosetta/urls.py +++ b/rosetta/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url +from django.conf.urls import re_path from django.urls import reverse_lazy from django.views.generic.base import RedirectView @@ -6,40 +6,36 @@ from . import views urlpatterns = [ - - url(r'^$', + re_path( + r'^$', RedirectView.as_view( url=reverse_lazy('rosetta-file-list', kwargs={'po_filter': 'project'}), - permanent=False + permanent=False, ), name='rosetta-old-home-redirect', - ), - - url(r'^files/$', + ), + re_path( + r'^files/$', RedirectView.as_view( url=reverse_lazy('rosetta-file-list', kwargs={'po_filter': 'project'}), - permanent=False + permanent=False, ), name='rosetta-file-list-redirect', - ), - - url(r'^files/(?P[\w-]+)/$', + ), + re_path( + r'^files/(?P[\w-]+)/$', views.TranslationFileListView.as_view(), name='rosetta-file-list', - ), - - url(r'^files/(?P[\w-]+)/(?P[\w\-_\.]+)/(?P\d+)/$', + ), + re_path( + r'^files/(?P[\w-]+)/(?P[\w\-_\.]+)/(?P\d+)/$', views.TranslationFormView.as_view(), name='rosetta-form', - ), - - url(r'^files/(?P[\w-]+)/(?P[\w\-_\.]+)/(?P\d+)/download/$', + ), + re_path( + r'^files/(?P[\w-]+)/(?P[\w\-_\.]+)/(?P\d+)/download/$', views.TranslationFileDownload.as_view(), name='rosetta-download-file', - ), - - url(r'^translate/$', - views.translate_text, - name='rosetta.translate_text', - ), + ), + re_path(r'^translate/$', views.translate_text, name='rosetta.translate_text'), ] diff --git a/testproject/urls.py b/testproject/urls.py index 3f51baa..798cd99 100644 --- a/testproject/urls.py +++ b/testproject/urls.py @@ -1,11 +1,13 @@ -from django.conf.urls import include, url -from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.conf.urls import include, re_path from django.contrib import admin +from django.contrib.staticfiles.urls import staticfiles_urlpatterns + + admin.autodiscover() urlpatterns = [ - url(r'^admin/', admin.site.urls), - url(r'^rosetta/', include('rosetta.urls')) + re_path(r'^admin/', admin.site.urls), + re_path(r'^rosetta/', include('rosetta.urls')), ] urlpatterns += staticfiles_urlpatterns() diff --git a/tox.ini b/tox.ini index c6c05cb..b0afd9f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,6 @@ [tox] envlist = flake8, - py{36,37}-django{20,21}, py{36,37,38}-django{22,30,31}, gettext, docs @@ -18,8 +17,6 @@ setenv = PYTHONDONTWRITEBYTECODE=1 deps = - django20: Django==2.0.* - django21: Django>=2.1,<=2.1.99 django22: Django>=2.2.8,<=2.2.99 django30: Django>=3.0,<=3.0.99 django31: Django>=3.1,<=3.1.99 @@ -46,6 +43,7 @@ commands = msgfmt -c -o fr/LC_MESSAGES/django.mo fr/LC_MESSAGES/django.po msgfmt -c -o hu/LC_MESSAGES/django.mo hu/LC_MESSAGES/django.po msgfmt -c -o it/LC_MESSAGES/django.mo it/LC_MESSAGES/django.po + msgfmt -c -o ky/LC_MESSAGES/django.mo ky/LC_MESSAGES/django.po msgfmt -c -o nl/LC_MESSAGES/django.mo nl/LC_MESSAGES/django.po msgfmt -c -o pl/LC_MESSAGES/django.mo pl/LC_MESSAGES/django.po msgfmt -c -o ru/LC_MESSAGES/django.mo ru/LC_MESSAGES/django.po