From cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 26 Jan 2022 22:42:15 +0900 Subject: [PATCH] Address RemovedInDjango40Warning (2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(), ungettext(), and ungettext_lazy() are deprecated in favor of the functions that they’re aliases for: django.utils.translation.gettext(), gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy(). https://docs.djangoproject.com/en/4.0/releases/3.0/#id3 Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250 --- doc/source/admin/customize-configure.rst | 2 +- doc/source/configuration/customizing.rst | 4 +- doc/source/contributor/topics/translation.rst | 10 ++-- .../contributor/tutorials/dashboard.rst | 12 ++-- doc/source/contributor/tutorials/plugin.rst | 2 +- .../contributor/tutorials/table_actions.rst | 6 +- horizon/base.py | 2 +- horizon/browsers/base.py | 2 +- horizon/browsers/views.py | 2 +- horizon/conf/default.py | 2 +- horizon/decorators.py | 2 +- horizon/defaults.py | 2 +- horizon/exceptions.py | 2 +- horizon/forms/fields.py | 2 +- horizon/forms/views.py | 2 +- horizon/notifications.py | 2 +- horizon/tables/actions.py | 2 +- horizon/tables/base.py | 2 +- horizon/templatetags/horizon.py | 2 +- horizon/templatetags/sizeformat.py | 12 ++-- .../test_dashboards/dogs/puppies/tables.py | 6 +- horizon/test/unit/tables/test_tables.py | 14 ++--- horizon/test/unit/test_views.py | 2 +- horizon/utils/filters.py | 2 +- horizon/utils/validators.py | 2 +- horizon/workflows/base.py | 2 +- openstack_auth/backend.py | 2 +- openstack_auth/forms.py | 2 +- openstack_auth/plugin/base.py | 2 +- openstack_auth/plugin/k2k.py | 2 +- openstack_auth/views.py | 2 +- openstack_dashboard/api/cinder.py | 2 +- openstack_dashboard/api/glance.py | 2 +- openstack_dashboard/api/keystone.py | 2 +- openstack_dashboard/api/neutron.py | 2 +- openstack_dashboard/api/nova.py | 2 +- openstack_dashboard/api/rest/cinder.py | 2 +- openstack_dashboard/api/rest/json_encoder.py | 2 +- openstack_dashboard/api/rest/neutron.py | 2 +- openstack_dashboard/api/rest/nova.py | 2 +- openstack_dashboard/api/swift.py | 2 +- .../contrib/developer/dashboard.py | 2 +- .../contrib/developer/form_builder/panel.py | 2 +- .../contrib/developer/profiler/middleware.py | 2 +- .../contrib/developer/profiler/panel.py | 2 +- .../contrib/developer/profiler/views.py | 2 +- .../developer/resource_browser/panel.py | 2 +- .../contrib/developer/theme_preview/panel.py | 2 +- .../contrib/developer/theme_preview/views.py | 2 +- .../dashboards/admin/aggregates/forms.py | 2 +- .../dashboards/admin/aggregates/panel.py | 2 +- .../dashboards/admin/aggregates/tables.py | 8 +-- .../dashboards/admin/aggregates/views.py | 2 +- .../dashboards/admin/aggregates/workflows.py | 2 +- .../dashboards/admin/backups/forms.py | 2 +- .../dashboards/admin/backups/tables.py | 8 +-- .../dashboards/admin/backups/views.py | 2 +- .../dashboards/admin/dashboard.py | 2 +- .../dashboards/admin/defaults/panel.py | 2 +- .../dashboards/admin/defaults/tables.py | 2 +- .../dashboards/admin/defaults/tabs.py | 2 +- .../dashboards/admin/defaults/views.py | 2 +- .../dashboards/admin/defaults/workflows.py | 2 +- .../dashboards/admin/flavors/panel.py | 2 +- .../dashboards/admin/flavors/tables.py | 8 +-- .../dashboards/admin/flavors/urls.py | 2 +- .../dashboards/admin/flavors/views.py | 2 +- .../dashboards/admin/flavors/workflows.py | 2 +- .../dashboards/admin/floating_ips/forms.py | 2 +- .../dashboards/admin/floating_ips/panel.py | 2 +- .../dashboards/admin/floating_ips/tables.py | 2 +- .../dashboards/admin/floating_ips/views.py | 2 +- .../dashboards/admin/group_types/forms.py | 2 +- .../dashboards/admin/group_types/panel.py | 2 +- .../admin/group_types/specs/forms.py | 2 +- .../admin/group_types/specs/tables.py | 8 +-- .../admin/group_types/specs/views.py | 2 +- .../dashboards/admin/group_types/tables.py | 8 +-- .../dashboards/admin/group_types/views.py | 2 +- .../admin/hypervisors/compute/forms.py | 2 +- .../admin/hypervisors/compute/tables.py | 8 +-- .../admin/hypervisors/compute/tabs.py | 2 +- .../admin/hypervisors/compute/views.py | 2 +- .../dashboards/admin/hypervisors/panel.py | 2 +- .../dashboards/admin/hypervisors/tables.py | 2 +- .../dashboards/admin/hypervisors/tabs.py | 2 +- .../dashboards/admin/hypervisors/views.py | 2 +- .../dashboards/admin/images/panel.py | 2 +- .../dashboards/admin/images/tables.py | 2 +- .../dashboards/admin/images/urls.py | 2 +- .../dashboards/admin/images/views.py | 2 +- .../dashboards/admin/info/panel.py | 2 +- .../dashboards/admin/info/tables.py | 2 +- .../dashboards/admin/info/tabs.py | 2 +- .../dashboards/admin/info/views.py | 2 +- .../dashboards/admin/instances/forms.py | 2 +- .../dashboards/admin/instances/panel.py | 2 +- .../dashboards/admin/instances/tables.py | 8 +-- .../dashboards/admin/instances/views.py | 2 +- .../dashboards/admin/metadata_defs/forms.py | 2 +- .../dashboards/admin/metadata_defs/panel.py | 2 +- .../dashboards/admin/metadata_defs/tables.py | 8 +-- .../dashboards/admin/metadata_defs/tabs.py | 2 +- .../dashboards/admin/metadata_defs/views.py | 2 +- .../dashboards/admin/networks/agents/forms.py | 2 +- .../admin/networks/agents/tables.py | 8 +-- .../dashboards/admin/networks/agents/tabs.py | 2 +- .../dashboards/admin/networks/agents/views.py | 2 +- .../dashboards/admin/networks/forms.py | 2 +- .../dashboards/admin/networks/panel.py | 2 +- .../dashboards/admin/networks/ports/tables.py | 2 +- .../dashboards/admin/networks/ports/views.py | 2 +- .../admin/networks/ports/workflows.py | 2 +- .../admin/networks/subnets/tables.py | 2 +- .../admin/networks/subnets/workflows.py | 2 +- .../dashboards/admin/networks/tables.py | 2 +- .../dashboards/admin/networks/views.py | 2 +- .../dashboards/admin/ngflavors/panel.py | 2 +- .../dashboards/admin/overview/panel.py | 2 +- .../dashboards/admin/overview/views.py | 2 +- .../dashboards/admin/rbac_policies/forms.py | 2 +- .../dashboards/admin/rbac_policies/panel.py | 2 +- .../dashboards/admin/rbac_policies/tables.py | 8 +-- .../dashboards/admin/rbac_policies/tabs.py | 2 +- .../dashboards/admin/rbac_policies/views.py | 2 +- .../routers/extensions/extraroutes/tables.py | 2 +- .../dashboards/admin/routers/forms.py | 2 +- .../dashboards/admin/routers/panel.py | 2 +- .../dashboards/admin/routers/ports/tables.py | 2 +- .../dashboards/admin/routers/tables.py | 2 +- .../dashboards/admin/routers/views.py | 2 +- .../dashboards/admin/snapshots/forms.py | 2 +- .../dashboards/admin/snapshots/panel.py | 2 +- .../dashboards/admin/snapshots/tables.py | 2 +- .../dashboards/admin/snapshots/tabs.py | 2 +- .../dashboards/admin/snapshots/views.py | 2 +- .../dashboards/admin/trunks/panel.py | 2 +- .../dashboards/admin/trunks/urls.py | 2 +- .../dashboards/admin/vg_snapshots/tables.py | 2 +- .../dashboards/admin/vg_snapshots/views.py | 2 +- .../dashboards/admin/volume_groups/tables.py | 2 +- .../dashboards/admin/volume_groups/views.py | 2 +- .../admin/volume_types/extras/forms.py | 2 +- .../admin/volume_types/extras/tables.py | 8 +-- .../admin/volume_types/extras/views.py | 2 +- .../dashboards/admin/volume_types/forms.py | 2 +- .../dashboards/admin/volume_types/panel.py | 2 +- .../admin/volume_types/qos_specs/forms.py | 2 +- .../admin/volume_types/qos_specs/tables.py | 8 +-- .../admin/volume_types/qos_specs/views.py | 2 +- .../dashboards/admin/volume_types/tables.py | 16 +++--- .../dashboards/admin/volume_types/views.py | 2 +- .../dashboards/admin/volumes/forms.py | 2 +- .../dashboards/admin/volumes/panel.py | 2 +- .../dashboards/admin/volumes/tables.py | 2 +- .../dashboards/admin/volumes/views.py | 2 +- .../identity/application_credentials/forms.py | 2 +- .../identity/application_credentials/panel.py | 2 +- .../application_credentials/tables.py | 8 +-- .../identity/application_credentials/views.py | 2 +- .../dashboards/identity/dashboard.py | 2 +- .../dashboards/identity/domains/panel.py | 2 +- .../dashboards/identity/domains/tables.py | 16 +++--- .../dashboards/identity/domains/urls.py | 2 +- .../dashboards/identity/domains/views.py | 2 +- .../dashboards/identity/domains/workflows.py | 2 +- .../dashboards/identity/groups/forms.py | 2 +- .../dashboards/identity/groups/panel.py | 2 +- .../dashboards/identity/groups/tables.py | 16 +++--- .../dashboards/identity/groups/views.py | 2 +- .../identity/identity_providers/forms.py | 2 +- .../identity/identity_providers/panel.py | 2 +- .../identity_providers/protocols/forms.py | 2 +- .../identity_providers/protocols/tables.py | 8 +-- .../identity_providers/protocols/views.py | 2 +- .../identity/identity_providers/tables.py | 8 +-- .../identity/identity_providers/tabs.py | 2 +- .../identity/identity_providers/views.py | 2 +- .../dashboards/identity/mappings/forms.py | 2 +- .../dashboards/identity/mappings/panel.py | 2 +- .../dashboards/identity/mappings/tables.py | 8 +-- .../dashboards/identity/mappings/views.py | 2 +- .../identity/projects/groups/tables.py | 2 +- .../dashboards/identity/projects/panel.py | 2 +- .../dashboards/identity/projects/tables.py | 8 +-- .../dashboards/identity/projects/tabs.py | 2 +- .../identity/projects/users/tables.py | 2 +- .../dashboards/identity/projects/views.py | 2 +- .../dashboards/identity/projects/workflows.py | 2 +- .../dashboards/identity/roles/forms.py | 2 +- .../dashboards/identity/roles/panel.py | 2 +- .../dashboards/identity/roles/tables.py | 8 +-- .../dashboards/identity/roles/urls.py | 2 +- .../dashboards/identity/roles/views.py | 2 +- .../dashboards/identity/users/forms.py | 2 +- .../identity/users/groups/tables.py | 2 +- .../dashboards/identity/users/panel.py | 2 +- .../identity/users/role_assignments/tables.py | 2 +- .../dashboards/identity/users/tables.py | 16 +++--- .../dashboards/identity/users/tabs.py | 2 +- .../dashboards/identity/users/urls.py | 2 +- .../dashboards/identity/users/views.py | 2 +- .../dashboards/project/api_access/forms.py | 2 +- .../dashboards/project/api_access/panel.py | 2 +- .../dashboards/project/api_access/tables.py | 2 +- .../dashboards/project/api_access/views.py | 2 +- .../dashboards/project/backups/forms.py | 2 +- .../dashboards/project/backups/panel.py | 2 +- .../dashboards/project/backups/tables.py | 8 +-- .../dashboards/project/backups/tabs.py | 2 +- .../dashboards/project/backups/views.py | 2 +- .../dashboards/project/containers/panel.py | 2 +- .../dashboards/project/containers/utils.py | 2 +- .../dashboards/project/dashboard.py | 2 +- .../dashboards/project/floating_ips/forms.py | 2 +- .../dashboards/project/floating_ips/panel.py | 2 +- .../dashboards/project/floating_ips/tables.py | 8 +-- .../dashboards/project/floating_ips/views.py | 2 +- .../project/floating_ips/workflows.py | 2 +- .../dashboards/project/images/images/forms.py | 2 +- .../project/images/images/tables.py | 8 +-- .../dashboards/project/images/images/tabs.py | 2 +- .../dashboards/project/images/images/urls.py | 2 +- .../dashboards/project/images/images/views.py | 2 +- .../dashboards/project/images/panel.py | 2 +- .../project/images/snapshots/forms.py | 2 +- .../project/images/snapshots/views.py | 2 +- .../dashboards/project/images/urls.py | 2 +- .../dashboards/project/images/utils.py | 2 +- .../dashboards/project/images/views.py | 2 +- .../project/instances/audit_tables.py | 2 +- .../dashboards/project/instances/console.py | 2 +- .../dashboards/project/instances/forms.py | 2 +- .../project/instances/interfaces_tables.py | 2 +- .../dashboards/project/instances/panel.py | 2 +- .../dashboards/project/instances/tables.py | 56 +++++++++---------- .../dashboards/project/instances/tabs.py | 2 +- .../dashboards/project/instances/utils.py | 2 +- .../dashboards/project/instances/views.py | 2 +- .../instances/workflows/resize_instance.py | 2 +- .../instances/workflows/update_instance.py | 2 +- .../dashboards/project/key_pairs/forms.py | 2 +- .../dashboards/project/key_pairs/panel.py | 2 +- .../dashboards/project/key_pairs/tables.py | 8 +-- .../dashboards/project/key_pairs/urls.py | 2 +- .../dashboards/project/key_pairs/views.py | 2 +- .../dashboards/project/network_qos/panel.py | 2 +- .../dashboards/project/network_qos/urls.py | 2 +- .../network_topology/instances/tables.py | 2 +- .../network_topology/networks/tables.py | 2 +- .../project/network_topology/panel.py | 2 +- .../project/network_topology/ports/tables.py | 2 +- .../network_topology/routers/tables.py | 2 +- .../network_topology/subnets/tables.py | 2 +- .../project/network_topology/tabs.py | 2 +- .../project/network_topology/views.py | 2 +- .../dashboards/project/networks/forms.py | 2 +- .../dashboards/project/networks/panel.py | 2 +- .../extensions/allowed_address_pairs/forms.py | 2 +- .../allowed_address_pairs/tables.py | 8 +-- .../extensions/allowed_address_pairs/tabs.py | 2 +- .../extensions/allowed_address_pairs/views.py | 2 +- .../project/networks/ports/sg_base.py | 2 +- .../project/networks/ports/tables.py | 8 +-- .../dashboards/project/networks/ports/tabs.py | 2 +- .../project/networks/ports/views.py | 2 +- .../project/networks/ports/workflows.py | 2 +- .../project/networks/subnets/tables.py | 8 +-- .../project/networks/subnets/tabs.py | 2 +- .../project/networks/subnets/utils.py | 2 +- .../project/networks/subnets/views.py | 2 +- .../project/networks/subnets/workflows.py | 2 +- .../dashboards/project/networks/tables.py | 8 +-- .../dashboards/project/networks/tabs.py | 2 +- .../dashboards/project/networks/views.py | 2 +- .../dashboards/project/networks/workflows.py | 2 +- .../dashboards/project/overview/panel.py | 2 +- .../dashboards/project/overview/views.py | 2 +- .../routers/extensions/extraroutes/forms.py | 2 +- .../routers/extensions/extraroutes/tables.py | 8 +-- .../routers/extensions/extraroutes/tabs.py | 2 +- .../routers/extensions/extraroutes/views.py | 2 +- .../dashboards/project/routers/forms.py | 2 +- .../dashboards/project/routers/panel.py | 2 +- .../dashboards/project/routers/ports/forms.py | 2 +- .../project/routers/ports/tables.py | 8 +-- .../dashboards/project/routers/ports/tabs.py | 2 +- .../dashboards/project/routers/ports/views.py | 2 +- .../dashboards/project/routers/tables.py | 12 ++-- .../dashboards/project/routers/tabs.py | 2 +- .../dashboards/project/routers/views.py | 2 +- .../project/security_groups/forms.py | 2 +- .../project/security_groups/panel.py | 2 +- .../project/security_groups/tables.py | 12 ++-- .../project/security_groups/views.py | 2 +- .../dashboards/project/server_groups/panel.py | 2 +- .../dashboards/project/server_groups/urls.py | 2 +- .../dashboards/project/snapshots/forms.py | 2 +- .../dashboards/project/snapshots/panel.py | 2 +- .../dashboards/project/snapshots/tables.py | 8 +-- .../dashboards/project/snapshots/tabs.py | 2 +- .../dashboards/project/snapshots/views.py | 2 +- .../dashboards/project/trunks/panel.py | 2 +- .../dashboards/project/trunks/urls.py | 2 +- .../dashboards/project/vg_snapshots/forms.py | 2 +- .../dashboards/project/vg_snapshots/panel.py | 2 +- .../dashboards/project/vg_snapshots/tables.py | 8 +-- .../dashboards/project/vg_snapshots/tabs.py | 2 +- .../dashboards/project/vg_snapshots/views.py | 2 +- .../dashboards/project/volume_groups/forms.py | 2 +- .../dashboards/project/volume_groups/panel.py | 2 +- .../project/volume_groups/tables.py | 2 +- .../dashboards/project/volume_groups/tabs.py | 2 +- .../dashboards/project/volume_groups/views.py | 2 +- .../project/volume_groups/workflows.py | 2 +- .../dashboards/project/volumes/forms.py | 2 +- .../dashboards/project/volumes/panel.py | 2 +- .../dashboards/project/volumes/tables.py | 8 +-- .../dashboards/project/volumes/tabs.py | 2 +- .../dashboards/project/volumes/views.py | 2 +- .../dashboards/settings/dashboard.py | 2 +- .../dashboards/settings/password/forms.py | 2 +- .../dashboards/settings/password/panel.py | 2 +- .../dashboards/settings/password/views.py | 2 +- .../dashboards/settings/user/forms.py | 2 +- .../dashboards/settings/user/panel.py | 2 +- .../dashboards/settings/user/views.py | 2 +- openstack_dashboard/defaults.py | 2 +- .../enabled/_1010_compute_panel_group.py | 2 +- .../enabled/_1310_volumes_panel_group.py | 2 +- .../enabled/_1410_network_panel_group.py | 2 +- .../enabled/_1910_object_store_panel_group.py | 2 +- .../_2110_admin_compute_panel_group.py | 2 +- .../enabled/_2210_admin_volume_panel_group.py | 2 +- .../_2300_admin_network_panel_group.py | 2 +- .../enabled/_2810_admin_system_panel_group.py | 2 +- .../enabled/_3060_federation_panel_group.py | 2 +- .../local/local_settings.py.example | 2 +- .../management/commands/upgrade_check.py | 2 +- openstack_dashboard/settings.py | 2 +- .../test/test_panels/another_panel/views.py | 2 +- .../test/unit/usage/test_quotas.py | 2 +- openstack_dashboard/usage/base.py | 2 +- openstack_dashboard/usage/quotas.py | 2 +- openstack_dashboard/usage/tables.py | 2 +- openstack_dashboard/usage/views.py | 2 +- 346 files changed, 529 insertions(+), 529 deletions(-) diff --git a/doc/source/admin/customize-configure.rst b/doc/source/admin/customize-configure.rst index d71252529e..c9055823dd 100644 --- a/doc/source/admin/customize-configure.rst +++ b/doc/source/admin/customize-configure.rst @@ -176,7 +176,7 @@ The standard installation uses a non-encrypted HTTP channel. import os - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ DEBUG = False TEMPLATE_DEBUG = DEBUG diff --git a/doc/source/configuration/customizing.rst b/doc/source/configuration/customizing.rst index 546a013e0b..428296f90d 100644 --- a/doc/source/configuration/customizing.rst +++ b/doc/source/configuration/customizing.rst @@ -112,7 +112,7 @@ module in dotted python path notation. Example:: You can do essentially anything you like in the customization module. For example, you could change the name of a panel:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ import horizon @@ -208,7 +208,7 @@ Horizon is able to show these extra information as a custom column. For example, if a user in Keystone has an attribute ``phone_num``, you could define new column:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ from horizon import forms from horizon import tables diff --git a/doc/source/contributor/topics/translation.rst b/doc/source/contributor/topics/translation.rst index 52feeeb2db..e80f24eb74 100644 --- a/doc/source/contributor/topics/translation.rst +++ b/doc/source/contributor/topics/translation.rst @@ -119,9 +119,9 @@ scenarios, such as interpolation, contextual markers and translation comments. .. code-block:: python + from django.utils.translation import gettext as _ + from django.utils.translation import ngettext from django.utils.translation import pgettext - from django.utils.translation import ugettext as _ - from django.utils.translation import ungettext class IndexView(request): @@ -129,7 +129,7 @@ scenarios, such as interpolation, contextual markers and translation comments. _("Images") # Plural example - ungettext( + ngettext( "there is %(count)d object", "there are %(count)d objects", count) % { "count": count } @@ -142,11 +142,11 @@ scenarios, such as interpolation, contextual markers and translation comments. pgettext("the month name", "May") # Translators: This message appears as a comment for translators! - ugettext("Welcome translators.") + gettext("Welcome translators.") .. note:: - In the example above, we imported ``ugettext`` as ``_``. This is a common + In the example above, we imported ``gettext`` as ``_``. This is a common alias for gettext or any of its variants. In Django templates diff --git a/doc/source/contributor/tutorials/dashboard.rst b/doc/source/contributor/tutorials/dashboard.rst index f61e95c3da..8231add4ca 100644 --- a/doc/source/contributor/tutorials/dashboard.rst +++ b/doc/source/contributor/tutorials/dashboard.rst @@ -93,7 +93,7 @@ Defining a dashboard Open the ``dashboard.py`` file. You will notice the following code has been automatically generated:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ import horizon @@ -154,7 +154,7 @@ thoroughly vetted in Django's admin codebase). Open the ``panel.py`` file, you will have the following auto-generated code:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ import horizon @@ -199,7 +199,7 @@ the default panel:: The completed ``dashboard.py`` file should look like the following:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ import horizon @@ -236,7 +236,7 @@ displaying data to an end-user. We're just going to skim the surface here, but it has a tremendous number of capabilities. Create a ``tables.py`` file under the ``mypanel`` directory and add the following code:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ from horizon import tables @@ -311,7 +311,7 @@ Then, we add that action to the table actions for our table.:: The completed ``tables.py`` file should look like the following:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ from horizon import tables @@ -347,7 +347,7 @@ Create a ``tabs.py`` file under the ``mypanel`` directory. Let's make a tab group which has one tab. The completed code should look like the following:: - 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/doc/source/contributor/tutorials/plugin.rst b/doc/source/contributor/tutorials/plugin.rst index bde1521363..9fcd62822e 100644 --- a/doc/source/contributor/tutorials/plugin.rst +++ b/doc/source/contributor/tutorials/plugin.rst @@ -190,7 +190,7 @@ necessity even for Angular plugins. The slug is the panel's unique identifier and is often use as part of the URL. Make sure that it matches what you have in your enabled file.:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ import horizon diff --git a/doc/source/contributor/tutorials/table_actions.rst b/doc/source/contributor/tutorials/table_actions.rst index 26b88e050d..721bdb3495 100644 --- a/doc/source/contributor/tutorials/table_actions.rst +++ b/doc/source/contributor/tutorials/table_actions.rst @@ -69,7 +69,7 @@ Create the ``forms.py`` file under the ``mypanel`` directory and add the following:: 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 @@ -107,7 +107,7 @@ file should now look something like this:: 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 tabs from horizon import exceptions @@ -232,7 +232,7 @@ We must also add our new action as a row action for the table:: The complete ``tables.py`` file should look like this:: - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ from horizon import tables diff --git a/horizon/base.py b/horizon/base.py index 829ee6ad7b..8f574834b3 100644 --- a/horizon/base.py +++ b/horizon/base.py @@ -37,7 +37,7 @@ from django.urls import reverse from django.utils.functional import empty from django.utils.functional import SimpleLazyObject from django.utils.module_loading import module_has_submodule -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import conf from horizon.decorators import _current_component diff --git a/horizon/browsers/base.py b/horizon/browsers/base.py index d8bd0fb8d8..aecce45722 100644 --- a/horizon/browsers/base.py +++ b/horizon/browsers/base.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.browsers.breadcrumb import Breadcrumb from horizon.tables import DataTable diff --git a/horizon/browsers/views.py b/horizon/browsers/views.py index 8439d1afe6..bc173ac080 100644 --- a/horizon/browsers/views.py +++ b/horizon/browsers/views.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic import horizon diff --git a/horizon/conf/default.py b/horizon/conf/default.py index e3ffcc9a84..32448aba51 100644 --- a/horizon/conf/default.py +++ b/horizon/conf/default.py @@ -11,7 +11,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ # Default configuration dictionary. Do not mutate. HORIZON_CONFIG = { diff --git a/horizon/decorators.py b/horizon/decorators.py index 38cca3f21e..acee0cfb1f 100644 --- a/horizon/decorators.py +++ b/horizon/decorators.py @@ -21,7 +21,7 @@ General-purpose decorators for use with Horizon. """ import functools -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ def _current_component(view_func, dashboard=None, panel=None): diff --git a/horizon/defaults.py b/horizon/defaults.py index eefc438791..0e4c9176bc 100644 --- a/horizon/defaults.py +++ b/horizon/defaults.py @@ -11,7 +11,7 @@ # 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 openstack_auth.defaults import * # noqa: F401,F403,H303 diff --git a/horizon/exceptions.py b/horizon/exceptions.py index f6a88b22a9..de9b278e37 100644 --- a/horizon/exceptions.py +++ b/horizon/exceptions.py @@ -23,7 +23,7 @@ import sys from debtcollector import removals from django.core.management import color_style from django.utils import encoding -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.debug import SafeExceptionReporterFilter from horizon.conf import HORIZON_CONFIG diff --git a/horizon/forms/fields.py b/horizon/forms/fields.py index 68763f16d1..05ccbf376e 100644 --- a/horizon/forms/fields.py +++ b/horizon/forms/fields.py @@ -31,7 +31,7 @@ from django.utils.encoding import force_str from django.utils.functional import Promise from django.utils import html from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ ip_allowed_symbols_re = re.compile(r'^[a-fA-F0-9:/\.]+$') IPv4 = 1 diff --git a/horizon/forms/views.py b/horizon/forms/views.py index e681ed4f23..8169405d6f 100644 --- a/horizon/forms/views.py +++ b/horizon/forms/views.py @@ -17,7 +17,7 @@ import os from django.conf import settings from django import http -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import views diff --git a/horizon/notifications.py b/horizon/notifications.py index b8db56b5d4..f89579f918 100644 --- a/horizon/notifications.py +++ b/horizon/notifications.py @@ -18,7 +18,7 @@ import logging import os from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import messages diff --git a/horizon/tables/actions.py b/horizon/tables/actions.py index ad8945a4f5..dbbc3092a0 100644 --- a/horizon/tables/actions.py +++ b/horizon/tables/actions.py @@ -25,7 +25,7 @@ from django.template.loader import render_to_string from django import urls from django.utils.functional import Promise from django.utils.http import urlencode -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import messages diff --git a/horizon/tables/base.py b/horizon/tables/base.py index 9bb0c866e4..f833d4e922 100644 --- a/horizon/tables/base.py +++ b/horizon/tables/base.py @@ -36,7 +36,7 @@ from django.utils import http from django.utils.http import urlencode from django.utils.safestring import mark_safe from django.utils import termcolors -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import conf from horizon import exceptions diff --git a/horizon/templatetags/horizon.py b/horizon/templatetags/horizon.py index 48c95dd63e..4895e4f587 100644 --- a/horizon/templatetags/horizon.py +++ b/horizon/templatetags/horizon.py @@ -19,7 +19,7 @@ from django import template from django.template import Node from django.utils.encoding import force_str from django.utils import translation -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.base import Horizon from horizon import conf diff --git a/horizon/templatetags/sizeformat.py b/horizon/templatetags/sizeformat.py index 65613de443..4de19c1b67 100644 --- a/horizon/templatetags/sizeformat.py +++ b/horizon/templatetags/sizeformat.py @@ -24,8 +24,8 @@ from oslo_utils import units from django import template from django.utils import formats -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 register = template.Library() @@ -48,15 +48,15 @@ def filesizeformat(bytes, filesize_number_format): try: bytes = float(bytes) except (TypeError, ValueError, UnicodeDecodeError): - return ungettext_lazy("%(size)d B", - "%(size)d B", 0) % {'size': 0} + return ngettext_lazy("%(size)d B", + "%(size)d B", 0) % {'size': 0} if bytes == float('inf'): return _('Infinity') if bytes < units.Ki: bytes = int(bytes) - return ungettext_lazy("%(size)d B", - "%(size)d B", bytes) % {'size': bytes} + return ngettext_lazy("%(size)d B", + "%(size)d B", bytes) % {'size': bytes} if bytes < units.Mi: return _("%s KB") % filesize_number_format(bytes / units.Ki) if bytes < units.Gi: diff --git a/horizon/test/test_dashboards/dogs/puppies/tables.py b/horizon/test/test_dashboards/dogs/puppies/tables.py index 731a39cc53..22f470d88c 100644 --- a/horizon/test/test_dashboards/dogs/puppies/tables.py +++ b/horizon/test/test_dashboards/dogs/puppies/tables.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from django.utils.translation import ungettext_lazy +from django.utils.translation import ngettext_lazy from horizon import tables @@ -27,7 +27,7 @@ class SellPuppy(tables.DeleteAction): @staticmethod def action_present(count): # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Sell Puppy", "Sell Puppies", count @@ -36,7 +36,7 @@ class SellPuppy(tables.DeleteAction): @staticmethod def action_past(count): # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Sold Puppy", "Sold Puppies", count diff --git a/horizon/test/unit/tables/test_tables.py b/horizon/test/unit/tables/test_tables.py index 422767e999..d6b4581c22 100644 --- a/horizon/test/unit/tables/test_tables.py +++ b/horizon/test/unit/tables/test_tables.py @@ -25,7 +25,7 @@ from django import shortcuts from django.template import defaultfilters from django.test.utils import override_settings from django.urls import reverse -from django.utils.translation import ungettext_lazy +from django.utils.translation import ngettext_lazy from horizon import exceptions from horizon import tables @@ -157,7 +157,7 @@ class MyBatchAction(tables.BatchAction): @staticmethod def action_present(count): # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Batch Item", "Batch Items", count @@ -166,7 +166,7 @@ class MyBatchAction(tables.BatchAction): @staticmethod def action_past(count): # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Batched Item", "Batched Items", count @@ -194,14 +194,14 @@ class MyToggleAction(tables.BatchAction): def action_present(self, count): if self.current_present_action: # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Up Item", "Up Items", count ) else: # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Down Item", "Down Items", count @@ -210,14 +210,14 @@ class MyToggleAction(tables.BatchAction): def action_past(self, count): if self.current_past_action: # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Upped Item", "Upped Items", count ) else: # Translators: test code, don't really have to translate - return ungettext_lazy( + return ngettext_lazy( "Downed Item", "Downed Items", count diff --git a/horizon/test/unit/test_views.py b/horizon/test/unit/test_views.py index aea105b8b8..f47b572417 100644 --- a/horizon/test/unit/test_views.py +++ b/horizon/test/unit/test_views.py @@ -14,7 +14,7 @@ from django import forms from django.test import client -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from horizon.test import helpers as test diff --git a/horizon/utils/filters.py b/horizon/utils/filters.py index 3fcb29c19a..30bb5c6f73 100644 --- a/horizon/utils/filters.py +++ b/horizon/utils/filters.py @@ -20,7 +20,7 @@ from django.template.defaultfilters import register from django.template.defaultfilters import timesince from django.utils.safestring import mark_safe from django.utils import timezone -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ @register.filter diff --git a/horizon/utils/validators.py b/horizon/utils/validators.py index 70f7de7aa6..98c90a2de6 100644 --- a/horizon/utils/validators.py +++ b/horizon/utils/validators.py @@ -18,7 +18,7 @@ from oslo_utils import netutils from django.core.exceptions import ValidationError from django.core import validators -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import conf diff --git a/horizon/workflows/base.py b/horizon/workflows/base.py index 66bdb2df58..4a553ead19 100644 --- a/horizon/workflows/base.py +++ b/horizon/workflows/base.py @@ -28,7 +28,7 @@ from django.template.defaultfilters import slugify from django import urls from django.utils.encoding import force_str from django.utils import module_loading -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_auth import policy from horizon import base diff --git a/openstack_auth/backend.py b/openstack_auth/backend.py index e8e9fed7b6..29b3b55a5f 100644 --- a/openstack_auth/backend.py +++ b/openstack_auth/backend.py @@ -20,7 +20,7 @@ import pytz from django.conf import settings from django.utils.module_loading import import_string -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_auth import exceptions from openstack_auth import user as auth_user diff --git a/openstack_auth/forms.py b/openstack_auth/forms.py index 74feb331ee..150153c6c5 100644 --- a/openstack_auth/forms.py +++ b/openstack_auth/forms.py @@ -18,7 +18,7 @@ from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth import forms as django_auth_forms from django import forms -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 keystoneauth1 import plugin as auth_plugin diff --git a/openstack_auth/plugin/base.py b/openstack_auth/plugin/base.py index eee618cc75..28f90377d6 100644 --- a/openstack_auth/plugin/base.py +++ b/openstack_auth/plugin/base.py @@ -14,7 +14,7 @@ import abc import logging import re -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from keystoneauth1 import exceptions as keystone_exceptions from keystoneclient.v3 import client as v3_client diff --git a/openstack_auth/plugin/k2k.py b/openstack_auth/plugin/k2k.py index 36a291dc61..837b71b52e 100644 --- a/openstack_auth/plugin/k2k.py +++ b/openstack_auth/plugin/k2k.py @@ -14,7 +14,7 @@ import logging from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from keystoneauth1.identity import v3 as v3_auth from openstack_auth import exceptions diff --git a/openstack_auth/views.py b/openstack_auth/views.py index 9868175616..4e6cbf5702 100644 --- a/openstack_auth/views.py +++ b/openstack_auth/views.py @@ -24,7 +24,7 @@ from django.middleware import csrf from django import shortcuts from django.urls import reverse from django.utils import http -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_protect diff --git a/openstack_dashboard/api/cinder.py b/openstack_dashboard/api/cinder.py index 8cb349cd34..03ac5aee34 100644 --- a/openstack_dashboard/api/cinder.py +++ b/openstack_dashboard/api/cinder.py @@ -22,8 +22,8 @@ import logging import math from django.conf import settings +from django.utils.translation import gettext_lazy as _ from django.utils.translation import pgettext_lazy -from django.utils.translation import ugettext_lazy as _ from cinderclient import api_versions from cinderclient import client as cinder_client diff --git a/openstack_dashboard/api/glance.py b/openstack_dashboard/api/glance.py index 0b5de5718f..fb1c7c7bb2 100644 --- a/openstack_dashboard/api/glance.py +++ b/openstack_dashboard/api/glance.py @@ -28,7 +28,7 @@ from django.conf import settings from django.core.files.uploadedfile import InMemoryUploadedFile from django.core.files.uploadedfile import SimpleUploadedFile from django.core.files.uploadedfile import TemporaryUploadedFile -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from glanceclient.v2 import client diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index 38931e52da..9eb7f18431 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -22,7 +22,7 @@ import logging from urllib import parse from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from keystoneauth1 import session from keystoneauth1 import token_endpoint diff --git a/openstack_dashboard/api/neutron.py b/openstack_dashboard/api/neutron.py index 0f06a1b22b..6fc06e3009 100644 --- a/openstack_dashboard/api/neutron.py +++ b/openstack_dashboard/api/neutron.py @@ -26,7 +26,7 @@ import logging import netaddr from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from neutronclient.common import exceptions as neutron_exc from neutronclient.v2_0 import client as neutron_client from novaclient import exceptions as nova_exc diff --git a/openstack_dashboard/api/nova.py b/openstack_dashboard/api/nova.py index 394d893e31..981b1148d1 100644 --- a/openstack_dashboard/api/nova.py +++ b/openstack_dashboard/api/nova.py @@ -22,7 +22,7 @@ import collections import logging from operator import attrgetter -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from novaclient import api_versions from novaclient import exceptions as nova_exceptions diff --git a/openstack_dashboard/api/rest/cinder.py b/openstack_dashboard/api/rest/cinder.py index 4c9731c50d..b3e36457f1 100644 --- a/openstack_dashboard/api/rest/cinder.py +++ b/openstack_dashboard/api/rest/cinder.py @@ -13,7 +13,7 @@ # limitations under the License. """API over the cinder service.""" -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from openstack_dashboard import api diff --git a/openstack_dashboard/api/rest/json_encoder.py b/openstack_dashboard/api/rest/json_encoder.py index 574a744985..b90fd04a82 100644 --- a/openstack_dashboard/api/rest/json_encoder.py +++ b/openstack_dashboard/api/rest/json_encoder.py @@ -14,7 +14,7 @@ import json import json.encoder as encoder -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class NaNJSONEncoder(json.JSONEncoder): diff --git a/openstack_dashboard/api/rest/neutron.py b/openstack_dashboard/api/rest/neutron.py index ae1e7944d1..68018fc77e 100644 --- a/openstack_dashboard/api/rest/neutron.py +++ b/openstack_dashboard/api/rest/neutron.py @@ -14,7 +14,7 @@ # limitations under the License. """API over the neutron service.""" -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from openstack_dashboard import api diff --git a/openstack_dashboard/api/rest/nova.py b/openstack_dashboard/api/rest/nova.py index 7be6683b60..db02e58156 100644 --- a/openstack_dashboard/api/rest/nova.py +++ b/openstack_dashboard/api/rest/nova.py @@ -15,7 +15,7 @@ from collections import OrderedDict from django.utils import http as utils_http -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from novaclient import exceptions diff --git a/openstack_dashboard/api/swift.py b/openstack_dashboard/api/swift.py index f4055e4ea9..ff67d5592c 100644 --- a/openstack_dashboard/api/swift.py +++ b/openstack_dashboard/api/swift.py @@ -24,7 +24,7 @@ import functools import swiftclient from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions diff --git a/openstack_dashboard/contrib/developer/dashboard.py b/openstack_dashboard/contrib/developer/dashboard.py index 7502e83c2b..4370cf4672 100644 --- a/openstack_dashboard/contrib/developer/dashboard.py +++ b/openstack_dashboard/contrib/developer/dashboard.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/contrib/developer/form_builder/panel.py b/openstack_dashboard/contrib/developer/form_builder/panel.py index 9b47939ca0..32c243a78d 100644 --- a/openstack_dashboard/contrib/developer/form_builder/panel.py +++ b/openstack_dashboard/contrib/developer/form_builder/panel.py @@ -12,7 +12,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 diff --git a/openstack_dashboard/contrib/developer/profiler/middleware.py b/openstack_dashboard/contrib/developer/profiler/middleware.py index 6751dc9eb8..4671fb5fb8 100644 --- a/openstack_dashboard/contrib/developer/profiler/middleware.py +++ b/openstack_dashboard/contrib/developer/profiler/middleware.py @@ -17,7 +17,7 @@ from django.conf import settings from django.core import exceptions from django.urls import reverse from django.utils import safestring -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from osprofiler import _utils as profiler_utils from osprofiler import profiler from osprofiler import web diff --git a/openstack_dashboard/contrib/developer/profiler/panel.py b/openstack_dashboard/contrib/developer/profiler/panel.py index 5ea5ada657..296c42256e 100644 --- a/openstack_dashboard/contrib/developer/profiler/panel.py +++ b/openstack_dashboard/contrib/developer/profiler/panel.py @@ -13,7 +13,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 horizon.utils import settings as horizon_settings diff --git a/openstack_dashboard/contrib/developer/profiler/views.py b/openstack_dashboard/contrib/developer/profiler/views.py index 762f0ed3de..68eeea36aa 100644 --- a/openstack_dashboard/contrib/developer/profiler/views.py +++ b/openstack_dashboard/contrib/developer/profiler/views.py @@ -13,7 +13,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 django.views import generic from horizon import views diff --git a/openstack_dashboard/contrib/developer/resource_browser/panel.py b/openstack_dashboard/contrib/developer/resource_browser/panel.py index c1977595d8..7d8cfe7f00 100644 --- a/openstack_dashboard/contrib/developer/resource_browser/panel.py +++ b/openstack_dashboard/contrib/developer/resource_browser/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/openstack_dashboard/contrib/developer/theme_preview/panel.py b/openstack_dashboard/contrib/developer/theme_preview/panel.py index ebe06fc1d1..281c6ca1cc 100644 --- a/openstack_dashboard/contrib/developer/theme_preview/panel.py +++ b/openstack_dashboard/contrib/developer/theme_preview/panel.py @@ -13,7 +13,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 diff --git a/openstack_dashboard/contrib/developer/theme_preview/views.py b/openstack_dashboard/contrib/developer/theme_preview/views.py index d9dac64628..c7f422fc76 100644 --- a/openstack_dashboard/contrib/developer/theme_preview/views.py +++ b/openstack_dashboard/contrib/developer/theme_preview/views.py @@ -12,7 +12,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 views diff --git a/openstack_dashboard/dashboards/admin/aggregates/forms.py b/openstack_dashboard/dashboards/admin/aggregates/forms.py index f857f85c14..7ca18a9276 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/forms.py +++ b/openstack_dashboard/dashboards/admin/aggregates/forms.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 _ from horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/aggregates/panel.py b/openstack_dashboard/dashboards/admin/aggregates/panel.py index 90c0d31dc5..4d553ea875 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/panel.py +++ b/openstack_dashboard/dashboards/admin/aggregates/panel.py @@ -12,7 +12,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/admin/aggregates/tables.py b/openstack_dashboard/dashboards/admin/aggregates/tables.py index fd27d0d3ea..df4defac7b 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/tables.py +++ b/openstack_dashboard/dashboards/admin/aggregates/tables.py @@ -11,8 +11,8 @@ # under the License. from django.template import defaultfilters as filters -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 @@ -25,7 +25,7 @@ class DeleteAggregateAction(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Host Aggregate", "Delete Host Aggregates", count @@ -33,7 +33,7 @@ class DeleteAggregateAction(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Host Aggregate", "Deleted Host Aggregates", count diff --git a/openstack_dashboard/dashboards/admin/aggregates/views.py b/openstack_dashboard/dashboards/admin/aggregates/views.py index edd841b9a6..ecb93c42dc 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/views.py +++ b/openstack_dashboard/dashboards/admin/aggregates/views.py @@ -11,7 +11,7 @@ # 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 diff --git a/openstack_dashboard/dashboards/admin/aggregates/workflows.py b/openstack_dashboard/dashboards/admin/aggregates/workflows.py index df81341f90..704fbc4ebb 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/workflows.py +++ b/openstack_dashboard/dashboards/admin/aggregates/workflows.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 _ from horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/backups/forms.py b/openstack_dashboard/dashboards/admin/backups/forms.py index da15cb7b96..c178b56cc2 100644 --- a/openstack_dashboard/dashboards/admin/backups/forms.py +++ b/openstack_dashboard/dashboards/admin/backups/forms.py @@ -11,7 +11,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/openstack_dashboard/dashboards/admin/backups/tables.py b/openstack_dashboard/dashboards/admin/backups/tables.py index c6da81b009..a61f4b0e99 100644 --- a/openstack_dashboard/dashboards/admin/backups/tables.py +++ b/openstack_dashboard/dashboards/admin/backups/tables.py @@ -10,8 +10,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 exceptions from horizon import tables @@ -41,7 +41,7 @@ class ForceDeleteBackup(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Force Delete Volume Backup", "Force Delete Volume Backups", count @@ -49,7 +49,7 @@ class ForceDeleteBackup(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled forced deletion of Volume Backup", "Scheduled forced deletion of Volume Backups", count diff --git a/openstack_dashboard/dashboards/admin/backups/views.py b/openstack_dashboard/dashboards/admin/backups/views.py index 139b02b0a3..4f0a1ddfcc 100644 --- a/openstack_dashboard/dashboards/admin/backups/views.py +++ b/openstack_dashboard/dashboards/admin/backups/views.py @@ -14,7 +14,7 @@ import logging 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 diff --git a/openstack_dashboard/dashboards/admin/dashboard.py b/openstack_dashboard/dashboards/admin/dashboard.py index 43c80ed52b..6b2246e54a 100644 --- a/openstack_dashboard/dashboards/admin/dashboard.py +++ b/openstack_dashboard/dashboards/admin/dashboard.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 openstack_auth import utils import horizon diff --git a/openstack_dashboard/dashboards/admin/defaults/panel.py b/openstack_dashboard/dashboards/admin/defaults/panel.py index 4a9e36d359..9dfee0267d 100644 --- a/openstack_dashboard/dashboards/admin/defaults/panel.py +++ b/openstack_dashboard/dashboards/admin/defaults/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/openstack_dashboard/dashboards/admin/defaults/tables.py b/openstack_dashboard/dashboards/admin/defaults/tables.py index 7746ff1190..fafcb881e6 100644 --- a/openstack_dashboard/dashboards/admin/defaults/tables.py +++ b/openstack_dashboard/dashboards/admin/defaults/tables.py @@ -14,7 +14,7 @@ from django.urls import reverse from django.utils.http import urlencode -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tables diff --git a/openstack_dashboard/dashboards/admin/defaults/tabs.py b/openstack_dashboard/dashboards/admin/defaults/tabs.py index dabb91424a..5d51182688 100644 --- a/openstack_dashboard/dashboards/admin/defaults/tabs.py +++ b/openstack_dashboard/dashboards/admin/defaults/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/openstack_dashboard/dashboards/admin/defaults/views.py b/openstack_dashboard/dashboards/admin/defaults/views.py index 6040c88ae4..9dc4645325 100644 --- a/openstack_dashboard/dashboards/admin/defaults/views.py +++ b/openstack_dashboard/dashboards/admin/defaults/views.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 tabs from horizon import workflows diff --git a/openstack_dashboard/dashboards/admin/defaults/workflows.py b/openstack_dashboard/dashboards/admin/defaults/workflows.py index 19d2de600a..d89e3ffe5d 100644 --- a/openstack_dashboard/dashboards/admin/defaults/workflows.py +++ b/openstack_dashboard/dashboards/admin/defaults/workflows.py @@ -14,7 +14,7 @@ import logging -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/openstack_dashboard/dashboards/admin/flavors/panel.py b/openstack_dashboard/dashboards/admin/flavors/panel.py index af86bc07e9..772e73aed9 100644 --- a/openstack_dashboard/dashboards/admin/flavors/panel.py +++ b/openstack_dashboard/dashboards/admin/flavors/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/admin/flavors/tables.py b/openstack_dashboard/dashboards/admin/flavors/tables.py index 731249b0ea..3ad4e76024 100644 --- a/openstack_dashboard/dashboards/admin/flavors/tables.py +++ b/openstack_dashboard/dashboards/admin/flavors/tables.py @@ -19,8 +19,8 @@ from django.template import defaultfilters as filters from django.urls import reverse from django.utils.http import urlencode -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.templatetags import sizeformat @@ -33,7 +33,7 @@ class DeleteFlavor(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Flavor", "Delete Flavors", count @@ -41,7 +41,7 @@ class DeleteFlavor(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Flavor", "Deleted Flavors", count diff --git a/openstack_dashboard/dashboards/admin/flavors/urls.py b/openstack_dashboard/dashboards/admin/flavors/urls.py index 882b8d7188..d9f2625a82 100644 --- a/openstack_dashboard/dashboards/admin/flavors/urls.py +++ b/openstack_dashboard/dashboards/admin/flavors/urls.py @@ -17,7 +17,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView from openstack_dashboard.dashboards.admin.flavors import views diff --git a/openstack_dashboard/dashboards/admin/flavors/views.py b/openstack_dashboard/dashboards/admin/flavors/views.py index 731e77a83b..ee6a237fc2 100644 --- a/openstack_dashboard/dashboards/admin/flavors/views.py +++ b/openstack_dashboard/dashboards/admin/flavors/views.py @@ -17,7 +17,7 @@ # 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 tables diff --git a/openstack_dashboard/dashboards/admin/flavors/workflows.py b/openstack_dashboard/dashboards/admin/flavors/workflows.py index 5bec755031..074924eb85 100644 --- a/openstack_dashboard/dashboards/admin/flavors/workflows.py +++ b/openstack_dashboard/dashboards/admin/flavors/workflows.py @@ -17,7 +17,7 @@ # 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/openstack_dashboard/dashboards/admin/floating_ips/forms.py b/openstack_dashboard/dashboards/admin/floating_ips/forms.py index cdb6daea6e..cf5844f339 100644 --- a/openstack_dashboard/dashboards/admin/floating_ips/forms.py +++ b/openstack_dashboard/dashboards/admin/floating_ips/forms.py @@ -14,7 +14,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/openstack_dashboard/dashboards/admin/floating_ips/panel.py b/openstack_dashboard/dashboards/admin/floating_ips/panel.py index 6cd6ecd580..9d117b0773 100644 --- a/openstack_dashboard/dashboards/admin/floating_ips/panel.py +++ b/openstack_dashboard/dashboards/admin/floating_ips/panel.py @@ -13,7 +13,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/openstack_dashboard/dashboards/admin/floating_ips/tables.py b/openstack_dashboard/dashboards/admin/floating_ips/tables.py index 15e90a62fd..70e1468ea6 100644 --- a/openstack_dashboard/dashboards/admin/floating_ips/tables.py +++ b/openstack_dashboard/dashboards/admin/floating_ips/tables.py @@ -16,7 +16,7 @@ import logging from django import shortcuts -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import messages diff --git a/openstack_dashboard/dashboards/admin/floating_ips/views.py b/openstack_dashboard/dashboards/admin/floating_ips/views.py index c6e291acde..7855e9f13b 100644 --- a/openstack_dashboard/dashboards/admin/floating_ips/views.py +++ b/openstack_dashboard/dashboards/admin/floating_ips/views.py @@ -17,7 +17,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 _ import netaddr from horizon import exceptions diff --git a/openstack_dashboard/dashboards/admin/group_types/forms.py b/openstack_dashboard/dashboards/admin/group_types/forms.py index 6d57604181..82c243e845 100644 --- a/openstack_dashboard/dashboards/admin/group_types/forms.py +++ b/openstack_dashboard/dashboards/admin/group_types/forms.py @@ -12,7 +12,7 @@ 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 diff --git a/openstack_dashboard/dashboards/admin/group_types/panel.py b/openstack_dashboard/dashboards/admin/group_types/panel.py index 392fd25f18..cdbdbab00c 100644 --- a/openstack_dashboard/dashboards/admin/group_types/panel.py +++ b/openstack_dashboard/dashboards/admin/group_types/panel.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 _ import horizon diff --git a/openstack_dashboard/dashboards/admin/group_types/specs/forms.py b/openstack_dashboard/dashboards/admin/group_types/specs/forms.py index 66e7c6d213..634a830744 100644 --- a/openstack_dashboard/dashboards/admin/group_types/specs/forms.py +++ b/openstack_dashboard/dashboards/admin/group_types/specs/forms.py @@ -13,7 +13,7 @@ import re 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/openstack_dashboard/dashboards/admin/group_types/specs/tables.py b/openstack_dashboard/dashboards/admin/group_types/specs/tables.py index 6daf4abfd4..16e590934b 100644 --- a/openstack_dashboard/dashboards/admin/group_types/specs/tables.py +++ b/openstack_dashboard/dashboards/admin/group_types/specs/tables.py @@ -13,8 +13,8 @@ from urllib import parse from django.urls import reverse -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 @@ -25,7 +25,7 @@ class GroupTypeSpecDelete(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Spec", "Delete Specs", count @@ -33,7 +33,7 @@ class GroupTypeSpecDelete(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Spec", "Delete Specs", count diff --git a/openstack_dashboard/dashboards/admin/group_types/specs/views.py b/openstack_dashboard/dashboards/admin/group_types/specs/views.py index ce207f35ce..34d596bdf9 100644 --- a/openstack_dashboard/dashboards/admin/group_types/specs/views.py +++ b/openstack_dashboard/dashboards/admin/group_types/specs/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/group_types/tables.py b/openstack_dashboard/dashboards/admin/group_types/tables.py index ee492fa209..680d259dc7 100644 --- a/openstack_dashboard/dashboards/admin/group_types/tables.py +++ b/openstack_dashboard/dashboards/admin/group_types/tables.py @@ -13,8 +13,8 @@ from django.template import defaultfilters as filters from django.urls import reverse -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 exceptions from horizon import forms @@ -62,7 +62,7 @@ class GroupTypesFilterAction(tables.FilterAction): class DeleteGroupType(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Group Type", "Delete Group Types", count @@ -70,7 +70,7 @@ class DeleteGroupType(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Group Type", "Deleted Group Types", count diff --git a/openstack_dashboard/dashboards/admin/group_types/views.py b/openstack_dashboard/dashboards/admin/group_types/views.py index 9fb6f8ee1d..8005c6e534 100644 --- a/openstack_dashboard/dashboards/admin/group_types/views.py +++ b/openstack_dashboard/dashboards/admin/group_types/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/hypervisors/compute/forms.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/forms.py index c3f3e2383c..50ddcbfbc1 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/forms.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/forms.py @@ -11,7 +11,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/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py index 8564f16d4d..5a7673ce71 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py @@ -11,9 +11,9 @@ # under the License. from django.template import defaultfilters as filters +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 as utils_filters @@ -54,7 +54,7 @@ class EnableService(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Enable Service", "Enable Services", count @@ -62,7 +62,7 @@ class EnableService(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Enabled Service", "Enabled Services", count diff --git a/openstack_dashboard/dashboards/admin/hypervisors/compute/tabs.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/tabs.py index fe980288a9..40666efc5a 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/tabs.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/tabs.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 _ from horizon import exceptions from horizon import tabs diff --git a/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py index 8520f885d3..cf10c4bf21 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/hypervisors/panel.py b/openstack_dashboard/dashboards/admin/hypervisors/panel.py index cbd2ba3585..5b29a5ec41 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/panel.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/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/openstack_dashboard/dashboards/admin/hypervisors/tables.py b/openstack_dashboard/dashboards/admin/hypervisors/tables.py index f2480bc983..0a36139be2 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/tables.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/tables.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 tables from horizon.templatetags import sizeformat diff --git a/openstack_dashboard/dashboards/admin/hypervisors/tabs.py b/openstack_dashboard/dashboards/admin/hypervisors/tabs.py index af2b400387..4b08c0a936 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/tabs.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/tabs.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 _ from horizon import exceptions from horizon import tabs diff --git a/openstack_dashboard/dashboards/admin/hypervisors/views.py b/openstack_dashboard/dashboards/admin/hypervisors/views.py index 7b6fc93917..643b076956 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/views.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/views.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 tables diff --git a/openstack_dashboard/dashboards/admin/images/panel.py b/openstack_dashboard/dashboards/admin/images/panel.py index f6dc1252cb..2f6505ba97 100644 --- a/openstack_dashboard/dashboards/admin/images/panel.py +++ b/openstack_dashboard/dashboards/admin/images/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/admin/images/tables.py b/openstack_dashboard/dashboards/admin/images/tables.py index 9086e703be..5b2e0243df 100644 --- a/openstack_dashboard/dashboards/admin/images/tables.py +++ b/openstack_dashboard/dashboards/admin/images/tables.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 tables diff --git a/openstack_dashboard/dashboards/admin/images/urls.py b/openstack_dashboard/dashboards/admin/images/urls.py index 368aec300c..cc50286189 100644 --- a/openstack_dashboard/dashboards/admin/images/urls.py +++ b/openstack_dashboard/dashboards/admin/images/urls.py @@ -17,7 +17,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView from openstack_dashboard.dashboards.admin.images import views diff --git a/openstack_dashboard/dashboards/admin/images/views.py b/openstack_dashboard/dashboards/admin/images/views.py index 35a55ed73b..3af0843927 100644 --- a/openstack_dashboard/dashboards/admin/images/views.py +++ b/openstack_dashboard/dashboards/admin/images/views.py @@ -23,7 +23,7 @@ from oslo_utils import units 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 messages diff --git a/openstack_dashboard/dashboards/admin/info/panel.py b/openstack_dashboard/dashboards/admin/info/panel.py index 85a9642449..d314a8fd4e 100644 --- a/openstack_dashboard/dashboards/admin/info/panel.py +++ b/openstack_dashboard/dashboards/admin/info/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/admin/info/tables.py b/openstack_dashboard/dashboards/admin/info/tables.py index adbd2a151b..4fc9fe3cbb 100644 --- a/openstack_dashboard/dashboards/admin/info/tables.py +++ b/openstack_dashboard/dashboards/admin/info/tables.py @@ -13,8 +13,8 @@ from django import template from django.template import defaultfilters as filters from django import urls +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 as utils_filters diff --git a/openstack_dashboard/dashboards/admin/info/tabs.py b/openstack_dashboard/dashboards/admin/info/tabs.py index 4d0ff1bd32..5c065876fa 100644 --- a/openstack_dashboard/dashboards/admin/info/tabs.py +++ b/openstack_dashboard/dashboards/admin/info/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/openstack_dashboard/dashboards/admin/info/views.py b/openstack_dashboard/dashboards/admin/info/views.py index 941e242fbf..138c41d3d4 100644 --- a/openstack_dashboard/dashboards/admin/info/views.py +++ b/openstack_dashboard/dashboards/admin/info/views.py @@ -16,7 +16,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/openstack_dashboard/dashboards/admin/instances/forms.py b/openstack_dashboard/dashboards/admin/instances/forms.py index f6adb876ab..3641288230 100644 --- a/openstack_dashboard/dashboards/admin/instances/forms.py +++ b/openstack_dashboard/dashboards/admin/instances/forms.py @@ -14,7 +14,7 @@ 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/openstack_dashboard/dashboards/admin/instances/panel.py b/openstack_dashboard/dashboards/admin/instances/panel.py index e116f2d02f..b0eb711694 100644 --- a/openstack_dashboard/dashboards/admin/instances/panel.py +++ b/openstack_dashboard/dashboards/admin/instances/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/admin/instances/tables.py b/openstack_dashboard/dashboards/admin/instances/tables.py index 33376b4fd8..0e8bac4074 100644 --- a/openstack_dashboard/dashboards/admin/instances/tables.py +++ b/openstack_dashboard/dashboards/admin/instances/tables.py @@ -15,8 +15,8 @@ from django.template.defaultfilters import title 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 keystoneclient import exceptions as keystone_exceptions from horizon import tables @@ -55,7 +55,7 @@ class MigrateInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Migrate Instance", "Migrate Instances", count @@ -63,7 +63,7 @@ class MigrateInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled migration (pending confirmation) of Instance", "Scheduled migration (pending confirmation) of Instances", count diff --git a/openstack_dashboard/dashboards/admin/instances/views.py b/openstack_dashboard/dashboards/admin/instances/views.py index 9dcd11068c..c35527fe46 100644 --- a/openstack_dashboard/dashboards/admin/instances/views.py +++ b/openstack_dashboard/dashboards/admin/instances/views.py @@ -19,7 +19,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 diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/forms.py b/openstack_dashboard/dashboards/admin/metadata_defs/forms.py index 4055337b85..12f39f5427 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/forms.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/forms.py @@ -20,7 +20,7 @@ import json 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 diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/panel.py b/openstack_dashboard/dashboards/admin/metadata_defs/panel.py index 097324ca17..3baa4b1e17 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/panel.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/panel.py @@ -13,7 +13,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/openstack_dashboard/dashboards/admin/metadata_defs/tables.py b/openstack_dashboard/dashboards/admin/metadata_defs/tables.py index 0625cac7a1..38dc98aea2 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/tables.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/tables.py @@ -13,8 +13,8 @@ # under the License. from django.template import defaultfilters as filters -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 tables @@ -43,7 +43,7 @@ class EditNamespace(tables.LinkAction): class DeleteNamespace(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Namespace", "Delete Namespaces", count @@ -51,7 +51,7 @@ class DeleteNamespace(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Namespace", "Deleted Namespaces", count diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py b/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py index d51e7c5ca0..f5ed26cd64 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/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/openstack_dashboard/dashboards/admin/metadata_defs/views.py b/openstack_dashboard/dashboards/admin/metadata_defs/views.py index 2d90bc7a71..acdb3bd589 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/views.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/views.py @@ -16,7 +16,7 @@ import json 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 diff --git a/openstack_dashboard/dashboards/admin/networks/agents/forms.py b/openstack_dashboard/dashboards/admin/networks/agents/forms.py index 1cdd8c298a..3d9d2b63b1 100644 --- a/openstack_dashboard/dashboards/admin/networks/agents/forms.py +++ b/openstack_dashboard/dashboards/admin/networks/agents/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/openstack_dashboard/dashboards/admin/networks/agents/tables.py b/openstack_dashboard/dashboards/admin/networks/agents/tables.py index 724f00aae3..9c5793452a 100644 --- a/openstack_dashboard/dashboards/admin/networks/agents/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/agents/tables.py @@ -16,8 +16,8 @@ import logging from django.template import defaultfilters as filters from django.urls import reverse -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 as utils_filters @@ -31,7 +31,7 @@ LOG = logging.getLogger(__name__) class DeleteDHCPAgent(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete DHCP Agent", "Delete DHCP Agents", count @@ -39,7 +39,7 @@ class DeleteDHCPAgent(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted DHCP Agent", "Deleted DHCP Agents", count diff --git a/openstack_dashboard/dashboards/admin/networks/agents/tabs.py b/openstack_dashboard/dashboards/admin/networks/agents/tabs.py index 961b219cf4..08b013f758 100644 --- a/openstack_dashboard/dashboards/admin/networks/agents/tabs.py +++ b/openstack_dashboard/dashboards/admin/networks/agents/tabs.py @@ -14,7 +14,7 @@ # 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/openstack_dashboard/dashboards/admin/networks/agents/views.py b/openstack_dashboard/dashboards/admin/networks/agents/views.py index 1f38db3ade..ea00e5578b 100644 --- a/openstack_dashboard/dashboards/admin/networks/agents/views.py +++ b/openstack_dashboard/dashboards/admin/networks/agents/views.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/openstack_dashboard/dashboards/admin/networks/forms.py b/openstack_dashboard/dashboards/admin/networks/forms.py index 1ea5941f08..bfe7f66914 100644 --- a/openstack_dashboard/dashboards/admin/networks/forms.py +++ b/openstack_dashboard/dashboards/admin/networks/forms.py @@ -15,7 +15,7 @@ import logging 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/openstack_dashboard/dashboards/admin/networks/panel.py b/openstack_dashboard/dashboards/admin/networks/panel.py index f49c5d6f4e..f1ce7638ee 100644 --- a/openstack_dashboard/dashboards/admin/networks/panel.py +++ b/openstack_dashboard/dashboards/admin/networks/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/openstack_dashboard/dashboards/admin/networks/ports/tables.py b/openstack_dashboard/dashboards/admin/networks/ports/tables.py index 1ddd1aa840..e638eeb74e 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/tables.py @@ -13,7 +13,7 @@ # 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 tables diff --git a/openstack_dashboard/dashboards/admin/networks/ports/views.py b/openstack_dashboard/dashboards/admin/networks/ports/views.py index 1f6635d382..267e8615ef 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/views.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/views.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 openstack_dashboard.dashboards.admin.networks.ports \ import tables as ports_tables diff --git a/openstack_dashboard/dashboards/admin/networks/ports/workflows.py b/openstack_dashboard/dashboards/admin/networks/ports/workflows.py index 089c8b273e..2405482bb6 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/workflows.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/workflows.py @@ -16,7 +16,7 @@ import logging from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/networks/subnets/tables.py b/openstack_dashboard/dashboards/admin/networks/subnets/tables.py index 9ce9567f6e..4c867f538b 100644 --- a/openstack_dashboard/dashboards/admin/networks/subnets/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/subnets/tables.py @@ -16,7 +16,7 @@ import logging 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 tables diff --git a/openstack_dashboard/dashboards/admin/networks/subnets/workflows.py b/openstack_dashboard/dashboards/admin/networks/subnets/workflows.py index edc4622588..fd7ce5fea7 100644 --- a/openstack_dashboard/dashboards/admin/networks/subnets/workflows.py +++ b/openstack_dashboard/dashboards/admin/networks/subnets/workflows.py @@ -15,7 +15,7 @@ import logging from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_dashboard.dashboards.project.networks.subnets \ import workflows as project_workflows diff --git a/openstack_dashboard/dashboards/admin/networks/tables.py b/openstack_dashboard/dashboards/admin/networks/tables.py index ed3b9d70f8..b8f3f977c1 100644 --- a/openstack_dashboard/dashboards/admin/networks/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/tables.py @@ -15,8 +15,8 @@ import logging from django.template import defaultfilters as filters +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 exceptions from horizon import tables diff --git a/openstack_dashboard/dashboards/admin/networks/views.py b/openstack_dashboard/dashboards/admin/networks/views.py index df0d1d67e8..5c6c904559 100644 --- a/openstack_dashboard/dashboards/admin/networks/views.py +++ b/openstack_dashboard/dashboards/admin/networks/views.py @@ -15,7 +15,7 @@ from collections import OrderedDict 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 tables diff --git a/openstack_dashboard/dashboards/admin/ngflavors/panel.py b/openstack_dashboard/dashboards/admin/ngflavors/panel.py index 9841763378..fdf637ccae 100644 --- a/openstack_dashboard/dashboards/admin/ngflavors/panel.py +++ b/openstack_dashboard/dashboards/admin/ngflavors/panel.py @@ -13,7 +13,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/openstack_dashboard/dashboards/admin/overview/panel.py b/openstack_dashboard/dashboards/admin/overview/panel.py index a1cd5f22d0..afd55aa397 100644 --- a/openstack_dashboard/dashboards/admin/overview/panel.py +++ b/openstack_dashboard/dashboards/admin/overview/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/admin/overview/views.py b/openstack_dashboard/dashboards/admin/overview/views.py index dde3ab9f06..a943102085 100644 --- a/openstack_dashboard/dashboards/admin/overview/views.py +++ b/openstack_dashboard/dashboards/admin/overview/views.py @@ -19,7 +19,7 @@ from django.conf import settings from django.template.defaultfilters import floatformat from django.utils.text import format_lazy -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon.utils import csvbase diff --git a/openstack_dashboard/dashboards/admin/rbac_policies/forms.py b/openstack_dashboard/dashboards/admin/rbac_policies/forms.py index 1fb1e5347a..a7261e8717 100644 --- a/openstack_dashboard/dashboards/admin/rbac_policies/forms.py +++ b/openstack_dashboard/dashboards/admin/rbac_policies/forms.py @@ -14,7 +14,7 @@ import logging from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from neutronclient.common import exceptions as neutron_exc from horizon import exceptions diff --git a/openstack_dashboard/dashboards/admin/rbac_policies/panel.py b/openstack_dashboard/dashboards/admin/rbac_policies/panel.py index c23bdb073f..18a7a6f57f 100644 --- a/openstack_dashboard/dashboards/admin/rbac_policies/panel.py +++ b/openstack_dashboard/dashboards/admin/rbac_policies/panel.py @@ -12,7 +12,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/admin/rbac_policies/tables.py b/openstack_dashboard/dashboards/admin/rbac_policies/tables.py index 5aad054c04..4ab0daa0da 100644 --- a/openstack_dashboard/dashboards/admin/rbac_policies/tables.py +++ b/openstack_dashboard/dashboards/admin/rbac_policies/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 @@ -35,7 +35,7 @@ class DeleteRBACPolicy(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete RBAC Policy", "Delete RBAC Policies", count @@ -43,7 +43,7 @@ class DeleteRBACPolicy(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted RBAC Policy", "Deleted RBAC Policies", count diff --git a/openstack_dashboard/dashboards/admin/rbac_policies/tabs.py b/openstack_dashboard/dashboards/admin/rbac_policies/tabs.py index 8ea058354e..8ed56e2199 100644 --- a/openstack_dashboard/dashboards/admin/rbac_policies/tabs.py +++ b/openstack_dashboard/dashboards/admin/rbac_policies/tabs.py @@ -13,7 +13,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/openstack_dashboard/dashboards/admin/rbac_policies/views.py b/openstack_dashboard/dashboards/admin/rbac_policies/views.py index c9af346978..f228b36ace 100644 --- a/openstack_dashboard/dashboards/admin/rbac_policies/views.py +++ b/openstack_dashboard/dashboards/admin/rbac_policies/views.py @@ -14,7 +14,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 diff --git a/openstack_dashboard/dashboards/admin/routers/extensions/extraroutes/tables.py b/openstack_dashboard/dashboards/admin/routers/extensions/extraroutes/tables.py index 226904eadb..57a4caa3be 100644 --- a/openstack_dashboard/dashboards/admin/routers/extensions/extraroutes/tables.py +++ b/openstack_dashboard/dashboards/admin/routers/extensions/extraroutes/tables.py @@ -13,7 +13,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 openstack_dashboard.dashboards.project.routers.extensions.extraroutes\ import tables as routes_table diff --git a/openstack_dashboard/dashboards/admin/routers/forms.py b/openstack_dashboard/dashboards/admin/routers/forms.py index 465ce36d5f..cd7f3933e6 100644 --- a/openstack_dashboard/dashboards/admin/routers/forms.py +++ b/openstack_dashboard/dashboards/admin/routers/forms.py @@ -11,7 +11,7 @@ # 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 forms diff --git a/openstack_dashboard/dashboards/admin/routers/panel.py b/openstack_dashboard/dashboards/admin/routers/panel.py index 81bc0c2bae..3dc5444b1a 100644 --- a/openstack_dashboard/dashboards/admin/routers/panel.py +++ b/openstack_dashboard/dashboards/admin/routers/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/openstack_dashboard/dashboards/admin/routers/ports/tables.py b/openstack_dashboard/dashboards/admin/routers/ports/tables.py index 5d36307ce6..f3a994ecc3 100644 --- a/openstack_dashboard/dashboards/admin/routers/ports/tables.py +++ b/openstack_dashboard/dashboards/admin/routers/ports/tables.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 tables from openstack_dashboard.dashboards.project.routers.ports \ diff --git a/openstack_dashboard/dashboards/admin/routers/tables.py b/openstack_dashboard/dashboards/admin/routers/tables.py index 2a9d409dd7..a37a45b4ff 100644 --- a/openstack_dashboard/dashboards/admin/routers/tables.py +++ b/openstack_dashboard/dashboards/admin/routers/tables.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 tables from openstack_dashboard import api diff --git a/openstack_dashboard/dashboards/admin/routers/views.py b/openstack_dashboard/dashboards/admin/routers/views.py index cbd301a707..9a44341044 100644 --- a/openstack_dashboard/dashboards/admin/routers/views.py +++ b/openstack_dashboard/dashboards/admin/routers/views.py @@ -17,7 +17,7 @@ Views for managing Neutron Routers. """ 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 openstack_dashboard import api diff --git a/openstack_dashboard/dashboards/admin/snapshots/forms.py b/openstack_dashboard/dashboards/admin/snapshots/forms.py index c4522ba189..716307db07 100644 --- a/openstack_dashboard/dashboards/admin/snapshots/forms.py +++ b/openstack_dashboard/dashboards/admin/snapshots/forms.py @@ -12,7 +12,7 @@ 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/openstack_dashboard/dashboards/admin/snapshots/panel.py b/openstack_dashboard/dashboards/admin/snapshots/panel.py index 0970f5e213..bfc2b2f4bf 100644 --- a/openstack_dashboard/dashboards/admin/snapshots/panel.py +++ b/openstack_dashboard/dashboards/admin/snapshots/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/openstack_dashboard/dashboards/admin/snapshots/tables.py b/openstack_dashboard/dashboards/admin/snapshots/tables.py index 458604396f..a212f74228 100644 --- a/openstack_dashboard/dashboards/admin/snapshots/tables.py +++ b/openstack_dashboard/dashboards/admin/snapshots/tables.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 _ from horizon import exceptions from horizon import tables diff --git a/openstack_dashboard/dashboards/admin/snapshots/tabs.py b/openstack_dashboard/dashboards/admin/snapshots/tabs.py index bea8398b53..940fb074f3 100644 --- a/openstack_dashboard/dashboards/admin/snapshots/tabs.py +++ b/openstack_dashboard/dashboards/admin/snapshots/tabs.py @@ -11,7 +11,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 tabs diff --git a/openstack_dashboard/dashboards/admin/snapshots/views.py b/openstack_dashboard/dashboards/admin/snapshots/views.py index 5225db29fd..009405b77f 100644 --- a/openstack_dashboard/dashboards/admin/snapshots/views.py +++ b/openstack_dashboard/dashboards/admin/snapshots/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/trunks/panel.py b/openstack_dashboard/dashboards/admin/trunks/panel.py index d530b73cf3..8d5f702a02 100644 --- a/openstack_dashboard/dashboards/admin/trunks/panel.py +++ b/openstack_dashboard/dashboards/admin/trunks/panel.py @@ -14,7 +14,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/admin/trunks/urls.py b/openstack_dashboard/dashboards/admin/trunks/urls.py index 7cc3d1763f..152e74ef40 100644 --- a/openstack_dashboard/dashboards/admin/trunks/urls.py +++ b/openstack_dashboard/dashboards/admin/trunks/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView diff --git a/openstack_dashboard/dashboards/admin/vg_snapshots/tables.py b/openstack_dashboard/dashboards/admin/vg_snapshots/tables.py index b96328c77a..1fd09ff7e2 100644 --- a/openstack_dashboard/dashboards/admin/vg_snapshots/tables.py +++ b/openstack_dashboard/dashboards/admin/vg_snapshots/tables.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 tables diff --git a/openstack_dashboard/dashboards/admin/vg_snapshots/views.py b/openstack_dashboard/dashboards/admin/vg_snapshots/views.py index aceb99756b..48738a80d9 100644 --- a/openstack_dashboard/dashboards/admin/vg_snapshots/views.py +++ b/openstack_dashboard/dashboards/admin/vg_snapshots/views.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 tables diff --git a/openstack_dashboard/dashboards/admin/volume_groups/tables.py b/openstack_dashboard/dashboards/admin/volume_groups/tables.py index a0a0835522..cd378c75ff 100644 --- a/openstack_dashboard/dashboards/admin/volume_groups/tables.py +++ b/openstack_dashboard/dashboards/admin/volume_groups/tables.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 tables diff --git a/openstack_dashboard/dashboards/admin/volume_groups/views.py b/openstack_dashboard/dashboards/admin/volume_groups/views.py index 2ee6478f1a..5d2ce8b25d 100644 --- a/openstack_dashboard/dashboards/admin/volume_groups/views.py +++ b/openstack_dashboard/dashboards/admin/volume_groups/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 tables diff --git a/openstack_dashboard/dashboards/admin/volume_types/extras/forms.py b/openstack_dashboard/dashboards/admin/volume_types/extras/forms.py index c5fc120f24..a440926926 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/extras/forms.py +++ b/openstack_dashboard/dashboards/admin/volume_types/extras/forms.py @@ -13,7 +13,7 @@ import re from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_dashboard import api diff --git a/openstack_dashboard/dashboards/admin/volume_types/extras/tables.py b/openstack_dashboard/dashboards/admin/volume_types/extras/tables.py index 843372b9b7..d8934376e3 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/extras/tables.py +++ b/openstack_dashboard/dashboards/admin/volume_types/extras/tables.py @@ -11,8 +11,8 @@ # under the License. from django.urls import reverse -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 @@ -23,7 +23,7 @@ class ExtraSpecDelete(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Extra Spec", "Delete Extra Specs", count @@ -31,7 +31,7 @@ class ExtraSpecDelete(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Extra Spec", "Deleted Extra Specs", count diff --git a/openstack_dashboard/dashboards/admin/volume_types/extras/views.py b/openstack_dashboard/dashboards/admin/volume_types/extras/views.py index 29c809e0b3..90016785fe 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/extras/views.py +++ b/openstack_dashboard/dashboards/admin/volume_types/extras/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/admin/volume_types/forms.py b/openstack_dashboard/dashboards/admin/volume_types/forms.py index c73777b12b..e3eb594872 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/forms.py +++ b/openstack_dashboard/dashboards/admin/volume_types/forms.py @@ -12,7 +12,7 @@ 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 diff --git a/openstack_dashboard/dashboards/admin/volume_types/panel.py b/openstack_dashboard/dashboards/admin/volume_types/panel.py index 56c56f3d5f..c13c0b0a3d 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/panel.py +++ b/openstack_dashboard/dashboards/admin/volume_types/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/openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py index 2e6503469c..c71f19c3cf 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py +++ b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py @@ -13,7 +13,7 @@ import re 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/openstack_dashboard/dashboards/admin/volume_types/qos_specs/tables.py b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/tables.py index 6164a175a3..de8a4de710 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/qos_specs/tables.py +++ b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/tables.py @@ -13,8 +13,8 @@ from urllib import parse from django.urls import reverse -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 @@ -37,7 +37,7 @@ class SpecCreateKeyValuePair(tables.LinkAction): class SpecDeleteKeyValuePair(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Spec", "Delete Specs", count @@ -45,7 +45,7 @@ class SpecDeleteKeyValuePair(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Spec", "Deleted Specs", count diff --git a/openstack_dashboard/dashboards/admin/volume_types/qos_specs/views.py b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/views.py index dff4317b64..c8fe8827dc 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/qos_specs/views.py +++ b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/views.py @@ -11,7 +11,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/openstack_dashboard/dashboards/admin/volume_types/tables.py b/openstack_dashboard/dashboards/admin/volume_types/tables.py index 85dda38f0b..4e056d0ea0 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/tables.py +++ b/openstack_dashboard/dashboards/admin/volume_types/tables.py @@ -12,8 +12,8 @@ from django.template import defaultfilters as filters from django.urls import reverse -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 exceptions from horizon import forms @@ -74,7 +74,7 @@ class ManageQosSpecAssociation(tables.LinkAction): class DeleteVolumeType(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Volume Type", "Delete Volume Types", count @@ -82,7 +82,7 @@ class DeleteVolumeType(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Volume Type", "Deleted Volume Types", count @@ -125,7 +125,7 @@ class DeleteVolumeTypeEncryption(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Encryption", "Delete Encryptions", count @@ -133,7 +133,7 @@ class DeleteVolumeTypeEncryption(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Encryption", "Deleted Encryptions", count @@ -292,7 +292,7 @@ class CreateQosSpec(tables.LinkAction): class DeleteQosSpecs(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete QoS Spec", "Delete QoS Specs", count @@ -300,7 +300,7 @@ class DeleteQosSpecs(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted QoS Spec", "Deleted QoS Specs", count diff --git a/openstack_dashboard/dashboards/admin/volume_types/views.py b/openstack_dashboard/dashboards/admin/volume_types/views.py index 47ebb7583a..40e449e9de 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/views.py +++ b/openstack_dashboard/dashboards/admin/volume_types/views.py @@ -17,7 +17,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 diff --git a/openstack_dashboard/dashboards/admin/volumes/forms.py b/openstack_dashboard/dashboards/admin/volumes/forms.py index e902aeee7b..d273c418ea 100644 --- a/openstack_dashboard/dashboards/admin/volumes/forms.py +++ b/openstack_dashboard/dashboards/admin/volumes/forms.py @@ -17,7 +17,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/openstack_dashboard/dashboards/admin/volumes/panel.py b/openstack_dashboard/dashboards/admin/volumes/panel.py index 394277a2dd..d8892eda0c 100644 --- a/openstack_dashboard/dashboards/admin/volumes/panel.py +++ b/openstack_dashboard/dashboards/admin/volumes/panel.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 _ import horizon diff --git a/openstack_dashboard/dashboards/admin/volumes/tables.py b/openstack_dashboard/dashboards/admin/volumes/tables.py index cedfe3a426..4bad7b155e 100644 --- a/openstack_dashboard/dashboards/admin/volumes/tables.py +++ b/openstack_dashboard/dashboards/admin/volumes/tables.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 _ from horizon import exceptions from horizon import tables diff --git a/openstack_dashboard/dashboards/admin/volumes/views.py b/openstack_dashboard/dashboards/admin/volumes/views.py index 70315e3903..2fb812f267 100644 --- a/openstack_dashboard/dashboards/admin/volumes/views.py +++ b/openstack_dashboard/dashboards/admin/volumes/views.py @@ -18,7 +18,7 @@ Admin views for managing volumes and snapshots. 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 diff --git a/openstack_dashboard/dashboards/identity/application_credentials/forms.py b/openstack_dashboard/dashboards/identity/application_credentials/forms.py index 5a8614d867..62c6fdf4f6 100644 --- a/openstack_dashboard/dashboards/identity/application_credentials/forms.py +++ b/openstack_dashboard/dashboards/identity/application_credentials/forms.py @@ -17,7 +17,7 @@ import logging from django.conf import settings from django.forms import widgets -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.debug import sensitive_variables import yaml diff --git a/openstack_dashboard/dashboards/identity/application_credentials/panel.py b/openstack_dashboard/dashboards/identity/application_credentials/panel.py index d3c54c1e65..77a2f80ca1 100644 --- a/openstack_dashboard/dashboards/identity/application_credentials/panel.py +++ b/openstack_dashboard/dashboards/identity/application_credentials/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/openstack_dashboard/dashboards/identity/application_credentials/tables.py b/openstack_dashboard/dashboards/identity/application_credentials/tables.py index 27eae86d9b..cce362ea50 100644 --- a/openstack_dashboard/dashboards/identity/application_credentials/tables.py +++ b/openstack_dashboard/dashboards/identity/application_credentials/tables.py @@ -10,8 +10,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 @@ -34,7 +34,7 @@ class DeleteApplicationCredentialAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Application Credential", "Delete Application Credentials", count @@ -42,7 +42,7 @@ class DeleteApplicationCredentialAction(policy.PolicyTargetMixin, @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Application Credential", "Deleted Application Credentialss", count diff --git a/openstack_dashboard/dashboards/identity/application_credentials/views.py b/openstack_dashboard/dashboards/identity/application_credentials/views.py index e6170295fd..8a0865ec87 100644 --- a/openstack_dashboard/dashboards/identity/application_credentials/views.py +++ b/openstack_dashboard/dashboards/identity/application_credentials/views.py @@ -17,7 +17,7 @@ from django import http from django.template.loader import render_to_string 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 diff --git a/openstack_dashboard/dashboards/identity/dashboard.py b/openstack_dashboard/dashboards/identity/dashboard.py index 78fe256c26..63d61bf56f 100644 --- a/openstack_dashboard/dashboards/identity/dashboard.py +++ b/openstack_dashboard/dashboards/identity/dashboard.py @@ -13,7 +13,7 @@ # under the License. -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/identity/domains/panel.py b/openstack_dashboard/dashboards/identity/domains/panel.py index 7d596ed164..a14038cfbf 100644 --- a/openstack_dashboard/dashboards/identity/domains/panel.py +++ b/openstack_dashboard/dashboards/identity/domains/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/openstack_dashboard/dashboards/identity/domains/tables.py b/openstack_dashboard/dashboards/identity/domains/tables.py index e0588accc7..62c1b19412 100644 --- a/openstack_dashboard/dashboards/identity/domains/tables.py +++ b/openstack_dashboard/dashboards/identity/domains/tables.py @@ -19,8 +19,8 @@ from django import shortcuts from django.template import defaultfilters as filters from django.urls import reverse from django.utils.http import urlencode -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 keystoneclient import exceptions as keystoneclient_exceptions @@ -92,7 +92,7 @@ class EditDomainLink(tables.LinkAction): class DeleteDomainsAction(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Domain", "Delete Domains", count @@ -100,7 +100,7 @@ class DeleteDomainsAction(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Domain", "Deleted Domains", count @@ -126,7 +126,7 @@ class DeleteDomainsAction(tables.DeleteAction): class DisableDomainsAction(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Disable Domain", "Disable Domains", count @@ -134,7 +134,7 @@ class DisableDomainsAction(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Disabled Domain", "Disabled Domains", count @@ -166,7 +166,7 @@ class DisableDomainsAction(tables.BatchAction): class EnableDomainsAction(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Enable Domain", "Enable Domains", count @@ -174,7 +174,7 @@ class EnableDomainsAction(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Enabled Domain", "Enabled Domains", count diff --git a/openstack_dashboard/dashboards/identity/domains/urls.py b/openstack_dashboard/dashboards/identity/domains/urls.py index 56676a2b04..5489915874 100644 --- a/openstack_dashboard/dashboards/identity/domains/urls.py +++ b/openstack_dashboard/dashboards/identity/domains/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers import views diff --git a/openstack_dashboard/dashboards/identity/domains/views.py b/openstack_dashboard/dashboards/identity/domains/views.py index c03b9cc418..3de5ff34a6 100644 --- a/openstack_dashboard/dashboards/identity/domains/views.py +++ b/openstack_dashboard/dashboards/identity/domains/views.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 messages diff --git a/openstack_dashboard/dashboards/identity/domains/workflows.py b/openstack_dashboard/dashboards/identity/domains/workflows.py index 6a13b0f871..9bca611898 100644 --- a/openstack_dashboard/dashboards/identity/domains/workflows.py +++ b/openstack_dashboard/dashboards/identity/domains/workflows.py @@ -16,7 +16,7 @@ import logging 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 openstack_auth import utils diff --git a/openstack_dashboard/dashboards/identity/groups/forms.py b/openstack_dashboard/dashboards/identity/groups/forms.py index f019b1fbad..507d673d78 100644 --- a/openstack_dashboard/dashboards/identity/groups/forms.py +++ b/openstack_dashboard/dashboards/identity/groups/forms.py @@ -14,7 +14,7 @@ import logging -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/openstack_dashboard/dashboards/identity/groups/panel.py b/openstack_dashboard/dashboards/identity/groups/panel.py index 85442e77c6..96ca87238a 100644 --- a/openstack_dashboard/dashboards/identity/groups/panel.py +++ b/openstack_dashboard/dashboards/identity/groups/panel.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/identity/groups/tables.py b/openstack_dashboard/dashboards/identity/groups/tables.py index fd171d4b3a..8719984693 100644 --- a/openstack_dashboard/dashboards/identity/groups/tables.py +++ b/openstack_dashboard/dashboards/identity/groups/tables.py @@ -16,8 +16,8 @@ import logging from django.template import defaultfilters from django.urls import reverse -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 @@ -62,7 +62,7 @@ class EditGroupLink(policy.PolicyTargetMixin, tables.LinkAction): class DeleteGroupsAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Group", "Delete Groups", count @@ -70,7 +70,7 @@ class DeleteGroupsAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Group", "Deleted Groups", count @@ -130,7 +130,7 @@ class UserFilterAction(tables.FilterAction): class RemoveMembers(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Remove User", "Remove Users", count @@ -138,7 +138,7 @@ class RemoveMembers(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Removed User", "Removed Users", count @@ -206,7 +206,7 @@ class GroupMembersTable(UsersTable): class AddMembers(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Add User", "Add Users", count @@ -214,7 +214,7 @@ class AddMembers(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Added User", "Added Users", count diff --git a/openstack_dashboard/dashboards/identity/groups/views.py b/openstack_dashboard/dashboards/identity/groups/views.py index 91ff369222..551ef8b9c0 100644 --- a/openstack_dashboard/dashboards/identity/groups/views.py +++ b/openstack_dashboard/dashboards/identity/groups/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 diff --git a/openstack_dashboard/dashboards/identity/identity_providers/forms.py b/openstack_dashboard/dashboards/identity/identity_providers/forms.py index cb2ef94755..2159bdfe9d 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/forms.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/forms.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/openstack_dashboard/dashboards/identity/identity_providers/panel.py b/openstack_dashboard/dashboards/identity/identity_providers/panel.py index 339c596290..0a3d3b478f 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/panel.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/panel.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/identity/identity_providers/protocols/forms.py b/openstack_dashboard/dashboards/identity/identity_providers/protocols/forms.py index 6bb9b673b0..0b494cdb6f 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/protocols/forms.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/protocols/forms.py @@ -14,7 +14,7 @@ import logging -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/openstack_dashboard/dashboards/identity/identity_providers/protocols/tables.py b/openstack_dashboard/dashboards/identity/identity_providers/protocols/tables.py index 9e6a70cbf4..6884b795b7 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/protocols/tables.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/protocols/tables.py @@ -13,8 +13,8 @@ # under the License. from django.urls import reverse -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 openstack_dashboard import api @@ -37,7 +37,7 @@ class AddProtocol(policy.PolicyTargetMixin, tables.LinkAction): class RemoveProtocol(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Protocol", "Delete Protocols", count @@ -45,7 +45,7 @@ class RemoveProtocol(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Protocol", "Deleted Protocols", count diff --git a/openstack_dashboard/dashboards/identity/identity_providers/protocols/views.py b/openstack_dashboard/dashboards/identity/identity_providers/protocols/views.py index 1a3961b48e..c066d38798 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/protocols/views.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/protocols/views.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 forms diff --git a/openstack_dashboard/dashboards/identity/identity_providers/tables.py b/openstack_dashboard/dashboards/identity/identity_providers/tables.py index e0e1f4c3e3..6df817d8d2 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/tables.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/tables.py @@ -13,8 +13,8 @@ # under the License. from django.template import defaultfilters as filters -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 @@ -50,7 +50,7 @@ class ManageProtocolsLink(tables.LinkAction): class DeleteIdPsAction(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Unregister Identity Provider", "Unregister Identity Providers", count @@ -58,7 +58,7 @@ class DeleteIdPsAction(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Unregistered Identity Provider", "Unregistered Identity Providers", count diff --git a/openstack_dashboard/dashboards/identity/identity_providers/tabs.py b/openstack_dashboard/dashboards/identity/identity_providers/tabs.py index e57f7cf7db..44ec52d65c 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/tabs.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/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 tabs diff --git a/openstack_dashboard/dashboards/identity/identity_providers/views.py b/openstack_dashboard/dashboards/identity/identity_providers/views.py index e81ec3af75..fefe9e632b 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/views.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/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 diff --git a/openstack_dashboard/dashboards/identity/mappings/forms.py b/openstack_dashboard/dashboards/identity/mappings/forms.py index 69d23ce4ae..dd9fe33963 100644 --- a/openstack_dashboard/dashboards/identity/mappings/forms.py +++ b/openstack_dashboard/dashboards/identity/mappings/forms.py @@ -14,7 +14,7 @@ import json -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/openstack_dashboard/dashboards/identity/mappings/panel.py b/openstack_dashboard/dashboards/identity/mappings/panel.py index 7399cfd18c..3a7d4e209f 100644 --- a/openstack_dashboard/dashboards/identity/mappings/panel.py +++ b/openstack_dashboard/dashboards/identity/mappings/panel.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/identity/mappings/tables.py b/openstack_dashboard/dashboards/identity/mappings/tables.py index bc9ce2fb9b..88068ea46f 100644 --- a/openstack_dashboard/dashboards/identity/mappings/tables.py +++ b/openstack_dashboard/dashboards/identity/mappings/tables.py @@ -14,8 +14,8 @@ import json -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 @@ -43,7 +43,7 @@ class EditMappingLink(tables.LinkAction): class DeleteMappingsAction(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Mapping", "Delete Mappings", count @@ -51,7 +51,7 @@ class DeleteMappingsAction(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Mapping", "Deleted Mappings", count diff --git a/openstack_dashboard/dashboards/identity/mappings/views.py b/openstack_dashboard/dashboards/identity/mappings/views.py index af69c2bb2b..bb2809e6d6 100644 --- a/openstack_dashboard/dashboards/identity/mappings/views.py +++ b/openstack_dashboard/dashboards/identity/mappings/views.py @@ -16,7 +16,7 @@ import json 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 diff --git a/openstack_dashboard/dashboards/identity/projects/groups/tables.py b/openstack_dashboard/dashboards/identity/projects/groups/tables.py index 962840734f..fdbe3c6123 100644 --- a/openstack_dashboard/dashboards/identity/projects/groups/tables.py +++ b/openstack_dashboard/dashboards/identity/projects/groups/tables.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 _ from horizon import forms from horizon import tables diff --git a/openstack_dashboard/dashboards/identity/projects/panel.py b/openstack_dashboard/dashboards/identity/projects/panel.py index 26a34f2247..21add27273 100644 --- a/openstack_dashboard/dashboards/identity/projects/panel.py +++ b/openstack_dashboard/dashboards/identity/projects/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/identity/projects/tables.py b/openstack_dashboard/dashboards/identity/projects/tables.py index 277ed232e0..a8d02969f3 100644 --- a/openstack_dashboard/dashboards/identity/projects/tables.py +++ b/openstack_dashboard/dashboards/identity/projects/tables.py @@ -14,8 +14,8 @@ from django.conf import settings from django.template import defaultfilters as filters from django.urls import reverse from django.utils.http import urlencode -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 tables @@ -159,7 +159,7 @@ class ModifyQuotas(tables.LinkAction): class DeleteTenantsAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Project", "Delete Projects", count @@ -167,7 +167,7 @@ class DeleteTenantsAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Project", "Deleted Projects", count diff --git a/openstack_dashboard/dashboards/identity/projects/tabs.py b/openstack_dashboard/dashboards/identity/projects/tabs.py index f4bf69213b..5899efd760 100644 --- a/openstack_dashboard/dashboards/identity/projects/tabs.py +++ b/openstack_dashboard/dashboards/identity/projects/tabs.py @@ -11,7 +11,7 @@ # under the License. from django.conf import settings -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/openstack_dashboard/dashboards/identity/projects/users/tables.py b/openstack_dashboard/dashboards/identity/projects/users/tables.py index de38635a1b..9dc1b6b28b 100644 --- a/openstack_dashboard/dashboards/identity/projects/users/tables.py +++ b/openstack_dashboard/dashboards/identity/projects/users/tables.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 _ from horizon import forms from horizon import tables diff --git a/openstack_dashboard/dashboards/identity/projects/views.py b/openstack_dashboard/dashboards/identity/projects/views.py index 13aee4c90a..bfadc0f2a3 100644 --- a/openstack_dashboard/dashboards/identity/projects/views.py +++ b/openstack_dashboard/dashboards/identity/projects/views.py @@ -18,7 +18,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 messages diff --git a/openstack_dashboard/dashboards/identity/projects/workflows.py b/openstack_dashboard/dashboards/identity/projects/workflows.py index 61f75bd645..f15c275a20 100644 --- a/openstack_dashboard/dashboards/identity/projects/workflows.py +++ b/openstack_dashboard/dashboards/identity/projects/workflows.py @@ -21,7 +21,7 @@ import logging 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 openstack_auth import utils diff --git a/openstack_dashboard/dashboards/identity/roles/forms.py b/openstack_dashboard/dashboards/identity/roles/forms.py index 099edcd26e..95a365fcf8 100644 --- a/openstack_dashboard/dashboards/identity/roles/forms.py +++ b/openstack_dashboard/dashboards/identity/roles/forms.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/openstack_dashboard/dashboards/identity/roles/panel.py b/openstack_dashboard/dashboards/identity/roles/panel.py index 98ccdeb0a5..f1adffc3b5 100644 --- a/openstack_dashboard/dashboards/identity/roles/panel.py +++ b/openstack_dashboard/dashboards/identity/roles/panel.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/identity/roles/tables.py b/openstack_dashboard/dashboards/identity/roles/tables.py index 0eb81d4cdf..1f21b97feb 100644 --- a/openstack_dashboard/dashboards/identity/roles/tables.py +++ b/openstack_dashboard/dashboards/identity/roles/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 @@ -47,7 +47,7 @@ class EditRoleLink(tables.LinkAction): class DeleteRolesAction(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Role", "Delete Roles", count @@ -55,7 +55,7 @@ class DeleteRolesAction(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Role", "Deleted Roles", count diff --git a/openstack_dashboard/dashboards/identity/roles/urls.py b/openstack_dashboard/dashboards/identity/roles/urls.py index d440a945e8..9c8a719bc7 100644 --- a/openstack_dashboard/dashboards/identity/roles/urls.py +++ b/openstack_dashboard/dashboards/identity/roles/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView diff --git a/openstack_dashboard/dashboards/identity/roles/views.py b/openstack_dashboard/dashboards/identity/roles/views.py index 28a2bda4b0..f66ff4612a 100644 --- a/openstack_dashboard/dashboards/identity/roles/views.py +++ b/openstack_dashboard/dashboards/identity/roles/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 diff --git a/openstack_dashboard/dashboards/identity/users/forms.py b/openstack_dashboard/dashboards/identity/users/forms.py index 08988c8723..dbf3f0450e 100644 --- a/openstack_dashboard/dashboards/identity/users/forms.py +++ b/openstack_dashboard/dashboards/identity/users/forms.py @@ -23,7 +23,7 @@ import re from django.conf import settings from django.forms import ValidationError from django import http -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 horizon import exceptions diff --git a/openstack_dashboard/dashboards/identity/users/groups/tables.py b/openstack_dashboard/dashboards/identity/users/groups/tables.py index e83c355576..24462f6984 100644 --- a/openstack_dashboard/dashboards/identity/users/groups/tables.py +++ b/openstack_dashboard/dashboards/identity/users/groups/tables.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 _ from openstack_dashboard.dashboards.identity.groups \ import tables as groups_tables diff --git a/openstack_dashboard/dashboards/identity/users/panel.py b/openstack_dashboard/dashboards/identity/users/panel.py index 0894823aee..a370e02413 100644 --- a/openstack_dashboard/dashboards/identity/users/panel.py +++ b/openstack_dashboard/dashboards/identity/users/panel.py @@ -17,7 +17,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/identity/users/role_assignments/tables.py b/openstack_dashboard/dashboards/identity/users/role_assignments/tables.py index 1b24cf4ef1..90b9966b2e 100644 --- a/openstack_dashboard/dashboards/identity/users/role_assignments/tables.py +++ b/openstack_dashboard/dashboards/identity/users/role_assignments/tables.py @@ -11,7 +11,7 @@ # under the License. from django import urls -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import forms from horizon import tables diff --git a/openstack_dashboard/dashboards/identity/users/tables.py b/openstack_dashboard/dashboards/identity/users/tables.py index a2b9ba8bd5..3e65b5f279 100644 --- a/openstack_dashboard/dashboards/identity/users/tables.py +++ b/openstack_dashboard/dashboards/identity/users/tables.py @@ -11,8 +11,8 @@ # under the License. from django.template import defaultfilters -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 tables @@ -75,12 +75,12 @@ class ToggleEnabled(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): return ( - ungettext_lazy( + ngettext_lazy( "Enable User", "Enable Users", count ), - ungettext_lazy( + ngettext_lazy( "Disable User", "Disable Users", count @@ -90,12 +90,12 @@ class ToggleEnabled(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): return ( - ungettext_lazy( + ngettext_lazy( "Enabled User", "Enabled Users", count ), - ungettext_lazy( + ngettext_lazy( "Disabled User", "Disabled Users", count @@ -133,7 +133,7 @@ class ToggleEnabled(policy.PolicyTargetMixin, tables.BatchAction): class DeleteUsersAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete User", "Delete Users", count @@ -141,7 +141,7 @@ class DeleteUsersAction(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted User", "Deleted Users", count diff --git a/openstack_dashboard/dashboards/identity/users/tabs.py b/openstack_dashboard/dashboards/identity/users/tabs.py index 55986ed19c..4bfca87528 100644 --- a/openstack_dashboard/dashboards/identity/users/tabs.py +++ b/openstack_dashboard/dashboards/identity/users/tabs.py @@ -13,7 +13,7 @@ import logging from django.conf import settings -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/openstack_dashboard/dashboards/identity/users/urls.py b/openstack_dashboard/dashboards/identity/users/urls.py index 724b16b3c8..82f5f166ab 100644 --- a/openstack_dashboard/dashboards/identity/users/urls.py +++ b/openstack_dashboard/dashboards/identity/users/urls.py @@ -17,7 +17,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView from openstack_dashboard.dashboards.identity.users import views diff --git a/openstack_dashboard/dashboards/identity/users/views.py b/openstack_dashboard/dashboards/identity/users/views.py index 298d64d4a0..9e02fee3ac 100644 --- a/openstack_dashboard/dashboards/identity/users/views.py +++ b/openstack_dashboard/dashboards/identity/users/views.py @@ -23,7 +23,7 @@ from django.conf import settings from django.urls import reverse from django.urls import reverse_lazy from django.utils.decorators import method_decorator -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.debug import sensitive_post_parameters from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/api_access/forms.py b/openstack_dashboard/dashboards/project/api_access/forms.py index 39f2921fc5..9caf3d9748 100644 --- a/openstack_dashboard/dashboards/project/api_access/forms.py +++ b/openstack_dashboard/dashboards/project/api_access/forms.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/openstack_dashboard/dashboards/project/api_access/panel.py b/openstack_dashboard/dashboards/project/api_access/panel.py index 947c19b7e9..e5745abc2d 100644 --- a/openstack_dashboard/dashboards/project/api_access/panel.py +++ b/openstack_dashboard/dashboards/project/api_access/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/openstack_dashboard/dashboards/project/api_access/tables.py b/openstack_dashboard/dashboards/project/api_access/tables.py index d84c1a2915..d826f9a061 100644 --- a/openstack_dashboard/dashboards/project/api_access/tables.py +++ b/openstack_dashboard/dashboards/project/api_access/tables.py @@ -14,7 +14,7 @@ from django.conf import settings from django.template.defaultfilters import title -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tables from openstack_dashboard import api diff --git a/openstack_dashboard/dashboards/project/api_access/views.py b/openstack_dashboard/dashboards/project/api_access/views.py index b4c236e526..4622fba16c 100644 --- a/openstack_dashboard/dashboards/project/api_access/views.py +++ b/openstack_dashboard/dashboards/project/api_access/views.py @@ -22,7 +22,7 @@ from django import http from django import shortcuts from django.template.loader import render_to_string 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 diff --git a/openstack_dashboard/dashboards/project/backups/forms.py b/openstack_dashboard/dashboards/project/backups/forms.py index 14cdeb2b45..9a97e9a0c1 100644 --- a/openstack_dashboard/dashboards/project/backups/forms.py +++ b/openstack_dashboard/dashboards/project/backups/forms.py @@ -18,7 +18,7 @@ Views for managing backups. import operator 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/openstack_dashboard/dashboards/project/backups/panel.py b/openstack_dashboard/dashboards/project/backups/panel.py index c4392088b2..9ab64e88a8 100644 --- a/openstack_dashboard/dashboards/project/backups/panel.py +++ b/openstack_dashboard/dashboards/project/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 _ from openstack_dashboard import api diff --git a/openstack_dashboard/dashboards/project/backups/tables.py b/openstack_dashboard/dashboards/project/backups/tables.py index 5d88f173c7..4cbf34ef8f 100644 --- a/openstack_dashboard/dashboards/project/backups/tables.py +++ b/openstack_dashboard/dashboards/project/backups/tables.py @@ -14,9 +14,9 @@ from django.urls import reverse from django.utils import html from django.utils import http 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 tables @@ -70,7 +70,7 @@ class DeleteBackup(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Volume Backup", "Delete Volume Backups", count @@ -78,7 +78,7 @@ class DeleteBackup(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled deletion of Volume Backup", "Scheduled deletion of Volume Backups", count diff --git a/openstack_dashboard/dashboards/project/backups/tabs.py b/openstack_dashboard/dashboards/project/backups/tabs.py index 8c5a4eb9dd..d867af4852 100644 --- a/openstack_dashboard/dashboards/project/backups/tabs.py +++ b/openstack_dashboard/dashboards/project/backups/tabs.py @@ -12,7 +12,7 @@ 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 tabs diff --git a/openstack_dashboard/dashboards/project/backups/views.py b/openstack_dashboard/dashboards/project/backups/views.py index 6d7139093f..b268de43a5 100644 --- a/openstack_dashboard/dashboards/project/backups/views.py +++ b/openstack_dashboard/dashboards/project/backups/views.py @@ -14,7 +14,7 @@ import logging 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 diff --git a/openstack_dashboard/dashboards/project/containers/panel.py b/openstack_dashboard/dashboards/project/containers/panel.py index d71d2435ec..0df099b965 100644 --- a/openstack_dashboard/dashboards/project/containers/panel.py +++ b/openstack_dashboard/dashboards/project/containers/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/project/containers/utils.py b/openstack_dashboard/dashboards/project/containers/utils.py index 6c83401efd..a3427823de 100644 --- a/openstack_dashboard/dashboards/project/containers/utils.py +++ b/openstack_dashboard/dashboards/project/containers/utils.py @@ -11,7 +11,7 @@ # under the License. from django.core import validators -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ no_slash_validator = validators.RegexValidator(r'^(?u)[^/]+$', diff --git a/openstack_dashboard/dashboards/project/dashboard.py b/openstack_dashboard/dashboards/project/dashboard.py index ff131fe9b9..486962ebb1 100644 --- a/openstack_dashboard/dashboards/project/dashboard.py +++ b/openstack_dashboard/dashboards/project/dashboard.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/openstack_dashboard/dashboards/project/floating_ips/forms.py b/openstack_dashboard/dashboards/project/floating_ips/forms.py index 5878ec09cb..78f270d710 100644 --- a/openstack_dashboard/dashboards/project/floating_ips/forms.py +++ b/openstack_dashboard/dashboards/project/floating_ips/forms.py @@ -17,7 +17,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/openstack_dashboard/dashboards/project/floating_ips/panel.py b/openstack_dashboard/dashboards/project/floating_ips/panel.py index 9af9abc1bb..1adde71058 100644 --- a/openstack_dashboard/dashboards/project/floating_ips/panel.py +++ b/openstack_dashboard/dashboards/project/floating_ips/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/openstack_dashboard/dashboards/project/floating_ips/tables.py b/openstack_dashboard/dashboards/project/floating_ips/tables.py index f28d2792e7..1fa3d579ef 100644 --- a/openstack_dashboard/dashboards/project/floating_ips/tables.py +++ b/openstack_dashboard/dashboards/project/floating_ips/tables.py @@ -19,9 +19,9 @@ from django import shortcuts from django.urls import reverse from django.utils.http import urlencode from django.utils.text import format_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 exceptions from horizon import messages @@ -74,7 +74,7 @@ class ReleaseIPs(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Release Floating IP", "Release Floating IPs", count @@ -82,7 +82,7 @@ class ReleaseIPs(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Released Floating IP", "Released Floating IPs", count diff --git a/openstack_dashboard/dashboards/project/floating_ips/views.py b/openstack_dashboard/dashboards/project/floating_ips/views.py index 9b809dd04b..879d4c5b54 100644 --- a/openstack_dashboard/dashboards/project/floating_ips/views.py +++ b/openstack_dashboard/dashboards/project/floating_ips/views.py @@ -22,7 +22,7 @@ Views for managing floating IPs. """ from django.urls import reverse_lazy -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from neutronclient.common import exceptions as neutron_exc diff --git a/openstack_dashboard/dashboards/project/floating_ips/workflows.py b/openstack_dashboard/dashboards/project/floating_ips/workflows.py index 5f3ac9825e..5defa54d16 100644 --- a/openstack_dashboard/dashboards/project/floating_ips/workflows.py +++ b/openstack_dashboard/dashboards/project/floating_ips/workflows.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 neutronclient.common import exceptions as neutron_exc diff --git a/openstack_dashboard/dashboards/project/images/images/forms.py b/openstack_dashboard/dashboards/project/images/images/forms.py index f228e31555..4a043a5eee 100644 --- a/openstack_dashboard/dashboards/project/images/images/forms.py +++ b/openstack_dashboard/dashboards/project/images/images/forms.py @@ -25,7 +25,7 @@ from django.core import validators from django.forms import ValidationError from django.forms.widgets import HiddenInput from django.template import defaultfilters -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/openstack_dashboard/dashboards/project/images/images/tables.py b/openstack_dashboard/dashboards/project/images/images/tables.py index c2c9022b09..9541973994 100644 --- a/openstack_dashboard/dashboards/project/images/images/tables.py +++ b/openstack_dashboard/dashboards/project/images/images/tables.py @@ -19,9 +19,9 @@ from django.conf import settings from django.template import defaultfilters as filters from django.urls import reverse from django.utils.http import urlencode +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 @@ -89,7 +89,7 @@ class DeleteImage(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Image", "Delete Images", count @@ -97,7 +97,7 @@ class DeleteImage(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Image", "Deleted Images", count diff --git a/openstack_dashboard/dashboards/project/images/images/tabs.py b/openstack_dashboard/dashboards/project/images/images/tabs.py index 1dbd9682d9..06553192f5 100644 --- a/openstack_dashboard/dashboards/project/images/images/tabs.py +++ b/openstack_dashboard/dashboards/project/images/images/tabs.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tabs diff --git a/openstack_dashboard/dashboards/project/images/images/urls.py b/openstack_dashboard/dashboards/project/images/images/urls.py index f79f7f4f56..4a3685296e 100644 --- a/openstack_dashboard/dashboards/project/images/images/urls.py +++ b/openstack_dashboard/dashboards/project/images/images/urls.py @@ -17,7 +17,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView from openstack_dashboard.dashboards.project.images.images import views diff --git a/openstack_dashboard/dashboards/project/images/images/views.py b/openstack_dashboard/dashboards/project/images/images/views.py index 230d69dd85..58908c17b5 100644 --- a/openstack_dashboard/dashboards/project/images/images/views.py +++ b/openstack_dashboard/dashboards/project/images/images/views.py @@ -22,7 +22,7 @@ Views for managing images. from django.conf import settings 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 diff --git a/openstack_dashboard/dashboards/project/images/panel.py b/openstack_dashboard/dashboards/project/images/panel.py index e9dd223eb5..1360cfd9d4 100644 --- a/openstack_dashboard/dashboards/project/images/panel.py +++ b/openstack_dashboard/dashboards/project/images/panel.py @@ -13,7 +13,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/openstack_dashboard/dashboards/project/images/snapshots/forms.py b/openstack_dashboard/dashboards/project/images/snapshots/forms.py index c425f928a8..9036cbdd19 100644 --- a/openstack_dashboard/dashboards/project/images/snapshots/forms.py +++ b/openstack_dashboard/dashboards/project/images/snapshots/forms.py @@ -17,7 +17,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 novaclient import exceptions as nova_exceptions from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/images/snapshots/views.py b/openstack_dashboard/dashboards/project/images/snapshots/views.py index 168ab9cb8d..ba95a27a7e 100644 --- a/openstack_dashboard/dashboards/project/images/snapshots/views.py +++ b/openstack_dashboard/dashboards/project/images/snapshots/views.py @@ -21,7 +21,7 @@ Views for managing instance snapshots. """ 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 forms diff --git a/openstack_dashboard/dashboards/project/images/urls.py b/openstack_dashboard/dashboards/project/images/urls.py index fc24b90482..8b0e300040 100644 --- a/openstack_dashboard/dashboards/project/images/urls.py +++ b/openstack_dashboard/dashboards/project/images/urls.py @@ -18,7 +18,7 @@ from django.conf.urls import include from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView from openstack_dashboard.dashboards.project.images.images \ diff --git a/openstack_dashboard/dashboards/project/images/utils.py b/openstack_dashboard/dashboards/project/images/utils.py index f130a0e245..edc68ba5f6 100644 --- a/openstack_dashboard/dashboards/project/images/utils.py +++ b/openstack_dashboard/dashboards/project/images/utils.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 _ from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/images/views.py b/openstack_dashboard/dashboards/project/images/views.py index 79bfde531b..a241caa564 100644 --- a/openstack_dashboard/dashboards/project/images/views.py +++ b/openstack_dashboard/dashboards/project/images/views.py @@ -21,7 +21,7 @@ Views for managing Images and Snapshots. """ -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon import messages diff --git a/openstack_dashboard/dashboards/project/instances/audit_tables.py b/openstack_dashboard/dashboards/project/instances/audit_tables.py index 9d7b992109..6adf337eaf 100644 --- a/openstack_dashboard/dashboards/project/instances/audit_tables.py +++ b/openstack_dashboard/dashboards/project/instances/audit_tables.py @@ -13,8 +13,8 @@ # 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 diff --git a/openstack_dashboard/dashboards/project/instances/console.py b/openstack_dashboard/dashboards/project/instances/console.py index 3ecc603bd3..f48db58eda 100644 --- a/openstack_dashboard/dashboards/project/instances/console.py +++ b/openstack_dashboard/dashboards/project/instances/console.py @@ -15,7 +15,7 @@ from collections import OrderedDict import logging from django.utils.http import urlencode -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from novaclient import exceptions as nova_exception from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/instances/forms.py b/openstack_dashboard/dashboards/project/instances/forms.py index efc8a719ff..e45ecddfa4 100644 --- a/openstack_dashboard/dashboards/project/instances/forms.py +++ b/openstack_dashboard/dashboards/project/instances/forms.py @@ -16,7 +16,7 @@ from django.template.defaultfilters import filesizeformat 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 django.views.decorators.debug import sensitive_variables from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/instances/interfaces_tables.py b/openstack_dashboard/dashboards/project/instances/interfaces_tables.py index 902a2c747f..ffe8659b69 100644 --- a/openstack_dashboard/dashboards/project/instances/interfaces_tables.py +++ b/openstack_dashboard/dashboards/project/instances/interfaces_tables.py @@ -12,7 +12,7 @@ from django.urls import reverse from django.utils.http import urlencode -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tables diff --git a/openstack_dashboard/dashboards/project/instances/panel.py b/openstack_dashboard/dashboards/project/instances/panel.py index 085b9e99dc..cc666574a6 100644 --- a/openstack_dashboard/dashboards/project/instances/panel.py +++ b/openstack_dashboard/dashboards/project/instances/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/openstack_dashboard/dashboards/project/instances/tables.py b/openstack_dashboard/dashboards/project/instances/tables.py index 4351e1c51d..2f9aa73bb5 100644 --- a/openstack_dashboard/dashboards/project/instances/tables.py +++ b/openstack_dashboard/dashboards/project/instances/tables.py @@ -24,10 +24,10 @@ from django import urls from django.utils.http import urlencode from django.utils.safestring import mark_safe from django.utils.text import format_lazy +from django.utils.translation import gettext_lazy as _ +from django.utils.translation import ngettext_lazy from django.utils.translation import npgettext_lazy from django.utils.translation import pgettext_lazy -from django.utils.translation import ugettext_lazy as _ -from django.utils.translation import ungettext_lazy import netaddr from horizon import exceptions @@ -88,7 +88,7 @@ class DeleteInstance(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Instance", "Delete Instances", count @@ -96,7 +96,7 @@ class DeleteInstance(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled deletion of Instance", "Scheduled deletion of Instances", count @@ -122,7 +122,7 @@ class RebootInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Hard Reboot Instance", "Hard Reboot Instances", count @@ -130,7 +130,7 @@ class RebootInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Hard Rebooted Instance", "Hard Rebooted Instances", count @@ -152,7 +152,7 @@ class SoftRebootInstance(RebootInstance): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Soft Reboot Instance", "Soft Reboot Instances", count @@ -160,7 +160,7 @@ class SoftRebootInstance(RebootInstance): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Soft Rebooted Instance", "Soft Rebooted Instances", count @@ -196,7 +196,7 @@ class UnRescueInstance(tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Unrescue Instance", "Unrescue Instances", count @@ -204,7 +204,7 @@ class UnRescueInstance(tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Unrescued Instance", "Unrescued Instances", count @@ -226,12 +226,12 @@ class TogglePause(tables.BatchAction): @staticmethod def action_present(count): return ( - ungettext_lazy( + ngettext_lazy( "Pause Instance", "Pause Instances", count ), - ungettext_lazy( + ngettext_lazy( "Resume Instance", "Resume Instances", count @@ -241,12 +241,12 @@ class TogglePause(tables.BatchAction): @staticmethod def action_past(count): return ( - ungettext_lazy( + ngettext_lazy( "Paused Instance", "Paused Instances", count ), - ungettext_lazy( + ngettext_lazy( "Resumed Instance", "Resumed Instances", count @@ -290,12 +290,12 @@ class ToggleSuspend(tables.BatchAction): @staticmethod def action_present(count): return ( - ungettext_lazy( + ngettext_lazy( "Suspend Instance", "Suspend Instances", count ), - ungettext_lazy( + ngettext_lazy( "Resume Instance", "Resume Instances", count @@ -305,12 +305,12 @@ class ToggleSuspend(tables.BatchAction): @staticmethod def action_past(count): return ( - ungettext_lazy( + ngettext_lazy( "Suspended Instance", "Suspended Instances", count ), - ungettext_lazy( + ngettext_lazy( "Resumed Instance", "Resumed Instances", count @@ -354,12 +354,12 @@ class ToggleShelve(tables.BatchAction): @staticmethod def action_present(count): return ( - ungettext_lazy( + ngettext_lazy( "Shelve Instance", "Shelve Instances", count ), - ungettext_lazy( + ngettext_lazy( "Unshelve Instance", "Unshelve Instances", count @@ -369,12 +369,12 @@ class ToggleShelve(tables.BatchAction): @staticmethod def action_past(count): return ( - ungettext_lazy( + ngettext_lazy( "Shelved Instance", "Shelved Instances", count ), - ungettext_lazy( + ngettext_lazy( "Unshelved Instance", "Unshelved Instances", count @@ -809,7 +809,7 @@ class StartInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Start Instance", "Start Instances", count @@ -817,7 +817,7 @@ class StartInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Started Instance", "Started Instances", count @@ -870,7 +870,7 @@ class LockInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Lock Instance", "Lock Instances", count @@ -878,7 +878,7 @@ class LockInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Locked Instance", "Locked Instances", count @@ -902,7 +902,7 @@ class UnlockInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Unlock Instance", "Unlock Instances", count @@ -910,7 +910,7 @@ class UnlockInstance(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Unlocked Instance", "Unlocked Instances", count diff --git a/openstack_dashboard/dashboards/project/instances/tabs.py b/openstack_dashboard/dashboards/project/instances/tabs.py index 46b7203514..d797af08f6 100644 --- a/openstack_dashboard/dashboards/project/instances/tabs.py +++ b/openstack_dashboard/dashboards/project/instances/tabs.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 tabs diff --git a/openstack_dashboard/dashboards/project/instances/utils.py b/openstack_dashboard/dashboards/project/instances/utils.py index 11bd5dc681..c5a4af314f 100644 --- a/openstack_dashboard/dashboards/project/instances/utils.py +++ b/openstack_dashboard/dashboards/project/instances/utils.py @@ -14,7 +14,7 @@ import logging from operator import itemgetter from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py index ee8b1636c3..a36edb325e 100644 --- a/openstack_dashboard/dashboards/project/instances/views.py +++ b/openstack_dashboard/dashboards/project/instances/views.py @@ -27,7 +27,7 @@ from django import http from django import shortcuts 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 django.views import generic from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py index d5151002f0..7da2c0d5a9 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py @@ -16,7 +16,7 @@ import json from django.utils import encoding -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 horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py index c0eec51295..4e06635411 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py @@ -17,7 +17,7 @@ # 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/openstack_dashboard/dashboards/project/key_pairs/forms.py b/openstack_dashboard/dashboards/project/key_pairs/forms.py index 0bbb8bbf9e..9c93da0a33 100644 --- a/openstack_dashboard/dashboards/project/key_pairs/forms.py +++ b/openstack_dashboard/dashboards/project/key_pairs/forms.py @@ -18,7 +18,7 @@ import re -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/openstack_dashboard/dashboards/project/key_pairs/panel.py b/openstack_dashboard/dashboards/project/key_pairs/panel.py index a0f9da2410..de362dd55b 100644 --- a/openstack_dashboard/dashboards/project/key_pairs/panel.py +++ b/openstack_dashboard/dashboards/project/key_pairs/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/openstack_dashboard/dashboards/project/key_pairs/tables.py b/openstack_dashboard/dashboards/project/key_pairs/tables.py index 86a71571a5..20bcd44209 100644 --- a/openstack_dashboard/dashboards/project/key_pairs/tables.py +++ b/openstack_dashboard/dashboards/project/key_pairs/tables.py @@ -16,8 +16,8 @@ from urllib import parse from django import urls from django.utils.text import format_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 @@ -33,7 +33,7 @@ class DeleteKeyPairs(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Key Pair", "Delete Key Pairs", count @@ -41,7 +41,7 @@ class DeleteKeyPairs(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Key Pair", "Deleted Key Pairs", count diff --git a/openstack_dashboard/dashboards/project/key_pairs/urls.py b/openstack_dashboard/dashboards/project/key_pairs/urls.py index 81fd4378d1..139f2ffb95 100644 --- a/openstack_dashboard/dashboards/project/key_pairs/urls.py +++ b/openstack_dashboard/dashboards/project/key_pairs/urls.py @@ -17,7 +17,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers import views from openstack_dashboard.dashboards.project.key_pairs import views as \ diff --git a/openstack_dashboard/dashboards/project/key_pairs/views.py b/openstack_dashboard/dashboards/project/key_pairs/views.py index 69a2ddb13f..cacf467108 100644 --- a/openstack_dashboard/dashboards/project/key_pairs/views.py +++ b/openstack_dashboard/dashboards/project/key_pairs/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 diff --git a/openstack_dashboard/dashboards/project/network_qos/panel.py b/openstack_dashboard/dashboards/project/network_qos/panel.py index e49e29db5d..060531ef1d 100644 --- a/openstack_dashboard/dashboards/project/network_qos/panel.py +++ b/openstack_dashboard/dashboards/project/network_qos/panel.py @@ -12,7 +12,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/project/network_qos/urls.py b/openstack_dashboard/dashboards/project/network_qos/urls.py index 96b6ceda87..0937bafd69 100644 --- a/openstack_dashboard/dashboards/project/network_qos/urls.py +++ b/openstack_dashboard/dashboards/project/network_qos/urls.py @@ -11,7 +11,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers import views diff --git a/openstack_dashboard/dashboards/project/network_topology/instances/tables.py b/openstack_dashboard/dashboards/project/network_topology/instances/tables.py index 865a1bbd9f..fec33f3859 100644 --- a/openstack_dashboard/dashboards/project/network_topology/instances/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/instances/tables.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 openstack_dashboard.dashboards.project.instances import tables diff --git a/openstack_dashboard/dashboards/project/network_topology/networks/tables.py b/openstack_dashboard/dashboards/project/network_topology/networks/tables.py index a14c089e68..7690570d44 100644 --- a/openstack_dashboard/dashboards/project/network_topology/networks/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/networks/tables.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 openstack_dashboard.dashboards.project.networks import tables diff --git a/openstack_dashboard/dashboards/project/network_topology/panel.py b/openstack_dashboard/dashboards/project/network_topology/panel.py index 593530dd4c..6dc54fd5aa 100644 --- a/openstack_dashboard/dashboards/project/network_topology/panel.py +++ b/openstack_dashboard/dashboards/project/network_topology/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/project/network_topology/ports/tables.py b/openstack_dashboard/dashboards/project/network_topology/ports/tables.py index aeba30d708..fcd7932b8f 100644 --- a/openstack_dashboard/dashboards/project/network_topology/ports/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/ports/tables.py @@ -13,7 +13,7 @@ # under the License. -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_dashboard.dashboards.project.routers.ports import tables diff --git a/openstack_dashboard/dashboards/project/network_topology/routers/tables.py b/openstack_dashboard/dashboards/project/network_topology/routers/tables.py index 60b433fddb..769e1f5a1a 100644 --- a/openstack_dashboard/dashboards/project/network_topology/routers/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/routers/tables.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 openstack_dashboard.dashboards.project.routers import tables diff --git a/openstack_dashboard/dashboards/project/network_topology/subnets/tables.py b/openstack_dashboard/dashboards/project/network_topology/subnets/tables.py index b1f3b06560..af547266d5 100644 --- a/openstack_dashboard/dashboards/project/network_topology/subnets/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/subnets/tables.py @@ -13,7 +13,7 @@ # under the License. -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_dashboard.dashboards.project.networks.subnets import tables diff --git a/openstack_dashboard/dashboards/project/network_topology/tabs.py b/openstack_dashboard/dashboards/project/network_topology/tabs.py index f995950bf2..1c62b357d6 100644 --- a/openstack_dashboard/dashboards/project/network_topology/tabs.py +++ b/openstack_dashboard/dashboards/project/network_topology/tabs.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 _ from horizon import tabs diff --git a/openstack_dashboard/dashboards/project/network_topology/views.py b/openstack_dashboard/dashboards/project/network_topology/views.py index 0ea922f5d0..3808877ca1 100644 --- a/openstack_dashboard/dashboards/project/network_topology/views.py +++ b/openstack_dashboard/dashboards/project/network_topology/views.py @@ -22,7 +22,7 @@ from django.conf import settings 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 _ from django.views.generic import View from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/networks/forms.py b/openstack_dashboard/dashboards/project/networks/forms.py index 0c6195bef1..67194aee9b 100644 --- a/openstack_dashboard/dashboards/project/networks/forms.py +++ b/openstack_dashboard/dashboards/project/networks/forms.py @@ -19,7 +19,7 @@ import logging 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/openstack_dashboard/dashboards/project/networks/panel.py b/openstack_dashboard/dashboards/project/networks/panel.py index 43976ec1d3..902dd6ac41 100644 --- a/openstack_dashboard/dashboards/project/networks/panel.py +++ b/openstack_dashboard/dashboards/project/networks/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/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/forms.py b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/forms.py index 306f097390..47d268ba78 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/forms.py +++ b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/forms.py @@ -16,7 +16,7 @@ import logging 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/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py index 6f0502cec9..85ed3ee9b5 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py +++ b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py @@ -16,8 +16,8 @@ import logging from django.urls import reverse -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 @@ -55,7 +55,7 @@ class AddAllowedAddressPair(policy.PolicyTargetMixin, tables.LinkAction): class DeleteAllowedAddressPair(tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete", "Delete", count @@ -63,7 +63,7 @@ class DeleteAllowedAddressPair(tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted address pair", "Deleted address pairs", count diff --git a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tabs.py b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tabs.py index 1114b5cf06..b5ecb5ff7e 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tabs.py +++ b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tabs.py @@ -15,7 +15,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tabs diff --git a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/views.py b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/views.py index a96bb89dd3..da731c06dc 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/views.py +++ b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/views.py @@ -14,7 +14,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 forms diff --git a/openstack_dashboard/dashboards/project/networks/ports/sg_base.py b/openstack_dashboard/dashboards/project/networks/ports/sg_base.py index 23d78befa9..dcd25d1403 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/sg_base.py +++ b/openstack_dashboard/dashboards/project/networks/ports/sg_base.py @@ -12,7 +12,7 @@ import abc -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/openstack_dashboard/dashboards/project/networks/ports/tables.py b/openstack_dashboard/dashboards/project/networks/ports/tables.py index f172f1c073..c7a6c9adcb 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/tables.py +++ b/openstack_dashboard/dashboards/project/networks/ports/tables.py @@ -17,9 +17,9 @@ import logging from django import template from django.urls import reverse from django.utils.http import urlencode +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 @@ -106,7 +106,7 @@ class CreatePort(tables.LinkAction): class DeletePort(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Port", "Delete Ports", count @@ -114,7 +114,7 @@ class DeletePort(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Port", "Deleted Ports", count diff --git a/openstack_dashboard/dashboards/project/networks/ports/tabs.py b/openstack_dashboard/dashboards/project/networks/ports/tabs.py index 7f2e946642..a4cbe5c786 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/tabs.py +++ b/openstack_dashboard/dashboards/project/networks/ports/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/openstack_dashboard/dashboards/project/networks/ports/views.py b/openstack_dashboard/dashboards/project/networks/ports/views.py index eb67a93594..25712767f8 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/views.py +++ b/openstack_dashboard/dashboards/project/networks/ports/views.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 tabs diff --git a/openstack_dashboard/dashboards/project/networks/ports/workflows.py b/openstack_dashboard/dashboards/project/networks/ports/workflows.py index 8638d60ff8..1300946e9b 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/workflows.py +++ b/openstack_dashboard/dashboards/project/networks/ports/workflows.py @@ -16,7 +16,7 @@ import logging 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/openstack_dashboard/dashboards/project/networks/subnets/tables.py b/openstack_dashboard/dashboards/project/networks/subnets/tables.py index d0be381419..c99aeba4bc 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/tables.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/tables.py @@ -18,8 +18,8 @@ from neutronclient.common import exceptions as neutron_exceptions from django.urls import reverse 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 exceptions from horizon import tables @@ -59,7 +59,7 @@ class SubnetPolicyTargetMixin(policy.PolicyTargetMixin): class DeleteSubnet(SubnetPolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Subnet", "Delete Subnets", count @@ -67,7 +67,7 @@ class DeleteSubnet(SubnetPolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Subnet", "Deleted Subnets", count diff --git a/openstack_dashboard/dashboards/project/networks/subnets/tabs.py b/openstack_dashboard/dashboards/project/networks/subnets/tabs.py index 78d098a91b..39c126d89e 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/tabs.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/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/openstack_dashboard/dashboards/project/networks/subnets/utils.py b/openstack_dashboard/dashboards/project/networks/subnets/utils.py index a301175019..a9a1a70600 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/utils.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/utils.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 _ IPV6_DEFAULT_MODE = 'none/none' IPV6_MODE_CHOICES = [ diff --git a/openstack_dashboard/dashboards/project/networks/subnets/views.py b/openstack_dashboard/dashboards/project/networks/subnets/views.py index e28a0904ab..3ada8429e7 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/views.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/views.py @@ -16,7 +16,7 @@ Views for managing Neutron Subnets. """ 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 tabs diff --git a/openstack_dashboard/dashboards/project/networks/subnets/workflows.py b/openstack_dashboard/dashboards/project/networks/subnets/workflows.py index ca039fa085..0d75ed9b80 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/workflows.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/workflows.py @@ -15,7 +15,7 @@ import logging 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/openstack_dashboard/dashboards/project/networks/tables.py b/openstack_dashboard/dashboards/project/networks/tables.py index cdf63e8a4f..db0b86c0af 100644 --- a/openstack_dashboard/dashboards/project/networks/tables.py +++ b/openstack_dashboard/dashboards/project/networks/tables.py @@ -16,9 +16,9 @@ import logging from django import template 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 neutronclient.common import exceptions as neutron_exceptions from horizon import exceptions @@ -38,7 +38,7 @@ LOG = logging.getLogger(__name__) class DeleteNetwork(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Network", "Delete Networks", count @@ -46,7 +46,7 @@ class DeleteNetwork(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Network", "Deleted Networks", count diff --git a/openstack_dashboard/dashboards/project/networks/tabs.py b/openstack_dashboard/dashboards/project/networks/tabs.py index abe5371c3c..94b50af014 100644 --- a/openstack_dashboard/dashboards/project/networks/tabs.py +++ b/openstack_dashboard/dashboards/project/networks/tabs.py @@ -13,7 +13,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/openstack_dashboard/dashboards/project/networks/views.py b/openstack_dashboard/dashboards/project/networks/views.py index fde0fbc9a2..aaaf63ba19 100644 --- a/openstack_dashboard/dashboards/project/networks/views.py +++ b/openstack_dashboard/dashboards/project/networks/views.py @@ -17,7 +17,7 @@ Views for managing Neutron Networks. """ 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 diff --git a/openstack_dashboard/dashboards/project/networks/workflows.py b/openstack_dashboard/dashboards/project/networks/workflows.py index 5d0e7ad2ee..dbbeda55f6 100644 --- a/openstack_dashboard/dashboards/project/networks/workflows.py +++ b/openstack_dashboard/dashboards/project/networks/workflows.py @@ -17,7 +17,7 @@ import logging 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 _ import netaddr from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/overview/panel.py b/openstack_dashboard/dashboards/project/overview/panel.py index d3735c25da..002a7b0196 100644 --- a/openstack_dashboard/dashboards/project/overview/panel.py +++ b/openstack_dashboard/dashboards/project/overview/panel.py @@ -16,7 +16,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/openstack_dashboard/dashboards/project/overview/views.py b/openstack_dashboard/dashboards/project/overview/views.py index daf33ebb9f..8fe483ffa5 100644 --- a/openstack_dashboard/dashboards/project/overview/views.py +++ b/openstack_dashboard/dashboards/project/overview/views.py @@ -19,7 +19,7 @@ from django.template.defaultfilters import capfirst from django.template.defaultfilters import floatformat -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.utils import csvbase from horizon import views diff --git a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/forms.py b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/forms.py index f6fdd06794..d48a61b378 100644 --- a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/forms.py +++ b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/forms.py @@ -16,7 +16,7 @@ import logging from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from neutronclient.common import exceptions as neutron_exc from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tables.py b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tables.py index 77d32aed0d..dcb8511c94 100644 --- a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tables.py +++ b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tables.py @@ -14,8 +14,8 @@ # under the License. from django.urls import reverse -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 openstack_dashboard.api import neutron as api from openstack_dashboard import policy @@ -39,7 +39,7 @@ class AddRouterRoute(policy.PolicyTargetMixin, tables.LinkAction): class RemoveRouterRoute(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Static Route", "Delete Static Routes", count @@ -47,7 +47,7 @@ class RemoveRouterRoute(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Static Route", "Deleted Static Routes", count diff --git a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tabs.py b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tabs.py index d1b17fbcf7..8ef455c045 100644 --- a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tabs.py +++ b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/tabs.py @@ -15,7 +15,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tabs diff --git a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/views.py b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/views.py index 1ad56e23fb..9303867542 100644 --- a/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/views.py +++ b/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/views.py @@ -14,7 +14,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/openstack_dashboard/dashboards/project/routers/forms.py b/openstack_dashboard/dashboards/project/routers/forms.py index a659adfbfa..992e48a3f6 100644 --- a/openstack_dashboard/dashboards/project/routers/forms.py +++ b/openstack_dashboard/dashboards/project/routers/forms.py @@ -20,7 +20,7 @@ import logging 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 diff --git a/openstack_dashboard/dashboards/project/routers/panel.py b/openstack_dashboard/dashboards/project/routers/panel.py index 290f1913c2..1da6df14a7 100644 --- a/openstack_dashboard/dashboards/project/routers/panel.py +++ b/openstack_dashboard/dashboards/project/routers/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/openstack_dashboard/dashboards/project/routers/ports/forms.py b/openstack_dashboard/dashboards/project/routers/ports/forms.py index 417a44a5a6..6b26572cb6 100644 --- a/openstack_dashboard/dashboards/project/routers/ports/forms.py +++ b/openstack_dashboard/dashboards/project/routers/ports/forms.py @@ -15,7 +15,7 @@ import logging 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/openstack_dashboard/dashboards/project/routers/ports/tables.py b/openstack_dashboard/dashboards/project/routers/ports/tables.py index d07bf79768..6cc7cdd75f 100644 --- a/openstack_dashboard/dashboards/project/routers/ports/tables.py +++ b/openstack_dashboard/dashboards/project/routers/ports/tables.py @@ -15,9 +15,9 @@ import logging 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 openstack_dashboard import api @@ -52,7 +52,7 @@ class AddInterface(policy.PolicyTargetMixin, tables.LinkAction): class RemoveInterface(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Interface", "Delete Interfaces", count @@ -60,7 +60,7 @@ class RemoveInterface(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Interface", "Deleted Interfaces", count diff --git a/openstack_dashboard/dashboards/project/routers/ports/tabs.py b/openstack_dashboard/dashboards/project/routers/ports/tabs.py index d4aea2ac4a..b769ef20d8 100644 --- a/openstack_dashboard/dashboards/project/routers/ports/tabs.py +++ b/openstack_dashboard/dashboards/project/routers/ports/tabs.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 tabs diff --git a/openstack_dashboard/dashboards/project/routers/ports/views.py b/openstack_dashboard/dashboards/project/routers/ports/views.py index 3b8480587a..20cb46925a 100644 --- a/openstack_dashboard/dashboards/project/routers/ports/views.py +++ b/openstack_dashboard/dashboards/project/routers/ports/views.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/openstack_dashboard/dashboards/project/routers/tables.py b/openstack_dashboard/dashboards/project/routers/tables.py index 32631b5c1d..0908243f93 100644 --- a/openstack_dashboard/dashboards/project/routers/tables.py +++ b/openstack_dashboard/dashboards/project/routers/tables.py @@ -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 neutronclient.common import exceptions as neutron_exceptions from horizon import exceptions @@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__) class DeleteRouter(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Router", "Delete Routers", count @@ -44,7 +44,7 @@ class DeleteRouter(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Router", "Deleted Routers", count @@ -127,7 +127,7 @@ class ClearGateway(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Clear Gateway", "Clear Gateways", count @@ -135,7 +135,7 @@ class ClearGateway(policy.PolicyTargetMixin, tables.BatchAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Cleared Gateway", "Cleared Gateways", count diff --git a/openstack_dashboard/dashboards/project/routers/tabs.py b/openstack_dashboard/dashboards/project/routers/tabs.py index 3ef73db87e..581256f5b4 100644 --- a/openstack_dashboard/dashboards/project/routers/tabs.py +++ b/openstack_dashboard/dashboards/project/routers/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 tabs diff --git a/openstack_dashboard/dashboards/project/routers/views.py b/openstack_dashboard/dashboards/project/routers/views.py index 946ea37744..0cad98a420 100644 --- a/openstack_dashboard/dashboards/project/routers/views.py +++ b/openstack_dashboard/dashboards/project/routers/views.py @@ -21,8 +21,8 @@ from collections import OrderedDict from django.urls import reverse from django.urls import reverse_lazy +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 exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/project/security_groups/forms.py b/openstack_dashboard/dashboards/project/security_groups/forms.py index 471a99e95c..94e951a567 100644 --- a/openstack_dashboard/dashboards/project/security_groups/forms.py +++ b/openstack_dashboard/dashboards/project/security_groups/forms.py @@ -21,7 +21,7 @@ import netaddr from django.conf import settings 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 diff --git a/openstack_dashboard/dashboards/project/security_groups/panel.py b/openstack_dashboard/dashboards/project/security_groups/panel.py index b8378841ec..8235ee999e 100644 --- a/openstack_dashboard/dashboards/project/security_groups/panel.py +++ b/openstack_dashboard/dashboards/project/security_groups/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/openstack_dashboard/dashboards/project/security_groups/tables.py b/openstack_dashboard/dashboards/project/security_groups/tables.py index 90177503d6..5e3816cab6 100644 --- a/openstack_dashboard/dashboards/project/security_groups/tables.py +++ b/openstack_dashboard/dashboards/project/security_groups/tables.py @@ -17,8 +17,8 @@ import functools from django.conf import settings from django.template import defaultfilters from django.urls import reverse -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 exceptions from horizon import tables @@ -34,7 +34,7 @@ class DeleteGroup(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Security Group", "Delete Security Groups", count @@ -42,7 +42,7 @@ class DeleteGroup(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Security Group", "Deleted Security Groups", count @@ -170,7 +170,7 @@ class DeleteRule(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Rule", "Delete Rules", count @@ -178,7 +178,7 @@ class DeleteRule(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Deleted Rule", "Deleted Rules", count diff --git a/openstack_dashboard/dashboards/project/security_groups/views.py b/openstack_dashboard/dashboards/project/security_groups/views.py index aaa84ed8bf..f7dd4aa092 100644 --- a/openstack_dashboard/dashboards/project/security_groups/views.py +++ b/openstack_dashboard/dashboards/project/security_groups/views.py @@ -21,7 +21,7 @@ Views for managing instances. """ 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 neutronclient.common import exceptions as neutron_exc from horizon import exceptions diff --git a/openstack_dashboard/dashboards/project/server_groups/panel.py b/openstack_dashboard/dashboards/project/server_groups/panel.py index 9039fc23a7..1c9d0b1779 100644 --- a/openstack_dashboard/dashboards/project/server_groups/panel.py +++ b/openstack_dashboard/dashboards/project/server_groups/panel.py @@ -12,7 +12,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/project/server_groups/urls.py b/openstack_dashboard/dashboards/project/server_groups/urls.py index 27e06913c9..fb489abecb 100644 --- a/openstack_dashboard/dashboards/project/server_groups/urls.py +++ b/openstack_dashboard/dashboards/project/server_groups/urls.py @@ -11,7 +11,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers import views diff --git a/openstack_dashboard/dashboards/project/snapshots/forms.py b/openstack_dashboard/dashboards/project/snapshots/forms.py index 638fb1cec8..3b6f29d0cc 100644 --- a/openstack_dashboard/dashboards/project/snapshots/forms.py +++ b/openstack_dashboard/dashboards/project/snapshots/forms.py @@ -12,7 +12,7 @@ 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/openstack_dashboard/dashboards/project/snapshots/panel.py b/openstack_dashboard/dashboards/project/snapshots/panel.py index 1dfa446f9b..1818a9ee13 100644 --- a/openstack_dashboard/dashboards/project/snapshots/panel.py +++ b/openstack_dashboard/dashboards/project/snapshots/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/openstack_dashboard/dashboards/project/snapshots/tables.py b/openstack_dashboard/dashboards/project/snapshots/tables.py index 61fd5f6fd6..4c1b543288 100644 --- a/openstack_dashboard/dashboards/project/snapshots/tables.py +++ b/openstack_dashboard/dashboards/project/snapshots/tables.py @@ -14,8 +14,8 @@ from django.urls import reverse from django.utils.http import urlencode -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 @@ -74,7 +74,7 @@ class DeleteVolumeSnapshot(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Volume Snapshot", "Delete Volume Snapshots", count @@ -82,7 +82,7 @@ class DeleteVolumeSnapshot(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled deletion of Volume Snapshot", "Scheduled deletion of Volume Snapshots", count diff --git a/openstack_dashboard/dashboards/project/snapshots/tabs.py b/openstack_dashboard/dashboards/project/snapshots/tabs.py index 2c29e99ccd..5a3f63deb4 100644 --- a/openstack_dashboard/dashboards/project/snapshots/tabs.py +++ b/openstack_dashboard/dashboards/project/snapshots/tabs.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 tabs diff --git a/openstack_dashboard/dashboards/project/snapshots/views.py b/openstack_dashboard/dashboards/project/snapshots/views.py index be3fe4e979..7efc4a8923 100644 --- a/openstack_dashboard/dashboards/project/snapshots/views.py +++ b/openstack_dashboard/dashboards/project/snapshots/views.py @@ -13,7 +13,7 @@ from django.urls import reverse from django.urls import reverse_lazy from django.utils.http import urlencode -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/openstack_dashboard/dashboards/project/trunks/panel.py b/openstack_dashboard/dashboards/project/trunks/panel.py index 3c70e710af..e3a003cd87 100644 --- a/openstack_dashboard/dashboards/project/trunks/panel.py +++ b/openstack_dashboard/dashboards/project/trunks/panel.py @@ -14,7 +14,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/project/trunks/urls.py b/openstack_dashboard/dashboards/project/trunks/urls.py index 15206e820d..cb49c98290 100644 --- a/openstack_dashboard/dashboards/project/trunks/urls.py +++ b/openstack_dashboard/dashboards/project/trunks/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import url -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView diff --git a/openstack_dashboard/dashboards/project/vg_snapshots/forms.py b/openstack_dashboard/dashboards/project/vg_snapshots/forms.py index e6636ca4cc..3b02de9667 100644 --- a/openstack_dashboard/dashboards/project/vg_snapshots/forms.py +++ b/openstack_dashboard/dashboards/project/vg_snapshots/forms.py @@ -12,7 +12,7 @@ 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/openstack_dashboard/dashboards/project/vg_snapshots/panel.py b/openstack_dashboard/dashboards/project/vg_snapshots/panel.py index e30cee5845..f204eba42b 100644 --- a/openstack_dashboard/dashboards/project/vg_snapshots/panel.py +++ b/openstack_dashboard/dashboards/project/vg_snapshots/panel.py @@ -14,7 +14,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/project/vg_snapshots/tables.py b/openstack_dashboard/dashboards/project/vg_snapshots/tables.py index 25923d7c51..b66281ed04 100644 --- a/openstack_dashboard/dashboards/project/vg_snapshots/tables.py +++ b/openstack_dashboard/dashboards/project/vg_snapshots/tables.py @@ -11,9 +11,9 @@ # under the License. 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 @@ -36,7 +36,7 @@ class DeleteGroupSnapshot(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Snapshot", "Delete Snapshots", count @@ -44,7 +44,7 @@ class DeleteGroupSnapshot(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled deletion of Snapshot", "Scheduled deletion of Snapshots", count diff --git a/openstack_dashboard/dashboards/project/vg_snapshots/tabs.py b/openstack_dashboard/dashboards/project/vg_snapshots/tabs.py index 418f7e1a4d..5633724b8c 100644 --- a/openstack_dashboard/dashboards/project/vg_snapshots/tabs.py +++ b/openstack_dashboard/dashboards/project/vg_snapshots/tabs.py @@ -11,7 +11,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 tabs diff --git a/openstack_dashboard/dashboards/project/vg_snapshots/views.py b/openstack_dashboard/dashboards/project/vg_snapshots/views.py index 1cd8619b41..29a2f69a09 100644 --- a/openstack_dashboard/dashboards/project/vg_snapshots/views.py +++ b/openstack_dashboard/dashboards/project/vg_snapshots/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/project/volume_groups/forms.py b/openstack_dashboard/dashboards/project/volume_groups/forms.py index cac0f00b13..be4de0c97d 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/forms.py +++ b/openstack_dashboard/dashboards/project/volume_groups/forms.py @@ -12,7 +12,7 @@ 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/openstack_dashboard/dashboards/project/volume_groups/panel.py b/openstack_dashboard/dashboards/project/volume_groups/panel.py index 79a4b40a35..83880a811f 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/panel.py +++ b/openstack_dashboard/dashboards/project/volume_groups/panel.py @@ -14,7 +14,7 @@ import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import horizon diff --git a/openstack_dashboard/dashboards/project/volume_groups/tables.py b/openstack_dashboard/dashboards/project/volume_groups/tables.py index 7cfbf94fd4..38539ff3a6 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/tables.py +++ b/openstack_dashboard/dashboards/project/volume_groups/tables.py @@ -11,8 +11,8 @@ # under the License. from django.template import defaultfilters as filters +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 exceptions from horizon import tables diff --git a/openstack_dashboard/dashboards/project/volume_groups/tabs.py b/openstack_dashboard/dashboards/project/volume_groups/tabs.py index 5dabbcceb6..8964a5a109 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/tabs.py +++ b/openstack_dashboard/dashboards/project/volume_groups/tabs.py @@ -11,7 +11,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 tabs diff --git a/openstack_dashboard/dashboards/project/volume_groups/views.py b/openstack_dashboard/dashboards/project/volume_groups/views.py index 426e89cb08..2295d9eae8 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/views.py +++ b/openstack_dashboard/dashboards/project/volume_groups/views.py @@ -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 horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/project/volume_groups/workflows.py b/openstack_dashboard/dashboards/project/volume_groups/workflows.py index 55849bfd56..09533b1975 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/workflows.py +++ b/openstack_dashboard/dashboards/project/volume_groups/workflows.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 _ from horizon import exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/project/volumes/forms.py b/openstack_dashboard/dashboards/project/volumes/forms.py index 3622201e9c..3d89d365f5 100644 --- a/openstack_dashboard/dashboards/project/volumes/forms.py +++ b/openstack_dashboard/dashboards/project/volumes/forms.py @@ -23,8 +23,8 @@ from django.conf import settings from django.forms import ValidationError from django.template.defaultfilters import filesizeformat from django.urls import reverse +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 exceptions from horizon import forms diff --git a/openstack_dashboard/dashboards/project/volumes/panel.py b/openstack_dashboard/dashboards/project/volumes/panel.py index bbc6f2e19c..84af9ef6dd 100644 --- a/openstack_dashboard/dashboards/project/volumes/panel.py +++ b/openstack_dashboard/dashboards/project/volumes/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/openstack_dashboard/dashboards/project/volumes/tables.py b/openstack_dashboard/dashboards/project/volumes/tables.py index f693dc57f9..5bd9568dd5 100644 --- a/openstack_dashboard/dashboards/project/volumes/tables.py +++ b/openstack_dashboard/dashboards/project/volumes/tables.py @@ -20,10 +20,10 @@ from django.utils import html from django.utils.http import urlencode from django.utils import safestring from django.utils.text import format_lazy +from django.utils.translation import gettext_lazy as _ +from django.utils.translation import ngettext_lazy from django.utils.translation import npgettext_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 @@ -96,7 +96,7 @@ class DeleteVolume(VolumePolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): - return ungettext_lazy( + return ngettext_lazy( "Delete Volume", "Delete Volumes", count @@ -104,7 +104,7 @@ class DeleteVolume(VolumePolicyTargetMixin, tables.DeleteAction): @staticmethod def action_past(count): - return ungettext_lazy( + return ngettext_lazy( "Scheduled deletion of Volume", "Scheduled deletion of Volumes", count diff --git a/openstack_dashboard/dashboards/project/volumes/tabs.py b/openstack_dashboard/dashboards/project/volumes/tabs.py index 13f7031494..98a5adc34b 100644 --- a/openstack_dashboard/dashboards/project/volumes/tabs.py +++ b/openstack_dashboard/dashboards/project/volumes/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/openstack_dashboard/dashboards/project/volumes/views.py b/openstack_dashboard/dashboards/project/volumes/views.py index 3fe3ff2ca4..8ac0f164b8 100644 --- a/openstack_dashboard/dashboards/project/volumes/views.py +++ b/openstack_dashboard/dashboards/project/volumes/views.py @@ -25,7 +25,7 @@ from django.urls import reverse from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.utils import encoding -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.cache import never_cache from django.views import generic diff --git a/openstack_dashboard/dashboards/settings/dashboard.py b/openstack_dashboard/dashboards/settings/dashboard.py index 7cb4dcc1b5..b1f1d006be 100644 --- a/openstack_dashboard/dashboards/settings/dashboard.py +++ b/openstack_dashboard/dashboards/settings/dashboard.py @@ -13,7 +13,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/openstack_dashboard/dashboards/settings/password/forms.py b/openstack_dashboard/dashboards/settings/password/forms.py index a4835930f1..348748701a 100644 --- a/openstack_dashboard/dashboards/settings/password/forms.py +++ b/openstack_dashboard/dashboards/settings/password/forms.py @@ -15,7 +15,7 @@ from django.conf import settings from django.forms import ValidationError from django import http -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 horizon import exceptions diff --git a/openstack_dashboard/dashboards/settings/password/panel.py b/openstack_dashboard/dashboards/settings/password/panel.py index c03010aeb9..1b93c09f0f 100644 --- a/openstack_dashboard/dashboards/settings/password/panel.py +++ b/openstack_dashboard/dashboards/settings/password/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/openstack_dashboard/dashboards/settings/password/views.py b/openstack_dashboard/dashboards/settings/password/views.py index 331bb4b047..b648d36b50 100644 --- a/openstack_dashboard/dashboards/settings/password/views.py +++ b/openstack_dashboard/dashboards/settings/password/views.py @@ -13,7 +13,7 @@ # 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 forms diff --git a/openstack_dashboard/dashboards/settings/user/forms.py b/openstack_dashboard/dashboards/settings/user/forms.py index e1deb940a5..4997cc8002 100644 --- a/openstack_dashboard/dashboards/settings/user/forms.py +++ b/openstack_dashboard/dashboards/settings/user/forms.py @@ -21,7 +21,7 @@ from django.conf import settings from django import shortcuts from django.utils import encoding from django.utils import translation -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import pytz from horizon import forms diff --git a/openstack_dashboard/dashboards/settings/user/panel.py b/openstack_dashboard/dashboards/settings/user/panel.py index 9b9781eb0b..9e1ac955a2 100644 --- a/openstack_dashboard/dashboards/settings/user/panel.py +++ b/openstack_dashboard/dashboards/settings/user/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/openstack_dashboard/dashboards/settings/user/views.py b/openstack_dashboard/dashboards/settings/user/views.py index 539b3b5856..2d28240f91 100644 --- a/openstack_dashboard/dashboards/settings/user/views.py +++ b/openstack_dashboard/dashboards/settings/user/views.py @@ -13,7 +13,7 @@ # 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 forms from horizon.utils import functions as utils diff --git a/openstack_dashboard/defaults.py b/openstack_dashboard/defaults.py index c6894332f5..f605afa777 100644 --- a/openstack_dashboard/defaults.py +++ b/openstack_dashboard/defaults.py @@ -14,8 +14,8 @@ import os +from django.utils.translation import gettext_lazy as _ from django.utils.translation import pgettext_lazy -from django.utils.translation import ugettext_lazy as _ # openstack_auth.default is imported in horizon.defaults. from horizon.defaults import * # noqa: F401,F403,H303 diff --git a/openstack_dashboard/enabled/_1010_compute_panel_group.py b/openstack_dashboard/enabled/_1010_compute_panel_group.py index c90bc8850a..b46b54a015 100644 --- a/openstack_dashboard/enabled/_1010_compute_panel_group.py +++ b/openstack_dashboard/enabled/_1010_compute_panel_group.py @@ -1,4 +1,4 @@ -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 = 'compute' diff --git a/openstack_dashboard/enabled/_1310_volumes_panel_group.py b/openstack_dashboard/enabled/_1310_volumes_panel_group.py index 0c234ec1fa..b583039ccd 100644 --- a/openstack_dashboard/enabled/_1310_volumes_panel_group.py +++ b/openstack_dashboard/enabled/_1310_volumes_panel_group.py @@ -1,4 +1,4 @@ -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 = 'volumes' diff --git a/openstack_dashboard/enabled/_1410_network_panel_group.py b/openstack_dashboard/enabled/_1410_network_panel_group.py index 7dba5a04af..5335d6d421 100644 --- a/openstack_dashboard/enabled/_1410_network_panel_group.py +++ b/openstack_dashboard/enabled/_1410_network_panel_group.py @@ -1,4 +1,4 @@ -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 = 'network' diff --git a/openstack_dashboard/enabled/_1910_object_store_panel_group.py b/openstack_dashboard/enabled/_1910_object_store_panel_group.py index 11a8231892..39157cd9b4 100644 --- a/openstack_dashboard/enabled/_1910_object_store_panel_group.py +++ b/openstack_dashboard/enabled/_1910_object_store_panel_group.py @@ -1,4 +1,4 @@ -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ PANEL_GROUP = 'object_store' PANEL_GROUP_NAME = _('Object Store') diff --git a/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py b/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py index ce667c05cd..c7d695ef14 100644 --- a/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py +++ b/openstack_dashboard/enabled/_2110_admin_compute_panel_group.py @@ -1,4 +1,4 @@ -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 = 'compute' diff --git a/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py b/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py index 2bb19ee369..0bf873ea0c 100644 --- a/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py +++ b/openstack_dashboard/enabled/_2210_admin_volume_panel_group.py @@ -1,4 +1,4 @@ -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 = 'volume' diff --git a/openstack_dashboard/enabled/_2300_admin_network_panel_group.py b/openstack_dashboard/enabled/_2300_admin_network_panel_group.py index fa7de76a07..6c2120e9a6 100644 --- a/openstack_dashboard/enabled/_2300_admin_network_panel_group.py +++ b/openstack_dashboard/enabled/_2300_admin_network_panel_group.py @@ -1,4 +1,4 @@ -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 = 'network' diff --git a/openstack_dashboard/enabled/_2810_admin_system_panel_group.py b/openstack_dashboard/enabled/_2810_admin_system_panel_group.py index b0f70158d5..37bcc81a63 100644 --- a/openstack_dashboard/enabled/_2810_admin_system_panel_group.py +++ b/openstack_dashboard/enabled/_2810_admin_system_panel_group.py @@ -1,4 +1,4 @@ -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 = 'admin' diff --git a/openstack_dashboard/enabled/_3060_federation_panel_group.py b/openstack_dashboard/enabled/_3060_federation_panel_group.py index b4ef8e399a..a21db68ddd 100644 --- a/openstack_dashboard/enabled/_3060_federation_panel_group.py +++ b/openstack_dashboard/enabled/_3060_federation_panel_group.py @@ -1,4 +1,4 @@ -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 = 'federation' diff --git a/openstack_dashboard/local/local_settings.py.example b/openstack_dashboard/local/local_settings.py.example index 2b084bf242..8516caf351 100644 --- a/openstack_dashboard/local/local_settings.py.example +++ b/openstack_dashboard/local/local_settings.py.example @@ -14,7 +14,7 @@ import os -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.utils import secret_key diff --git a/openstack_dashboard/management/commands/upgrade_check.py b/openstack_dashboard/management/commands/upgrade_check.py index 2f0c07a946..9629db6e7a 100644 --- a/openstack_dashboard/management/commands/upgrade_check.py +++ b/openstack_dashboard/management/commands/upgrade_check.py @@ -17,7 +17,7 @@ from oslo_upgradecheck import upgradecheck from django.conf import settings from django.core.management.base import BaseCommand -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from openstack_dashboard import defaults diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index ccfb4bfa9c..93f6f03d00 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -22,7 +22,7 @@ import os import sys import warnings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon.utils.escape import monkeypatch_escape diff --git a/openstack_dashboard/test/test_panels/another_panel/views.py b/openstack_dashboard/test/test_panels/another_panel/views.py index 35882683ed..8ef0364d2d 100644 --- a/openstack_dashboard/test/test_panels/another_panel/views.py +++ b/openstack_dashboard/test/test_panels/another_panel/views.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 _ from horizon import views diff --git a/openstack_dashboard/test/unit/usage/test_quotas.py b/openstack_dashboard/test/unit/usage/test_quotas.py index 3538b8a8d6..16744b3230 100644 --- a/openstack_dashboard/test/unit/usage/test_quotas.py +++ b/openstack_dashboard/test/unit/usage/test_quotas.py @@ -21,7 +21,7 @@ import collections from unittest import mock from django.test.utils import override_settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from openstack_dashboard import api diff --git a/openstack_dashboard/usage/base.py b/openstack_dashboard/usage/base.py index 650e305bf2..5aead43a71 100644 --- a/openstack_dashboard/usage/base.py +++ b/openstack_dashboard/usage/base.py @@ -14,7 +14,7 @@ import datetime from django.conf import settings from django.utils import timezone -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/openstack_dashboard/usage/quotas.py b/openstack_dashboard/usage/quotas.py index 40af598678..ce04f66bac 100644 --- a/openstack_dashboard/usage/quotas.py +++ b/openstack_dashboard/usage/quotas.py @@ -14,7 +14,7 @@ from collections import defaultdict import itertools import logging -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import exceptions from horizon.utils.memoized import memoized diff --git a/openstack_dashboard/usage/tables.py b/openstack_dashboard/usage/tables.py index ae2b449377..536a40fd75 100644 --- a/openstack_dashboard/usage/tables.py +++ b/openstack_dashboard/usage/tables.py @@ -12,7 +12,7 @@ from django.template.defaultfilters import floatformat from django import urls -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from horizon import tables from horizon.templatetags import sizeformat diff --git a/openstack_dashboard/usage/views.py b/openstack_dashboard/usage/views.py index 2d76ba9e0e..e8201ae450 100644 --- a/openstack_dashboard/usage/views.py +++ b/openstack_dashboard/usage/views.py @@ -14,8 +14,8 @@ import collections from django.conf import settings from django.contrib.humanize.templatetags import humanize as humanize_filters +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 exceptions from horizon import tables