Merge "Replace deprecated ugettext_lazy and ungettext_lazy"

This commit is contained in:
Zuul 2022-07-21 00:02:35 +00:00 committed by Gerrit Code Review
commit e41e5d10f3
7 changed files with 14 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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