From 74e71bb6becb8a84128d82b19561e9361dd92198 Mon Sep 17 00:00:00 2001 From: Paul Schilling Date: Wed, 14 Feb 2024 09:44:58 +0100 Subject: [PATCH] [#39] Replace ugettext/ugettext_lazy with gettext/gettext_lazy --- mail_editor/admin.py | 2 +- mail_editor/helpers.py | 2 +- mail_editor/mail_template.py | 2 +- mail_editor/models.py | 2 +- mail_editor/views.py | 2 +- tests/test_admin.py | 2 +- tests/test_template_rendering.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mail_editor/admin.py b/mail_editor/admin.py index 5dd0f58..cf35341 100644 --- a/mail_editor/admin.py +++ b/mail_editor/admin.py @@ -3,7 +3,7 @@ from django.contrib import admin from django.urls import path, reverse from django.utils.html import format_html -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from .forms import MailTemplateForm from .models import MailTemplate diff --git a/mail_editor/helpers.py b/mail_editor/helpers.py index 3ee8333..1a6bab0 100644 --- a/mail_editor/helpers.py +++ b/mail_editor/helpers.py @@ -4,7 +4,7 @@ from django.contrib.sites.shortcuts import get_current_site from django.template import loader from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from .models import MailTemplate diff --git a/mail_editor/mail_template.py b/mail_editor/mail_template.py index 9a2d7c6..9393896 100644 --- a/mail_editor/mail_template.py +++ b/mail_editor/mail_template.py @@ -8,7 +8,7 @@ Context, Template, TemplateSyntaxError ) from django.template.base import VariableNode -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class MailTemplateValidator(object): diff --git a/mail_editor/models.py b/mail_editor/models.py index 43be39d..cbe0014 100644 --- a/mail_editor/models.py +++ b/mail_editor/models.py @@ -14,7 +14,7 @@ from django.utils.html import strip_tags from django.utils.module_loading import import_string from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from .settings import get_config, settings from .mail_template import validate_template diff --git a/mail_editor/views.py b/mail_editor/views.py index 549158b..e4c6a69 100644 --- a/mail_editor/views.py +++ b/mail_editor/views.py @@ -3,7 +3,7 @@ from django.contrib import messages from django.http import HttpResponse from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.generic import View from django.views.generic.detail import DetailView, SingleObjectMixin from django.views.generic.edit import FormMixin, FormView diff --git a/tests/test_admin.py b/tests/test_admin.py index d9c8827..d32cc1e 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -2,7 +2,7 @@ from django.core import mail from django.test import TestCase, override_settings from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from mail_editor.helpers import find_template diff --git a/tests/test_template_rendering.py b/tests/test_template_rendering.py index e62e39d..28ddf8a 100644 --- a/tests/test_template_rendering.py +++ b/tests/test_template_rendering.py @@ -3,7 +3,7 @@ from django.conf import settings from django.test import TestCase, override_settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from mail_editor.models import MailTemplate from mail_editor.helpers import find_template