mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
python: Convert deprecated Django ugettext alias to gettext.
django.utils.translation.ugettext is a deprecated alias of django.utils.translation.gettext as of Django 3.0, and will be removed in Django 4.0. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
173ce9a3fc
commit
e7ed907cf6
@@ -13,9 +13,9 @@ from django.conf import settings
|
||||
from django.core.signing import Signer
|
||||
from django.db import transaction
|
||||
from django.utils.timezone import now as timezone_now
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy
|
||||
from django.utils.translation import override as override_language
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy
|
||||
|
||||
from corporate.models import (
|
||||
Customer,
|
||||
@@ -172,8 +172,8 @@ def get_idempotency_key(ledger_entry: LicenseLedger) -> Optional[str]:
|
||||
|
||||
class BillingError(Exception):
|
||||
# error messages
|
||||
CONTACT_SUPPORT = ugettext_lazy("Something went wrong. Please contact {email}.")
|
||||
TRY_RELOADING = ugettext_lazy("Something went wrong. Please reload the page.")
|
||||
CONTACT_SUPPORT = gettext_lazy("Something went wrong. Please contact {email}.")
|
||||
TRY_RELOADING = gettext_lazy("Something went wrong. Please reload the page.")
|
||||
|
||||
# description is used only for tests
|
||||
def __init__(self, description: str, message: Optional[str] = None) -> None:
|
||||
|
||||
Reference in New Issue
Block a user