From ad40231928ab330d1f0320dd20a3fb2b70d5a09a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 11 Jul 2022 14:56:09 +0900 Subject: [PATCH] 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: I4008e4439d568e0ffedd575870d4bc48c1cc62e5 --- .../content/backup_strategies/panel.py | 2 +- .../content/backup_strategies/tables.py | 8 ++-- .../content/backup_strategies/views.py | 2 +- .../workflows/create_backup_strategy.py | 2 +- .../content/database_backups/panel.py | 2 +- .../content/database_backups/tables.py | 8 ++-- .../content/database_backups/tests.py | 2 +- .../content/database_backups/views.py | 2 +- .../workflows/create_backup.py | 2 +- .../content/database_clusters/forms.py | 2 +- .../content/database_clusters/panel.py | 2 +- .../content/database_clusters/tables.py | 16 +++---- .../content/database_clusters/tabs.py | 2 +- .../content/database_clusters/views.py | 2 +- .../config_param_manager.py | 2 +- .../content/database_configurations/forms.py | 2 +- .../content/database_configurations/panel.py | 2 +- .../content/database_configurations/tables.py | 16 +++---- .../content/database_configurations/tabs.py | 2 +- .../content/database_configurations/views.py | 2 +- trove_dashboard/content/databases/forms.py | 2 +- .../content/databases/logs/tables.py | 20 ++++----- .../content/databases/logs/views.py | 2 +- trove_dashboard/content/databases/panel.py | 2 +- trove_dashboard/content/databases/tables.py | 44 +++++++++---------- trove_dashboard/content/databases/tabs.py | 2 +- trove_dashboard/content/databases/views.py | 2 +- .../databases/workflows/create_instance.py | 2 +- .../content/ng_database_backups/panel.py | 2 +- .../enabled/_1710_database_panel_group.py | 2 +- 30 files changed, 80 insertions(+), 80 deletions(-) diff --git a/trove_dashboard/content/backup_strategies/panel.py b/trove_dashboard/content/backup_strategies/panel.py index 8d684df..833aab6 100644 --- a/trove_dashboard/content/backup_strategies/panel.py +++ b/trove_dashboard/content/backup_strategies/panel.py @@ -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 from openstack_dashboard.dashboards.project import dashboard diff --git a/trove_dashboard/content/backup_strategies/tables.py b/trove_dashboard/content/backup_strategies/tables.py index 64f19df..b0b21e3 100644 --- a/trove_dashboard/content/backup_strategies/tables.py +++ b/trove_dashboard/content/backup_strategies/tables.py @@ -12,8 +12,8 @@ # 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 @@ -31,7 +31,7 @@ class CreateBackupStrategy(tables.LinkAction): class DeleteBackupStrategy(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Backup Strategy", u"Delete Backup Strategies", count @@ -39,7 +39,7 @@ class DeleteBackupStrategy(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Backup Strategy Deleted", u"Backup Strategies Deleted", count diff --git a/trove_dashboard/content/backup_strategies/views.py b/trove_dashboard/content/backup_strategies/views.py index 6664d58..d455817 100644 --- a/trove_dashboard/content/backup_strategies/views.py +++ b/trove_dashboard/content/backup_strategies/views.py @@ -15,7 +15,7 @@ """ Views for displaying database backups. """ -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import tables as horizon_tables diff --git a/trove_dashboard/content/backup_strategies/workflows/create_backup_strategy.py b/trove_dashboard/content/backup_strategies/workflows/create_backup_strategy.py index 4bdb862..360d102 100644 --- a/trove_dashboard/content/backup_strategies/workflows/create_backup_strategy.py +++ b/trove_dashboard/content/backup_strategies/workflows/create_backup_strategy.py @@ -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 forms diff --git a/trove_dashboard/content/database_backups/panel.py b/trove_dashboard/content/database_backups/panel.py index 74fdfd3..7c592d1 100644 --- a/trove_dashboard/content/database_backups/panel.py +++ b/trove_dashboard/content/database_backups/panel.py @@ -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 from openstack_dashboard.dashboards.project import dashboard diff --git a/trove_dashboard/content/database_backups/tables.py b/trove_dashboard/content/database_backups/tables.py index 8ccf0ed..1ec9eda 100644 --- a/trove_dashboard/content/database_backups/tables.py +++ b/trove_dashboard/content/database_backups/tables.py @@ -15,9 +15,9 @@ from django.conf import settings from django.template import defaultfilters as d_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 tables from horizon.utils import filters @@ -101,7 +101,7 @@ class DownloadBackup(tables.LinkAction): class DeleteBackup(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Backup", u"Delete Backups", count @@ -109,7 +109,7 @@ class DeleteBackup(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Deleted Backup", u"Deleted Backups", count diff --git a/trove_dashboard/content/database_backups/tests.py b/trove_dashboard/content/database_backups/tests.py index 18f00ac..6986896 100644 --- a/trove_dashboard/content/database_backups/tests.py +++ b/trove_dashboard/content/database_backups/tests.py @@ -15,7 +15,7 @@ from unittest import mock from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_auth import policy from openstack_dashboard import api as dash_api from troveclient import common diff --git a/trove_dashboard/content/database_backups/views.py b/trove_dashboard/content/database_backups/views.py index 2da80d6..590c218 100644 --- a/trove_dashboard/content/database_backups/views.py +++ b/trove_dashboard/content/database_backups/views.py @@ -16,7 +16,7 @@ Views for displaying database backups. """ 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 as horizon_tables diff --git a/trove_dashboard/content/database_backups/workflows/create_backup.py b/trove_dashboard/content/database_backups/workflows/create_backup.py index d089a36..c5c03d8 100644 --- a/trove_dashboard/content/database_backups/workflows/create_backup.py +++ b/trove_dashboard/content/database_backups/workflows/create_backup.py @@ -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 forms diff --git a/trove_dashboard/content/database_clusters/forms.py b/trove_dashboard/content/database_clusters/forms.py index 05570db..b3ff1f6 100644 --- a/trove_dashboard/content/database_clusters/forms.py +++ b/trove_dashboard/content/database_clusters/forms.py @@ -17,7 +17,7 @@ import collections import uuid from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.debug import sensitive_variables # noqa from horizon import exceptions diff --git a/trove_dashboard/content/database_clusters/panel.py b/trove_dashboard/content/database_clusters/panel.py index 89007a1..d2a2148 100644 --- a/trove_dashboard/content/database_clusters/panel.py +++ b/trove_dashboard/content/database_clusters/panel.py @@ -14,7 +14,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 diff --git a/trove_dashboard/content/database_clusters/tables.py b/trove_dashboard/content/database_clusters/tables.py index a959bdc..111259c 100644 --- a/trove_dashboard/content/database_clusters/tables.py +++ b/trove_dashboard/content/database_clusters/tables.py @@ -17,8 +17,8 @@ from django import shortcuts from django.template.defaultfilters import title # noqa from django import urls -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 messages from horizon import tables @@ -45,7 +45,7 @@ class DeleteCluster(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Cluster", u"Delete Clusters", count @@ -53,7 +53,7 @@ class DeleteCluster(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Scheduled deletion of Cluster", u"Scheduled deletion of Clusters", count @@ -244,7 +244,7 @@ class ClusterShrinkAction(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Shrink Cluster", u"Shrink Cluster", count @@ -252,7 +252,7 @@ class ClusterShrinkAction(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Scheduled Shrinking of Cluster", u"Scheduled Shrinking of Cluster", count @@ -316,7 +316,7 @@ class ClusterGrowRemoveInstance(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Remove Instance", u"Remove Instances", count @@ -324,7 +324,7 @@ class ClusterGrowRemoveInstance(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Removed Instance", u"Removed Instances", count diff --git a/trove_dashboard/content/database_clusters/tabs.py b/trove_dashboard/content/database_clusters/tabs.py index 725a1a7..1a6cd11 100644 --- a/trove_dashboard/content/database_clusters/tabs.py +++ b/trove_dashboard/content/database_clusters/tabs.py @@ -15,7 +15,7 @@ # under the License. from django import template -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import tabs diff --git a/trove_dashboard/content/database_clusters/views.py b/trove_dashboard/content/database_clusters/views.py index 5697df2..35f1eff 100644 --- a/trove_dashboard/content/database_clusters/views.py +++ b/trove_dashboard/content/database_clusters/views.py @@ -21,7 +21,7 @@ from collections import OrderedDict 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 as horizon_forms diff --git a/trove_dashboard/content/database_configurations/config_param_manager.py b/trove_dashboard/content/database_configurations/config_param_manager.py index 069a35e..7ed2cbf 100644 --- a/trove_dashboard/content/database_configurations/config_param_manager.py +++ b/trove_dashboard/content/database_configurations/config_param_manager.py @@ -15,7 +15,7 @@ import builtins from django.core import cache -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from trove_dashboard import api diff --git a/trove_dashboard/content/database_configurations/forms.py b/trove_dashboard/content/database_configurations/forms.py index 42494a7..9558d76 100644 --- a/trove_dashboard/content/database_configurations/forms.py +++ b/trove_dashboard/content/database_configurations/forms.py @@ -13,7 +13,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 forms diff --git a/trove_dashboard/content/database_configurations/panel.py b/trove_dashboard/content/database_configurations/panel.py index 778fdc9..0d2c968 100644 --- a/trove_dashboard/content/database_configurations/panel.py +++ b/trove_dashboard/content/database_configurations/panel.py @@ -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 from openstack_dashboard.dashboards.project import dashboard diff --git a/trove_dashboard/content/database_configurations/tables.py b/trove_dashboard/content/database_configurations/tables.py index 55622cb..989becc 100644 --- a/trove_dashboard/content/database_configurations/tables.py +++ b/trove_dashboard/content/database_configurations/tables.py @@ -14,8 +14,8 @@ from django import shortcuts from django import urls -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 forms from horizon import messages @@ -41,7 +41,7 @@ class DeleteConfiguration(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Configuration Group", u"Delete Configuration Groups", count @@ -49,7 +49,7 @@ class DeleteConfiguration(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Deleted Configuration Group", u"Deleted Configuration Groups", count @@ -149,7 +149,7 @@ class DeleteParameter(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Parameter", u"Delete Parameters", count @@ -157,7 +157,7 @@ class DeleteParameter(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Deleted Parameter", u"Deleted Parameters", count @@ -204,7 +204,7 @@ class ValuesTable(tables.DataTable): class DetachConfiguration(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Detach Configuration Group", u"Detach Configuration Groups", count @@ -212,7 +212,7 @@ class DetachConfiguration(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Detached Configuration Group", u"Detached Configuration Groups", count diff --git a/trove_dashboard/content/database_configurations/tabs.py b/trove_dashboard/content/database_configurations/tabs.py index 7fb0e38..a6b0f22 100644 --- a/trove_dashboard/content/database_configurations/tabs.py +++ b/trove_dashboard/content/database_configurations/tabs.py @@ -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 diff --git a/trove_dashboard/content/database_configurations/views.py b/trove_dashboard/content/database_configurations/views.py index c1f4201..405effe 100644 --- a/trove_dashboard/content/database_configurations/views.py +++ b/trove_dashboard/content/database_configurations/views.py @@ -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 as horizon_forms diff --git a/trove_dashboard/content/databases/forms.py b/trove_dashboard/content/databases/forms.py index be376d4..2c2b00a 100644 --- a/trove_dashboard/content/databases/forms.py +++ b/trove_dashboard/content/databases/forms.py @@ -14,7 +14,7 @@ from django.forms import ValidationError # noqa 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 diff --git a/trove_dashboard/content/databases/logs/tables.py b/trove_dashboard/content/databases/logs/tables.py index b7cb3cd..a1a6ccf 100644 --- a/trove_dashboard/content/databases/logs/tables.py +++ b/trove_dashboard/content/databases/logs/tables.py @@ -13,8 +13,8 @@ # under the License. from django import urls -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 @@ -24,7 +24,7 @@ from trove_dashboard import api class PublishLog(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Publish Log", u"Publish Logs", count @@ -32,7 +32,7 @@ class PublishLog(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Published Log", u"Published Logs", count @@ -48,7 +48,7 @@ class PublishLog(tables.BatchAction): class DiscardLog(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Discard Log", u"Discard Logs", count @@ -56,7 +56,7 @@ class DiscardLog(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Discarded Log", u"Discarded Logs", count @@ -72,7 +72,7 @@ class DiscardLog(tables.BatchAction): class EnableLog(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Enable Log", u"Enable Logs", count @@ -80,7 +80,7 @@ class EnableLog(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Enabled Log", u"Enabled Logs", count @@ -96,7 +96,7 @@ class EnableLog(tables.BatchAction): class DisableLog(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Disable Log", u"Disable Logs", count @@ -104,7 +104,7 @@ class DisableLog(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Disabled Log", u"Disabled Logs", count diff --git a/trove_dashboard/content/databases/logs/views.py b/trove_dashboard/content/databases/logs/views.py index 5eedc84..4a5ee45 100644 --- a/trove_dashboard/content/databases/logs/views.py +++ b/trove_dashboard/content/databases/logs/views.py @@ -14,7 +14,7 @@ from django import http from django import shortcuts -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from horizon import exceptions diff --git a/trove_dashboard/content/databases/panel.py b/trove_dashboard/content/databases/panel.py index 16cf6c0..c77d7ba 100644 --- a/trove_dashboard/content/databases/panel.py +++ b/trove_dashboard/content/databases/panel.py @@ -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 from openstack_dashboard.dashboards.project import dashboard diff --git a/trove_dashboard/content/databases/tables.py b/trove_dashboard/content/databases/tables.py index 38312cc..3b7c565 100644 --- a/trove_dashboard/content/databases/tables.py +++ b/trove_dashboard/content/databases/tables.py @@ -22,9 +22,9 @@ from django.urls import reverse from django.utils import html from django.utils import safestring +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 messages @@ -45,7 +45,7 @@ class DeleteInstance(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Instance", u"Delete Instances", count @@ -53,7 +53,7 @@ class DeleteInstance(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Scheduled deletion of Instance", u"Scheduled deletion of Instances", count @@ -69,7 +69,7 @@ class RestartInstance(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Restart Instance", u"Restart Instances", count @@ -77,7 +77,7 @@ class RestartInstance(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Restarted Instance", u"Restarted Instances", count @@ -98,7 +98,7 @@ class RestartInstance(tables.BatchAction): class DetachReplica(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Detach Replica", u"Detach Replicas", count @@ -106,7 +106,7 @@ class DetachReplica(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Replica Detached", u"Replicas Detached", count @@ -141,7 +141,7 @@ class PromoteToReplicaSource(tables.LinkAction): class EjectReplicaSource(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Eject Replica Source", u"Eject Replica Sources", count @@ -149,7 +149,7 @@ class EjectReplicaSource(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Ejected Replica Source", u"Ejected Replica Sources", count @@ -169,7 +169,7 @@ class EjectReplicaSource(tables.BatchAction): class GrantAccess(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Grant Access", u"Grant Access", count @@ -177,7 +177,7 @@ class GrantAccess(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Granted Access to", u"Granted Access to", count @@ -203,7 +203,7 @@ class GrantAccess(tables.BatchAction): class RevokeAccess(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Revoke Access", u"Revoke Access", count @@ -211,7 +211,7 @@ class RevokeAccess(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Access Revoked to", u"Access Revoked to", count @@ -324,7 +324,7 @@ def has_user_add_perm(request): class DeleteUser(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete User", u"Delete Users", count @@ -332,7 +332,7 @@ class DeleteUser(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Deleted User", u"Deleted Users", count @@ -371,7 +371,7 @@ def has_database_add_perm(request): class DeleteDatabase(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Delete Database", u"Delete Databases", count @@ -379,7 +379,7 @@ class DeleteDatabase(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Deleted Database", u"Deleted Databases", count @@ -461,7 +461,7 @@ class AttachConfiguration(tables.LinkAction): class DetachConfiguration(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Detach Configuration Group", u"Detach Configuration Groups", count @@ -469,7 +469,7 @@ class DetachConfiguration(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Detached Configuration Group", u"Detached Configuration Groups", count @@ -662,7 +662,7 @@ class StopDatabase(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( u"Stop Database Service", u"Stop Database Services", count @@ -670,7 +670,7 @@ class StopDatabase(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( u"Database Service stopped", u"Database Services stopped", count diff --git a/trove_dashboard/content/databases/tabs.py b/trove_dashboard/content/databases/tabs.py index bc62d38..056360e 100644 --- a/trove_dashboard/content/databases/tabs.py +++ b/trove_dashboard/content/databases/tabs.py @@ -13,7 +13,7 @@ # under the License. from django import template -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import tabs diff --git a/trove_dashboard/content/databases/views.py b/trove_dashboard/content/databases/views.py index 775e713..d413b58 100644 --- a/trove_dashboard/content/databases/views.py +++ b/trove_dashboard/content/databases/views.py @@ -19,7 +19,7 @@ from collections import OrderedDict 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 as horizon_forms diff --git a/trove_dashboard/content/databases/workflows/create_instance.py b/trove_dashboard/content/databases/workflows/create_instance.py index 86b0e20..3e4108a 100644 --- a/trove_dashboard/content/databases/workflows/create_instance.py +++ b/trove_dashboard/content/databases/workflows/create_instance.py @@ -14,7 +14,7 @@ from django.conf import settings 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 diff --git a/trove_dashboard/content/ng_database_backups/panel.py b/trove_dashboard/content/ng_database_backups/panel.py index 8a9c9b1..fcc4b91 100644 --- a/trove_dashboard/content/ng_database_backups/panel.py +++ b/trove_dashboard/content/ng_database_backups/panel.py @@ -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 diff --git a/trove_dashboard/enabled/_1710_database_panel_group.py b/trove_dashboard/enabled/_1710_database_panel_group.py index 3409b8f..6d9e277 100644 --- a/trove_dashboard/enabled/_1710_database_panel_group.py +++ b/trove_dashboard/enabled/_1710_database_panel_group.py @@ -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 = 'database'