Replace deprecated ugettext_lazy and ungettext_lazy
The ugettext_lazy method and the ungettext_lazy method are both deprecated since Django 3.0[1]. These were already replaced in Horizon repo by [2]. [1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3 [2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee Change-Id: If17fba432f4a00979f70b535bc1f1750d8a15f19
This commit is contained in:
parent
31a03f6339
commit
444a209cb1
@ -16,7 +16,7 @@ import logging
|
||||
from operator import attrgetter
|
||||
|
||||
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 forms
|
||||
from horizon import messages
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon
|
||||
from openstack_dashboard.api import neutron
|
||||
|
||||
|
@ -16,9 +16,9 @@ import logging
|
||||
|
||||
from django.template import defaultfilters as filters
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
from django.utils.translation import pgettext_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tables
|
||||
@ -65,7 +65,7 @@ class DeleteRuleLink(policy.PolicyTargetMixin, tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Rule",
|
||||
u"Delete Rules",
|
||||
count
|
||||
@ -73,7 +73,7 @@ class DeleteRuleLink(policy.PolicyTargetMixin, tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Scheduled deletion of Rule",
|
||||
u"Scheduled deletion of Rules",
|
||||
count
|
||||
@ -97,7 +97,7 @@ class DeletePolicyLink(policy.PolicyTargetMixin, tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Policy",
|
||||
u"Delete Policies",
|
||||
count
|
||||
@ -105,7 +105,7 @@ class DeletePolicyLink(policy.PolicyTargetMixin, tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Scheduled deletion of Policy",
|
||||
u"Scheduled deletion of Policies",
|
||||
count
|
||||
@ -125,7 +125,7 @@ class DeleteFirewallGroupLink(policy.PolicyTargetMixin,
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Firewall Group",
|
||||
u"Delete Firewall Groups",
|
||||
count
|
||||
@ -133,7 +133,7 @@ class DeleteFirewallGroupLink(policy.PolicyTargetMixin,
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Scheduled deletion of Firewall Group",
|
||||
u"Scheduled deletion of Firewall Groups",
|
||||
count
|
||||
|
@ -12,7 +12,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 _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
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
|
||||
|
@ -13,7 +13,7 @@
|
||||
import itertools
|
||||
|
||||
from django.template.loader import get_template
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from horizon.forms import fields
|
||||
|
||||
"""A custom Horizon Forms Select widget that displays select choices as a table
|
||||
|
@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
from operator import attrgetter
|
||||
|
||||
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.utils import validators
|
||||
|
Loading…
x
Reference in New Issue
Block a user