Replace deprecated ugettext_lazy and ungettext_lazy
The ugettext_lazy method and the ungettext_lazy method are both deprecated since Django 3.0[1]. These were already replaced in Horizon repo by [2]. [1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3 [2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee Change-Id: I90224714987c8583a8d407f661494479db4214af
This commit is contained in:
parent
d742269b83
commit
a5007ee3bd
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from oslo_serialization import jsonutils as json
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -15,8 +15,8 @@ from django import http as http_response
|
||||||
from django.template import defaultfilters as filters
|
from django.template import defaultfilters as filters
|
||||||
from django import urls
|
from django import urls
|
||||||
from django.utils import http
|
from django.utils import http
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.tabs import base as tabs_base
|
from horizon.tabs import base as tabs_base
|
||||||
|
@ -92,7 +92,7 @@ class EditTemplate(tables.LinkAction):
|
||||||
class DeleteTemplate(tables.DeleteAction):
|
class DeleteTemplate(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Template",
|
u"Delete Template",
|
||||||
u"Delete Templates",
|
u"Delete Templates",
|
||||||
count
|
count
|
||||||
|
@ -100,7 +100,7 @@ class DeleteTemplate(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Template",
|
u"Deleted Template",
|
||||||
u"Deleted Templates",
|
u"Deleted Templates",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import json
|
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 exceptions
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django import urls
|
from django import urls
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import json
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
from django.http import Http404 # noqa
|
from django.http import Http404 # noqa
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
|
@ -65,7 +65,7 @@ class ScaleCluster(tables.LinkAction):
|
||||||
class DeleteCluster(tables.DeleteAction):
|
class DeleteCluster(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Cluster",
|
u"Delete Cluster",
|
||||||
u"Delete Clusters",
|
u"Delete Clusters",
|
||||||
count
|
count
|
||||||
|
@ -73,7 +73,7 @@ class DeleteCluster(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Cluster",
|
u"Deleted Cluster",
|
||||||
u"Deleted Clusters",
|
u"Deleted Clusters",
|
||||||
count
|
count
|
||||||
|
@ -88,7 +88,7 @@ class CheckClusterAction(tables.BatchAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Start Verification",
|
u"Start Verification",
|
||||||
u"Start Verifications",
|
u"Start Verifications",
|
||||||
count
|
count
|
||||||
|
@ -96,7 +96,7 @@ class CheckClusterAction(tables.BatchAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Started Verification",
|
u"Started Verification",
|
||||||
u"Started Verifications",
|
u"Started Verifications",
|
||||||
count
|
count
|
||||||
|
@ -111,7 +111,7 @@ class ForceDeleteCluster(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Force Delete Cluster",
|
u"Force Delete Cluster",
|
||||||
u"Force Delete Clusters",
|
u"Force Delete Clusters",
|
||||||
count
|
count
|
||||||
|
@ -119,7 +119,7 @@ class ForceDeleteCluster(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Force Deleted Cluster",
|
u"Force Deleted Cluster",
|
||||||
u"Force Deleted Clusters",
|
u"Force Deleted Clusters",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from sahara_dashboard.api import sahara as saharaclient
|
from sahara_dashboard.api import sahara as saharaclient
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -15,7 +15,7 @@ import json
|
||||||
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import gettext as _
|
||||||
from django.views.generic import base as django_base
|
from django.views.generic import base as django_base
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from saharaclient.api.base import APIException
|
from saharaclient.api.base import APIException
|
||||||
|
|
|
@ -15,7 +15,7 @@ from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from openstack_dashboard.api import nova
|
from openstack_dashboard.api import nova
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import json
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django import template
|
from django import template
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class UnregisterImages(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Unregister Image",
|
u"Unregister Image",
|
||||||
u"Unregister Images",
|
u"Unregister Images",
|
||||||
count
|
count
|
||||||
|
@ -54,7 +54,7 @@ class UnregisterImages(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Unregistered Image",
|
u"Unregistered Image",
|
||||||
u"Unregistered Images",
|
u"Unregistered Images",
|
||||||
count
|
count
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -15,7 +15,7 @@ from collections import OrderedDict
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django.template import defaultfilters as filters
|
from django.template import defaultfilters as filters
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.tabs import base as tabs_base
|
from horizon.tabs import base as tabs_base
|
||||||
|
@ -95,7 +95,7 @@ class ExportTemplate(tables.Action):
|
||||||
class DeleteTemplate(tables.DeleteAction):
|
class DeleteTemplate(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Template",
|
u"Delete Template",
|
||||||
u"Delete Templates",
|
u"Delete Templates",
|
||||||
count
|
count
|
||||||
|
@ -103,7 +103,7 @@ class DeleteTemplate(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Template",
|
u"Deleted Template",
|
||||||
u"Deleted Templates",
|
u"Deleted Templates",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import itertools
|
||||||
from django.utils import encoding
|
from django.utils import encoding
|
||||||
from django.utils import html
|
from django.utils import html
|
||||||
from django.utils import safestring
|
from django.utils import safestring
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 tabs
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
from django import template
|
from django import template
|
||||||
from django.template import defaultfilters
|
from django.template import defaultfilters
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.template import loader
|
from django.template import loader
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.tabs import base as tabs_base
|
from horizon.tabs import base as tabs_base
|
||||||
|
@ -35,7 +35,7 @@ class CreateDataSource(tables.LinkAction):
|
||||||
class DeleteDataSource(tables.DeleteAction):
|
class DeleteDataSource(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Data Source",
|
u"Delete Data Source",
|
||||||
u"Delete Data Sources",
|
u"Delete Data Sources",
|
||||||
count
|
count
|
||||||
|
@ -43,7 +43,7 @@ class DeleteDataSource(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Data Source",
|
u"Deleted Data Source",
|
||||||
u"Deleted Data Sources",
|
u"Deleted Data Sources",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from urllib import parse
|
from urllib import parse
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ from django import template
|
||||||
from django.template import defaultfilters
|
from django.template import defaultfilters
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.utils.safestring import mark_safe
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
|
@ -36,7 +36,7 @@ class CreateJobBinary(tables.LinkAction):
|
||||||
class DeleteJobBinary(tables.DeleteAction):
|
class DeleteJobBinary(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Job Binary",
|
u"Delete Job Binary",
|
||||||
u"Delete Job Binaries",
|
u"Delete Job Binaries",
|
||||||
count
|
count
|
||||||
|
@ -44,7 +44,7 @@ class DeleteJobBinary(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Job Binary",
|
u"Deleted Job Binary",
|
||||||
u"Deleted Job Binaries",
|
u"Deleted Job Binaries",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
from django import http
|
from django import http
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
import django.views
|
import django.views
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
from django import urls
|
from django import urls
|
||||||
from django.utils import http
|
from django.utils import http
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.tabs import base as tabs_base
|
from horizon.tabs import base as tabs_base
|
||||||
|
@ -44,7 +44,7 @@ class CreateJob(tables.LinkAction):
|
||||||
class DeleteJob(tables.DeleteAction):
|
class DeleteJob(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Job Template",
|
u"Delete Job Template",
|
||||||
u"Delete Job Templates",
|
u"Delete Job Templates",
|
||||||
count
|
count
|
||||||
|
@ -52,7 +52,7 @@ class DeleteJob(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Job Template",
|
u"Deleted Job Template",
|
||||||
u"Deleted Jobs Templates",
|
u"Deleted Jobs Templates",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -15,7 +15,7 @@ import json
|
||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import json
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
import json
|
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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
from django.http import Http404 # noqa
|
from django.http import Http404 # noqa
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils import http
|
from django.utils import http
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
from django.utils.translation import ngettext_lazy
|
||||||
from django.utils.translation import pgettext_lazy
|
from django.utils.translation import pgettext_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils.translation import ungettext_lazy
|
|
||||||
from saharaclient.api import base as api_base
|
from saharaclient.api import base as api_base
|
||||||
|
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
|
@ -50,7 +50,7 @@ class JobExecutionGuide(tables.LinkAction):
|
||||||
class DeleteJob(tables.DeleteAction):
|
class DeleteJob(tables.DeleteAction):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Delete Job",
|
u"Delete Job",
|
||||||
u"Delete Jobs",
|
u"Delete Jobs",
|
||||||
count
|
count
|
||||||
|
@ -58,7 +58,7 @@ class DeleteJob(tables.DeleteAction):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Deleted Job",
|
u"Deleted Job",
|
||||||
u"Deleted Jobs",
|
u"Deleted Jobs",
|
||||||
count
|
count
|
||||||
|
@ -71,7 +71,7 @@ class DeleteJob(tables.DeleteAction):
|
||||||
class ReLaunchJobExistingCluster(j_t.ChoosePlugin):
|
class ReLaunchJobExistingCluster(j_t.ChoosePlugin):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Launch Job",
|
u"Launch Job",
|
||||||
u"Launch Jobs",
|
u"Launch Jobs",
|
||||||
count
|
count
|
||||||
|
@ -79,7 +79,7 @@ class ReLaunchJobExistingCluster(j_t.ChoosePlugin):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Launched Job",
|
u"Launched Job",
|
||||||
u"Launched Jobs",
|
u"Launched Jobs",
|
||||||
count
|
count
|
||||||
|
@ -104,7 +104,7 @@ class ReLaunchJobExistingCluster(j_t.ChoosePlugin):
|
||||||
class ReLaunchJobNewCluster(ReLaunchJobExistingCluster):
|
class ReLaunchJobNewCluster(ReLaunchJobExistingCluster):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Launch Job",
|
u"Launch Job",
|
||||||
u"Launch Jobs",
|
u"Launch Jobs",
|
||||||
count
|
count
|
||||||
|
@ -112,7 +112,7 @@ class ReLaunchJobNewCluster(ReLaunchJobExistingCluster):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_past(count):
|
def action_past(count):
|
||||||
return ungettext_lazy(
|
return ngettext_lazy(
|
||||||
u"Launched Job",
|
u"Launched Job",
|
||||||
u"Launched Jobs",
|
u"Launched Jobs",
|
||||||
count
|
count
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import tabs
|
from horizon import tabs
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
from django import template
|
from django import template
|
||||||
from django.template import defaultfilters
|
from django.template import defaultfilters
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
import abc
|
import abc
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.utils.translation import ungettext_lazy
|
from django.utils.translation import ngettext_lazy
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
@ -24,38 +24,38 @@ from horizon import tables
|
||||||
|
|
||||||
MESSAGE_MAPPING_PRESENT = {
|
MESSAGE_MAPPING_PRESENT = {
|
||||||
'public': functools.partial(
|
'public': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Make public",
|
u"Make public",
|
||||||
u"Make public"),
|
u"Make public"),
|
||||||
'private': functools.partial(
|
'private': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Make private",
|
u"Make private",
|
||||||
u"Make private"),
|
u"Make private"),
|
||||||
'protected': functools.partial(
|
'protected': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Make protected",
|
u"Make protected",
|
||||||
u"Make protected"),
|
u"Make protected"),
|
||||||
'unprotected': functools.partial(
|
'unprotected': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Make unprotected",
|
u"Make unprotected",
|
||||||
u"Make unprotected"),
|
u"Make unprotected"),
|
||||||
}
|
}
|
||||||
|
|
||||||
MESSAGE_MAPPING_PAST = {
|
MESSAGE_MAPPING_PAST = {
|
||||||
'public': functools.partial(
|
'public': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Made public",
|
u"Made public",
|
||||||
u"Made public"),
|
u"Made public"),
|
||||||
'private': functools.partial(
|
'private': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Made private",
|
u"Made private",
|
||||||
u"Made private"),
|
u"Made private"),
|
||||||
'protected': functools.partial(
|
'protected': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Made protected",
|
u"Made protected",
|
||||||
u"Made protected"),
|
u"Made protected"),
|
||||||
'unprotected': functools.partial(
|
'unprotected': functools.partial(
|
||||||
ungettext_lazy,
|
ngettext_lazy,
|
||||||
u"Made unprotected",
|
u"Made unprotected",
|
||||||
u"Made unprotected"),
|
u"Made unprotected"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -15,8 +15,8 @@ from pytz import timezone as ptz
|
||||||
|
|
||||||
from django.template import defaultfilters as filters
|
from django.template import defaultfilters as filters
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import ugettext
|
from django.utils.translation import gettext
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
import sahara_dashboard.content.data_processing. \
|
import sahara_dashboard.content.data_processing. \
|
||||||
|
@ -204,6 +204,6 @@ ALLOWED_STATUSES = {
|
||||||
# Cluster status and suitable warning message that will be displayed
|
# Cluster status and suitable warning message that will be displayed
|
||||||
# in the Job Launch form
|
# in the Job Launch form
|
||||||
STATUS_MESSAGE_MAP = {
|
STATUS_MESSAGE_MAP = {
|
||||||
"Error": ugettext("You\'ve chosen a cluster that is in \'Error\' state. "
|
"Error": gettext("You\'ve chosen a cluster that is in \'Error\' state. "
|
||||||
"Appropriate execution of the job can't be guaranteed."),
|
"Appropriate execution of the job can't be guaranteed."),
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 exceptions
|
||||||
from openstack_dashboard.api import neutron
|
from openstack_dashboard.api import neutron
|
||||||
|
|
|
@ -15,7 +15,7 @@ from oslo_log import log as logging
|
||||||
|
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.utils import safestring
|
from django.utils import safestring
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
||||||
PANEL_GROUP = 'data_processing'
|
PANEL_GROUP = 'data_processing'
|
||||||
|
|
Loading…
Reference in New Issue