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: Iee48af32956787cb4e16601fea34570f63df511c
This commit is contained in:
Takashi Kajinami 2022-03-23 21:44:21 +09:00
parent c9ada8674e
commit e976bf9765
16 changed files with 25 additions and 25 deletions

View File

@ -11,7 +11,7 @@
# See the 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

View File

@ -11,7 +11,7 @@
# See the 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 tables

View File

@ -11,7 +11,7 @@
# See the 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 tabs

View File

@ -14,7 +14,7 @@
import yaml
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 tables

View File

@ -17,7 +17,7 @@ import django
from django.conf import settings
from django.template.defaultfilters import filesizeformat
from django.utils import html
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.views.decorators.debug import sensitive_variables
from oslo_utils import strutils

View File

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

View File

@ -14,9 +14,9 @@ from django import urls
from django.http import Http404
from django.template.defaultfilters import title
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 heatclient import exc
from horizon import messages
@ -55,7 +55,7 @@ class CheckStack(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Check Stack",
u"Check Stacks",
count
@ -63,7 +63,7 @@ class CheckStack(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Checked Stack",
u"Checked Stacks",
count
@ -81,7 +81,7 @@ class SuspendStack(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Suspend Stack",
u"Suspend Stacks",
count
@ -89,7 +89,7 @@ class SuspendStack(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Suspended Stack",
u"Suspended Stacks",
count
@ -108,7 +108,7 @@ class ResumeStack(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Resume Stack",
u"Resume Stacks",
count
@ -116,7 +116,7 @@ class ResumeStack(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Resumed Stack",
u"Resumed Stacks",
count
@ -141,7 +141,7 @@ class ChangeStackTemplate(tables.LinkAction):
class DeleteStack(tables.DeleteAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Delete Stack",
u"Delete Stacks",
count
@ -149,7 +149,7 @@ class DeleteStack(tables.DeleteAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Deleted Stack",
u"Deleted Stacks",
count

View File

@ -13,7 +13,7 @@
import logging
from operator import attrgetter
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon import messages
from horizon import tabs

View File

@ -18,7 +18,7 @@ import yaml
from django.http import HttpResponse
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 _
import django.views.generic

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 _
import horizon

View File

@ -12,7 +12,7 @@
from django.http import HttpResponse # noqa
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.views import generic
from horizon.browsers.views import AngularIndexView

View File

@ -11,7 +11,7 @@
# See the 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

View File

@ -12,7 +12,7 @@
# limitations under the License.
from django.template import defaultfilters as filters
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon import tables

View File

@ -11,7 +11,7 @@
# See the 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 messages
from horizon import tabs

View File

@ -12,7 +12,7 @@
# limitations 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 tables

View File

@ -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 _
from heat_dashboard import exceptions