From c483c3511dc186e0b58976f02acec3e831de78de Mon Sep 17 00:00:00 2001 From: Leonhard Strohmidel Date: Sat, 17 Sep 2022 18:07:29 +0200 Subject: [PATCH] Replacing ugettext_lazy with gettext --- django_lostplaces/lostplaces/forms.py | 2 +- django_lostplaces/lostplaces/models/abstract_models.py | 2 +- django_lostplaces/lostplaces/models/external_links.py | 2 +- django_lostplaces/lostplaces/models/models.py | 2 +- django_lostplaces/lostplaces/models/place.py | 2 +- django_lostplaces/lostplaces/tests/views/test_place_views.py | 2 +- django_lostplaces/lostplaces/views/base_views.py | 2 +- django_lostplaces/lostplaces/views/explorer_views.py | 2 +- django_lostplaces/lostplaces/views/place_image_views.py | 2 +- django_lostplaces/lostplaces/views/place_views.py | 2 +- django_lostplaces/lostplaces/views/views.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/django_lostplaces/lostplaces/forms.py b/django_lostplaces/lostplaces/forms.py index e68bef2..c7389b2 100644 --- a/django_lostplaces/lostplaces/forms.py +++ b/django_lostplaces/lostplaces/forms.py @@ -7,7 +7,7 @@ from django import forms from django.db import models from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.contrib.auth.models import User -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces import widgets from lostplaces.models import Place, PlaceImage, Voucher, Explorer diff --git a/django_lostplaces/lostplaces/models/abstract_models.py b/django_lostplaces/lostplaces/models/abstract_models.py index 28429ca..1d29967 100644 --- a/django_lostplaces/lostplaces/models/abstract_models.py +++ b/django_lostplaces/lostplaces/models/abstract_models.py @@ -1,7 +1,7 @@ from django.utils import timezone from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from django.core.validators import MaxValueValidator, MinValueValidator from taggit.managers import TaggableManager diff --git a/django_lostplaces/lostplaces/models/external_links.py b/django_lostplaces/lostplaces/models/external_links.py index e8c42b8..3530a1d 100644 --- a/django_lostplaces/lostplaces/models/external_links.py +++ b/django_lostplaces/lostplaces/models/external_links.py @@ -1,5 +1,5 @@ from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces.models.place import PlaceAsset diff --git a/django_lostplaces/lostplaces/models/models.py b/django_lostplaces/lostplaces/models/models.py index 286f540..8fe99a6 100644 --- a/django_lostplaces/lostplaces/models/models.py +++ b/django_lostplaces/lostplaces/models/models.py @@ -13,7 +13,7 @@ from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save, pre_save from django.dispatch import receiver -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces.models.abstract_models import Expireable from lostplaces.models.place import Place diff --git a/django_lostplaces/lostplaces/models/place.py b/django_lostplaces/lostplaces/models/place.py index 7bb5520..140fb9f 100644 --- a/django_lostplaces/lostplaces/models/place.py +++ b/django_lostplaces/lostplaces/models/place.py @@ -5,7 +5,7 @@ from django.db import models from django.urls import reverse from django.dispatch import receiver from django.db.models.signals import post_delete, pre_save -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from django.conf import settings from lostplaces.models.abstract_models import Submittable, Taggable, Mapable, Expireable diff --git a/django_lostplaces/lostplaces/tests/views/test_place_views.py b/django_lostplaces/lostplaces/tests/views/test_place_views.py index ba70250..de186d4 100644 --- a/django_lostplaces/lostplaces/tests/views/test_place_views.py +++ b/django_lostplaces/lostplaces/tests/views/test_place_views.py @@ -9,7 +9,7 @@ from django.urls import reverse from django.contrib.auth.models import User from django.utils import timezone from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces.models import Place diff --git a/django_lostplaces/lostplaces/views/base_views.py b/django_lostplaces/lostplaces/views/base_views.py index bc8d8e4..6065a7f 100644 --- a/django_lostplaces/lostplaces/views/base_views.py +++ b/django_lostplaces/lostplaces/views/base_views.py @@ -12,7 +12,7 @@ from django.contrib.messages.views import SuccessMessageMixin from django.shortcuts import redirect, get_object_or_404 from django.urls import reverse_lazy, reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces.models import Place from lostplaces.common import redirect_referer_or diff --git a/django_lostplaces/lostplaces/views/explorer_views.py b/django_lostplaces/lostplaces/views/explorer_views.py index f35b9ee..4ad74c5 100644 --- a/django_lostplaces/lostplaces/views/explorer_views.py +++ b/django_lostplaces/lostplaces/views/explorer_views.py @@ -3,7 +3,7 @@ from django.views import View -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse_lazy diff --git a/django_lostplaces/lostplaces/views/place_image_views.py b/django_lostplaces/lostplaces/views/place_image_views.py index fcb82dd..54c7724 100644 --- a/django_lostplaces/lostplaces/views/place_image_views.py +++ b/django_lostplaces/lostplaces/views/place_image_views.py @@ -1,6 +1,6 @@ from django.views import View from django.shortcuts import get_object_or_404, redirect -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces.views.base_views import PlaceAssetCreateView, PlaceAssetDeleteView from lostplaces.models import PlaceImage, Place diff --git a/django_lostplaces/lostplaces/views/place_views.py b/django_lostplaces/lostplaces/views/place_views.py index f493ce5..a28a430 100644 --- a/django_lostplaces/lostplaces/views/place_views.py +++ b/django_lostplaces/lostplaces/views/place_views.py @@ -10,7 +10,7 @@ from django.views.generic.detail import SingleObjectMixin from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from django.utils import timezone from django.shortcuts import render, redirect, get_object_or_404 diff --git a/django_lostplaces/lostplaces/views/views.py b/django_lostplaces/lostplaces/views/views.py index d0130b2..a2ead40 100644 --- a/django_lostplaces/lostplaces/views/views.py +++ b/django_lostplaces/lostplaces/views/views.py @@ -9,7 +9,7 @@ from django.contrib import messages from django.urls import reverse_lazy, reverse from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponseForbidden -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext as _ from lostplaces.forms import SignupVoucherForm, TagSubmitForm from lostplaces.models import Place, PhotoAlbum