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
This commit is contained in:
parent
fc63940f4a
commit
ad40231928
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ class CreateBackupStrategy(tables.LinkAction):
|
|||||||
class DeleteBackupStrategy(tables.DeleteAction):
|
class DeleteBackupStrategy(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Backup Strategy",
|
u"Delete Backup Strategy",
|
||||||
u"Delete Backup Strategies",
|
u"Delete Backup Strategies",
|
||||||
count
|
count
|
||||||
@ -39,7 +39,7 @@ class DeleteBackupStrategy(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Backup Strategy Deleted",
|
u"Backup Strategy Deleted",
|
||||||
u"Backup Strategies Deleted",
|
u"Backup Strategies Deleted",
|
||||||
count
|
count
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"""
|
"""
|
||||||
Views for displaying database backups.
|
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 exceptions
|
||||||
from horizon import tables as horizon_tables
|
from horizon import tables as horizon_tables
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.template import defaultfilters as d_filters
|
from django.template import defaultfilters as d_filters
|
||||||
from django.urls import reverse
|
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 pgettext_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils.translation import ungettext_lazy
|
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.utils import filters
|
from horizon.utils import filters
|
||||||
@ -101,7 +101,7 @@ class DownloadBackup(tables.LinkAction):
|
|||||||
class DeleteBackup(tables.DeleteAction):
|
class DeleteBackup(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Backup",
|
u"Delete Backup",
|
||||||
u"Delete Backups",
|
u"Delete Backups",
|
||||||
count
|
count
|
||||||
@ -109,7 +109,7 @@ class DeleteBackup(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Backup",
|
u"Deleted Backup",
|
||||||
u"Deleted Backups",
|
u"Deleted Backups",
|
||||||
count
|
count
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from django.urls import reverse
|
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_auth import policy
|
||||||
from openstack_dashboard import api as dash_api
|
from openstack_dashboard import api as dash_api
|
||||||
from troveclient import common
|
from troveclient import common
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
Views for displaying database backups.
|
Views for displaying database backups.
|
||||||
"""
|
"""
|
||||||
from django.urls import reverse
|
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 exceptions
|
||||||
from horizon import tables as horizon_tables
|
from horizon import tables as horizon_tables
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -17,7 +17,7 @@ import collections
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from django.urls import reverse
|
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 django.views.decorators.debug import sensitive_variables # noqa
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
from django import shortcuts
|
from django import shortcuts
|
||||||
from django.template.defaultfilters import title # noqa
|
from django.template.defaultfilters import title # noqa
|
||||||
from django import urls
|
from django import urls
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
@ -45,7 +45,7 @@ class DeleteCluster(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Cluster",
|
u"Delete Cluster",
|
||||||
u"Delete Clusters",
|
u"Delete Clusters",
|
||||||
count
|
count
|
||||||
@ -53,7 +53,7 @@ class DeleteCluster(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Scheduled deletion of Cluster",
|
u"Scheduled deletion of Cluster",
|
||||||
u"Scheduled deletion of Clusters",
|
u"Scheduled deletion of Clusters",
|
||||||
count
|
count
|
||||||
@ -244,7 +244,7 @@ class ClusterShrinkAction(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Shrink Cluster",
|
u"Shrink Cluster",
|
||||||
u"Shrink Cluster",
|
u"Shrink Cluster",
|
||||||
count
|
count
|
||||||
@ -252,7 +252,7 @@ class ClusterShrinkAction(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Scheduled Shrinking of Cluster",
|
u"Scheduled Shrinking of Cluster",
|
||||||
u"Scheduled Shrinking of Cluster",
|
u"Scheduled Shrinking of Cluster",
|
||||||
count
|
count
|
||||||
@ -316,7 +316,7 @@ class ClusterGrowRemoveInstance(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Remove Instance",
|
u"Remove Instance",
|
||||||
u"Remove Instances",
|
u"Remove Instances",
|
||||||
count
|
count
|
||||||
@ -324,7 +324,7 @@ class ClusterGrowRemoveInstance(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Removed Instance",
|
u"Removed Instance",
|
||||||
u"Removed Instances",
|
u"Removed Instances",
|
||||||
count
|
count
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django import template
|
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 exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
@ -21,7 +21,7 @@ from collections import OrderedDict
|
|||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
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 exceptions
|
||||||
from horizon import forms as horizon_forms
|
from horizon import forms as horizon_forms
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
import builtins
|
import builtins
|
||||||
|
|
||||||
from django.core import cache
|
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
|
from trove_dashboard import api
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.urls import reverse
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
from django import shortcuts
|
from django import shortcuts
|
||||||
from django import urls
|
from django import urls
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
@ -41,7 +41,7 @@ class DeleteConfiguration(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Configuration Group",
|
u"Delete Configuration Group",
|
||||||
u"Delete Configuration Groups",
|
u"Delete Configuration Groups",
|
||||||
count
|
count
|
||||||
@ -49,7 +49,7 @@ class DeleteConfiguration(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Configuration Group",
|
u"Deleted Configuration Group",
|
||||||
u"Deleted Configuration Groups",
|
u"Deleted Configuration Groups",
|
||||||
count
|
count
|
||||||
@ -149,7 +149,7 @@ class DeleteParameter(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Parameter",
|
u"Delete Parameter",
|
||||||
u"Delete Parameters",
|
u"Delete Parameters",
|
||||||
count
|
count
|
||||||
@ -157,7 +157,7 @@ class DeleteParameter(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Parameter",
|
u"Deleted Parameter",
|
||||||
u"Deleted Parameters",
|
u"Deleted Parameters",
|
||||||
count
|
count
|
||||||
@ -204,7 +204,7 @@ class ValuesTable(tables.DataTable):
|
|||||||
class DetachConfiguration(tables.BatchAction):
|
class DetachConfiguration(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Detach Configuration Group",
|
u"Detach Configuration Group",
|
||||||
u"Detach Configuration Groups",
|
u"Detach Configuration Groups",
|
||||||
count
|
count
|
||||||
@ -212,7 +212,7 @@ class DetachConfiguration(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Detached Configuration Group",
|
u"Detached Configuration Group",
|
||||||
u"Detached Configuration Groups",
|
u"Detached Configuration Groups",
|
||||||
count
|
count
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
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 exceptions
|
||||||
from horizon import forms as horizon_forms
|
from horizon import forms as horizon_forms
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from django.forms import ValidationError # noqa
|
from django.forms import ValidationError # noqa
|
||||||
from django.urls import reverse
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django import urls
|
from django import urls
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ from trove_dashboard import api
|
|||||||
class PublishLog(tables.BatchAction):
|
class PublishLog(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Publish Log",
|
u"Publish Log",
|
||||||
u"Publish Logs",
|
u"Publish Logs",
|
||||||
count
|
count
|
||||||
@ -32,7 +32,7 @@ class PublishLog(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Published Log",
|
u"Published Log",
|
||||||
u"Published Logs",
|
u"Published Logs",
|
||||||
count
|
count
|
||||||
@ -48,7 +48,7 @@ class PublishLog(tables.BatchAction):
|
|||||||
class DiscardLog(tables.BatchAction):
|
class DiscardLog(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Discard Log",
|
u"Discard Log",
|
||||||
u"Discard Logs",
|
u"Discard Logs",
|
||||||
count
|
count
|
||||||
@ -56,7 +56,7 @@ class DiscardLog(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Discarded Log",
|
u"Discarded Log",
|
||||||
u"Discarded Logs",
|
u"Discarded Logs",
|
||||||
count
|
count
|
||||||
@ -72,7 +72,7 @@ class DiscardLog(tables.BatchAction):
|
|||||||
class EnableLog(tables.BatchAction):
|
class EnableLog(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Enable Log",
|
u"Enable Log",
|
||||||
u"Enable Logs",
|
u"Enable Logs",
|
||||||
count
|
count
|
||||||
@ -80,7 +80,7 @@ class EnableLog(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Enabled Log",
|
u"Enabled Log",
|
||||||
u"Enabled Logs",
|
u"Enabled Logs",
|
||||||
count
|
count
|
||||||
@ -96,7 +96,7 @@ class EnableLog(tables.BatchAction):
|
|||||||
class DisableLog(tables.BatchAction):
|
class DisableLog(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Disable Log",
|
u"Disable Log",
|
||||||
u"Disable Logs",
|
u"Disable Logs",
|
||||||
count
|
count
|
||||||
@ -104,7 +104,7 @@ class DisableLog(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Disabled Log",
|
u"Disabled Log",
|
||||||
u"Disabled Logs",
|
u"Disabled Logs",
|
||||||
count
|
count
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django import shortcuts
|
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 django.views import generic
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
@ -22,9 +22,9 @@ from django.urls import reverse
|
|||||||
from django.utils import html
|
from django.utils import html
|
||||||
from django.utils import safestring
|
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 pgettext_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils.translation import ungettext_lazy
|
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
@ -45,7 +45,7 @@ class DeleteInstance(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Instance",
|
u"Delete Instance",
|
||||||
u"Delete Instances",
|
u"Delete Instances",
|
||||||
count
|
count
|
||||||
@ -53,7 +53,7 @@ class DeleteInstance(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Scheduled deletion of Instance",
|
u"Scheduled deletion of Instance",
|
||||||
u"Scheduled deletion of Instances",
|
u"Scheduled deletion of Instances",
|
||||||
count
|
count
|
||||||
@ -69,7 +69,7 @@ class RestartInstance(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Restart Instance",
|
u"Restart Instance",
|
||||||
u"Restart Instances",
|
u"Restart Instances",
|
||||||
count
|
count
|
||||||
@ -77,7 +77,7 @@ class RestartInstance(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Restarted Instance",
|
u"Restarted Instance",
|
||||||
u"Restarted Instances",
|
u"Restarted Instances",
|
||||||
count
|
count
|
||||||
@ -98,7 +98,7 @@ class RestartInstance(tables.BatchAction):
|
|||||||
class DetachReplica(tables.BatchAction):
|
class DetachReplica(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Detach Replica",
|
u"Detach Replica",
|
||||||
u"Detach Replicas",
|
u"Detach Replicas",
|
||||||
count
|
count
|
||||||
@ -106,7 +106,7 @@ class DetachReplica(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Replica Detached",
|
u"Replica Detached",
|
||||||
u"Replicas Detached",
|
u"Replicas Detached",
|
||||||
count
|
count
|
||||||
@ -141,7 +141,7 @@ class PromoteToReplicaSource(tables.LinkAction):
|
|||||||
class EjectReplicaSource(tables.BatchAction):
|
class EjectReplicaSource(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Eject Replica Source",
|
u"Eject Replica Source",
|
||||||
u"Eject Replica Sources",
|
u"Eject Replica Sources",
|
||||||
count
|
count
|
||||||
@ -149,7 +149,7 @@ class EjectReplicaSource(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Ejected Replica Source",
|
u"Ejected Replica Source",
|
||||||
u"Ejected Replica Sources",
|
u"Ejected Replica Sources",
|
||||||
count
|
count
|
||||||
@ -169,7 +169,7 @@ class EjectReplicaSource(tables.BatchAction):
|
|||||||
class GrantAccess(tables.BatchAction):
|
class GrantAccess(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Grant Access",
|
u"Grant Access",
|
||||||
u"Grant Access",
|
u"Grant Access",
|
||||||
count
|
count
|
||||||
@ -177,7 +177,7 @@ class GrantAccess(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Granted Access to",
|
u"Granted Access to",
|
||||||
u"Granted Access to",
|
u"Granted Access to",
|
||||||
count
|
count
|
||||||
@ -203,7 +203,7 @@ class GrantAccess(tables.BatchAction):
|
|||||||
class RevokeAccess(tables.BatchAction):
|
class RevokeAccess(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Revoke Access",
|
u"Revoke Access",
|
||||||
u"Revoke Access",
|
u"Revoke Access",
|
||||||
count
|
count
|
||||||
@ -211,7 +211,7 @@ class RevokeAccess(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Access Revoked to",
|
u"Access Revoked to",
|
||||||
u"Access Revoked to",
|
u"Access Revoked to",
|
||||||
count
|
count
|
||||||
@ -324,7 +324,7 @@ def has_user_add_perm(request):
|
|||||||
class DeleteUser(tables.DeleteAction):
|
class DeleteUser(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete User",
|
u"Delete User",
|
||||||
u"Delete Users",
|
u"Delete Users",
|
||||||
count
|
count
|
||||||
@ -332,7 +332,7 @@ class DeleteUser(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted User",
|
u"Deleted User",
|
||||||
u"Deleted Users",
|
u"Deleted Users",
|
||||||
count
|
count
|
||||||
@ -371,7 +371,7 @@ def has_database_add_perm(request):
|
|||||||
class DeleteDatabase(tables.DeleteAction):
|
class DeleteDatabase(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Database",
|
u"Delete Database",
|
||||||
u"Delete Databases",
|
u"Delete Databases",
|
||||||
count
|
count
|
||||||
@ -379,7 +379,7 @@ class DeleteDatabase(tables.DeleteAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Database",
|
u"Deleted Database",
|
||||||
u"Deleted Databases",
|
u"Deleted Databases",
|
||||||
count
|
count
|
||||||
@ -461,7 +461,7 @@ class AttachConfiguration(tables.LinkAction):
|
|||||||
class DetachConfiguration(tables.BatchAction):
|
class DetachConfiguration(tables.BatchAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Detach Configuration Group",
|
u"Detach Configuration Group",
|
||||||
u"Detach Configuration Groups",
|
u"Detach Configuration Groups",
|
||||||
count
|
count
|
||||||
@ -469,7 +469,7 @@ class DetachConfiguration(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Detached Configuration Group",
|
u"Detached Configuration Group",
|
||||||
u"Detached Configuration Groups",
|
u"Detached Configuration Groups",
|
||||||
count
|
count
|
||||||
@ -662,7 +662,7 @@ class StopDatabase(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Stop Database Service",
|
u"Stop Database Service",
|
||||||
u"Stop Database Services",
|
u"Stop Database Services",
|
||||||
count
|
count
|
||||||
@ -670,7 +670,7 @@ class StopDatabase(tables.BatchAction):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Database Service stopped",
|
u"Database Service stopped",
|
||||||
u"Database Services stopped",
|
u"Database Services stopped",
|
||||||
count
|
count
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django import template
|
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 exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
@ -19,7 +19,7 @@ from collections import OrderedDict
|
|||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
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 exceptions
|
||||||
from horizon import forms as horizon_forms
|
from horizon import forms as horizon_forms
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.urls import reverse
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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.
|
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
||||||
PANEL_GROUP = 'database'
|
PANEL_GROUP = 'database'
|
||||||
|
Loading…
Reference in New Issue
Block a user