Fix removed Django function calls
``ugettext_lazy`` and ``ungettext_lazy`` have been removed in Django v4.0 [1]. 1. https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-4-0 Change-Id: Iaa809aa3698bb0a32293c1de430b57f33d7e6104
This commit is contained in:
parent
23e711d5cb
commit
6c6caa3be6
@ -13,7 +13,7 @@
|
||||
import json
|
||||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import messages
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon
|
||||
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
from django.template import defaultfilters as filters
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
from horizon import tables
|
||||
from horizon.templatetags import sizeformat
|
||||
|
||||
@ -42,7 +42,7 @@ class DeleteHost(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Host",
|
||||
u"Delete Hosts",
|
||||
count
|
||||
@ -50,7 +50,7 @@ class DeleteHost(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Host",
|
||||
u"Deleted Hosts",
|
||||
count
|
||||
|
@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import tables
|
||||
|
@ -13,7 +13,7 @@
|
||||
import json
|
||||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import messages
|
||||
|
@ -18,7 +18,7 @@ import json
|
||||
import logging
|
||||
import re
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import messages
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon
|
||||
|
||||
|
||||
|
@ -17,8 +17,8 @@ from datetime import datetime
|
||||
from functools import partial
|
||||
|
||||
from django.template import defaultfilters as django_filters
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
from horizon import tables
|
||||
from horizon.utils import filters
|
||||
import pytz
|
||||
@ -64,7 +64,7 @@ class DeleteLease(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Lease",
|
||||
u"Delete Leases",
|
||||
count
|
||||
@ -72,7 +72,7 @@ class DeleteLease(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Lease",
|
||||
u"Deleted Leases",
|
||||
count
|
||||
|
@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
from django.http import JsonResponse
|
||||
from django.urls import reverse
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import tables
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
||||
PANEL_GROUP = 'reservation'
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
||||
PANEL_GROUP = 'reservations'
|
||||
|
Loading…
Reference in New Issue
Block a user