From d0dcb47b98dd24b847eb79f420549977fd99db1f Mon Sep 17 00:00:00 2001 From: Marco Bonetti Date: Mon, 11 Jan 2021 11:13:05 +0100 Subject: [PATCH] Removed support and tests for Django <= 2.1 --- .travis.yml | 10 +----- CHANGES | 1 + README.rst | 5 ++- docs/installation.rst | 3 +- rosetta/locale/ky/LC_MESSAGES/django.mo | Bin 4276 -> 4235 bytes rosetta/urls.py | 42 +++++++++++------------- testproject/urls.py | 10 +++--- tox.ini | 4 +-- 8 files changed, 32 insertions(+), 43 deletions(-) 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 6a0670cb9aab4b8e72156aa5e56f530a9c95703c..84d7e5554e401743654ac8acd9ee7085743a433b 100644 GIT binary patch delta 321 zcmXZWKMO%o7{~F4qRYKpfFTz7IBM= zk}LM{jzpzt{N{8p%f5#yH!;Nd2Ie%PG*+0v9hUKoDSZ9U{k*C^l)@ZV@PIZFkvE3X wpj0u9>H}>|VizwsK=oeDBvoh8GDTwOU;&p{!V_-riE7Z;9eHm)cc@v~2Ruq2{r~^~ delta 344 zcmXBOJxhX77{>8SAv(TgU@GLGB3KgQqo{*hsJJ*dxHdSr38L6g%ku#o8ya1eAVeJt zC)?Fe(Aqa>>wgRm=XYN2bKPf}-lUgpkGu3pQ6t?;`tnIBG=7Pp9MdJ1F@a5NQ{Tf7 z`}Y8E@dLAXK%(@E1M~*}bB1Vho-v72v~_Pmxu-@O4k8?EF@{IX;SXNp72WK80c}tn zQ`p57J|d;My^t8HFcq+Y{8bZ-ql-IyMVt2!rmD(f6s8HzF@v9YgWotqA6;$GV*TXZ dpPhH}^>M#9dFhy_zf`PMs&`J&an>![\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