Merge "Address RemovedInDjango40Warning"

This commit is contained in:
Zuul 2023-02-13 20:09:54 +00:00 committed by Gerrit Code Review
commit 26b75a2cc5
34 changed files with 60 additions and 60 deletions

View File

@ -13,7 +13,7 @@
import itertools
import yaml
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
def update_pagination(entities, request_size, page_size, marker,

View File

@ -13,7 +13,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 forms

View File

@ -10,7 +10,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

@ -13,9 +13,9 @@
from django.template import defaultfilters
from django.urls import reverse
from django.urls import reverse_lazy
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 tables
from horizon.utils import filters
@ -46,7 +46,7 @@ class CheckCluster(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Check Cluster",
u"Check Clusters",
count
@ -54,7 +54,7 @@ class CheckCluster(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Checked Cluster",
u"Checked Clusters",
count
@ -69,7 +69,7 @@ class RecoverCluster(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Recover Cluster",
u"Recover Clusters",
count
@ -77,7 +77,7 @@ class RecoverCluster(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Recovered Cluster",
u"Recovered Clusters",
count
@ -106,7 +106,7 @@ class DeleteCluster(tables.DeleteAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Delete Cluster",
u"Delete Clusters",
count
@ -114,7 +114,7 @@ class DeleteCluster(tables.DeleteAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Scheduled deletion of Cluster",
u"Scheduled deletion of Clusters",
count
@ -232,7 +232,7 @@ class DetachPolicy(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Detach Policy",
u"Detach Policies",
count
@ -241,7 +241,7 @@ class DetachPolicy(tables.BatchAction):
# This action is asynchronous.
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Detaching Policy",
u"Detaching Policies",
count

View File

@ -10,7 +10,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 exceptions
from horizon import tabs

View File

@ -12,7 +12,7 @@
from django.conf import settings
from django.urls import re_path
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView

View File

@ -12,7 +12,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 senlin_dashboard.api import senlin
from senlin_dashboard.cluster.clusters import forms as clusters_forms

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

@ -10,8 +10,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.utils.translation import gettext_lazy as _
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from horizon.utils import filters

View File

@ -13,7 +13,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 forms

View File

@ -10,7 +10,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,9 +11,9 @@
# limitations under the License.
from django.urls import reverse_lazy
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 tables
from horizon.utils import filters
@ -35,7 +35,7 @@ class DeleteNode(tables.DeleteAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Delete Node",
u"Delete Nodes",
count
@ -43,7 +43,7 @@ class DeleteNode(tables.DeleteAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Scheduled deletion of Node",
u"Scheduled deletion of Nodes",
count
@ -72,7 +72,7 @@ class RecoverNode(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Recover Node",
u"Recover Nodes",
count
@ -80,7 +80,7 @@ class RecoverNode(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Recovered Node",
u"Recovered Nodes",
count
@ -101,7 +101,7 @@ class CheckNode(tables.BatchAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Check Node",
u"Check Nodes",
count
@ -109,7 +109,7 @@ class CheckNode(tables.BatchAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Checked Node",
u"Checked Nodes",
count

View File

@ -10,7 +10,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 exceptions
from horizon import tabs

View File

@ -12,7 +12,7 @@
from django.conf import settings
from django.urls import re_path
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon.browsers import views
from senlin_dashboard.cluster.nodes import views as legacyView

View File

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

@ -18,7 +18,7 @@ import yaml
from django.forms import ValidationError
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

View File

@ -10,7 +10,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

@ -10,8 +10,8 @@
# 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 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
@ -40,7 +40,7 @@ class DeletePolicy(tables.DeleteAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Delete Policy",
u"Delete Policies",
count
@ -48,7 +48,7 @@ class DeletePolicy(tables.DeleteAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Deleted Policy",
u"Deleted Policies",
count

View File

@ -10,7 +10,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

@ -12,7 +12,7 @@
from django.conf import settings
from django.urls import re_path
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon.browsers import views
from senlin_dashboard.cluster.policies import views as legacyView

View File

@ -13,7 +13,7 @@
import yaml
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from senlin_dashboard.api import senlin
from senlin_dashboard.cluster.policies import forms as policies_forms

View File

@ -20,7 +20,7 @@ from senlinclient.common import utils
from django.forms import ValidationError
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

View File

@ -10,7 +10,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

@ -10,8 +10,8 @@
# 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 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
@ -40,7 +40,7 @@ class DeleteProfile(tables.DeleteAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Delete Profile",
u"Delete Profiles",
count
@ -48,7 +48,7 @@ class DeleteProfile(tables.DeleteAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Deleted Profile",
u"Deleted Profiles",
count

View File

@ -10,7 +10,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

@ -12,7 +12,7 @@
from django.conf import settings
from django.urls import re_path
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView
from senlin_dashboard.cluster.profiles import views as legacyViews

View File

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

View File

@ -18,7 +18,7 @@ import yaml
from django.forms import ValidationError
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

View File

@ -10,7 +10,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,8 +11,8 @@
# limitations under the License.
from django.urls import reverse_lazy
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
@ -33,7 +33,7 @@ class DeleteReceiver(tables.DeleteAction):
@staticmethod
def action_present(count):
return ungettext_lazy(
return ngettext_lazy(
u"Delete Receiver",
u"Delete Receivers",
count
@ -41,7 +41,7 @@ class DeleteReceiver(tables.DeleteAction):
@staticmethod
def action_past(count):
return ungettext_lazy(
return ngettext_lazy(
u"Deleted Receiver",
u"Deleted Receivers",
count

View File

@ -10,7 +10,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

@ -12,7 +12,7 @@
from django.conf import settings
from django.urls import re_path
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView

View File

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

View File

@ -100,6 +100,6 @@ commands = oslo_debug_helper -t senlin_dashboard/test {posargs}
[testenv:makemessages]
commands =
pybabel extract -F babel-django.cfg -o senlin_dashboard/locale/django.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2 -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 senlin_dashboard
pybabel extract -F babel-djangojs.cfg -o senlin_dashboard/locale/djangojs.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2 -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 senlin_dashboard
pybabel extract -F babel-django.cfg -o senlin_dashboard/locale/django.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 senlin_dashboard
pybabel extract -F babel-djangojs.cfg -o senlin_dashboard/locale/djangojs.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 senlin_dashboard