Drop use of features removed in Django 4.0
These functions were deprecated in Django 3.0 and have been removed in Django 4.0. Switch to the functions they were aliased to. Closes-Bug: #2039226 Change-Id: I2180b1ccae7ca377aa5d4586bd3c5562512b5e98
This commit is contained in:
parent
eaf8db4c84
commit
08a7342e94
@ -436,7 +436,7 @@ function run_integration_tests {
|
||||
function babel_extract {
|
||||
DOMAIN=$1
|
||||
KEYWORDS="-k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2"
|
||||
KEYWORDS+=" -k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2"
|
||||
KEYWORDS+=" -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2"
|
||||
KEYWORDS+=" -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3"
|
||||
|
||||
${command_wrapper} pybabel extract -F ../babel-${DOMAIN}.cfg -o locale/${DOMAIN}.pot $KEYWORDS .
|
||||
|
@ -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 openstack_dashboard.api import base
|
||||
from watcherclient import client as wc
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -17,9 +17,9 @@ import logging
|
||||
|
||||
from django.template.defaultfilters import title # noqa
|
||||
from django import urls
|
||||
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
|
||||
import horizon.exceptions
|
||||
import horizon.messages
|
||||
import horizon.tables
|
||||
@ -55,7 +55,7 @@ class ArchiveActionPlan(horizon.tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Archive Action Plan",
|
||||
u"Archive Action Plans",
|
||||
count
|
||||
@ -63,7 +63,7 @@ class ArchiveActionPlan(horizon.tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Action Plan archived",
|
||||
u"Action Plans archived",
|
||||
count
|
||||
@ -81,7 +81,7 @@ class StartActionPlan(horizon.tables.BatchAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Start Action Plan",
|
||||
u"Start Action Plans",
|
||||
count
|
||||
@ -89,7 +89,7 @@ class StartActionPlan(horizon.tables.BatchAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Action Plan started",
|
||||
u"Action Plans started",
|
||||
count
|
||||
|
@ -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 _
|
||||
from horizon import tabs
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon.exceptions
|
||||
from horizon import forms
|
||||
import horizon.tables
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -17,8 +17,8 @@ import logging
|
||||
|
||||
from django.template.defaultfilters import title # noqa
|
||||
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 _
|
||||
import horizon.exceptions
|
||||
import horizon.messages
|
||||
import horizon.tables
|
||||
|
@ -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 _
|
||||
from horizon import tabs
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import collections
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon.exceptions
|
||||
import horizon.tables
|
||||
import horizon.tabs
|
||||
|
@ -20,7 +20,7 @@ import logging
|
||||
|
||||
from django.core import exceptions as core_exc
|
||||
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
|
||||
from horizon import messages
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
import horizon.exceptions
|
||||
import horizon.messages
|
||||
import horizon.tables
|
||||
@ -49,7 +49,7 @@ class LaunchAudit(horizon.tables.BatchAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
"Launch Audit",
|
||||
"Launch Audits",
|
||||
count
|
||||
@ -57,7 +57,7 @@ class LaunchAudit(horizon.tables.BatchAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
"Launched Audit",
|
||||
"Launched Audits",
|
||||
count
|
||||
@ -76,7 +76,7 @@ class ArchiveAuditTemplates(horizon.tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
"Archive Template",
|
||||
"Archive Templates",
|
||||
count
|
||||
@ -84,7 +84,7 @@ class ArchiveAuditTemplates(horizon.tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
"Archived Template",
|
||||
"Archived Templates",
|
||||
count
|
||||
|
@ -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 _
|
||||
from horizon import tabs
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ import json
|
||||
import logging
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon.exceptions
|
||||
from horizon import forms
|
||||
import horizon.tables
|
||||
|
@ -19,7 +19,7 @@ Forms for starting Watcher Audits.
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
from django import shortcuts
|
||||
from django.template.defaultfilters import title # noqa
|
||||
from django import urls
|
||||
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
|
||||
import horizon.exceptions
|
||||
import horizon.messages
|
||||
import horizon.tables
|
||||
@ -88,7 +88,7 @@ class ArchiveAudits(horizon.tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
"Archive Audit",
|
||||
"Archive Audits",
|
||||
count
|
||||
@ -96,7 +96,7 @@ class ArchiveAudits(horizon.tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
"Archived Audit",
|
||||
"Archived Audits",
|
||||
count
|
||||
|
@ -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 _
|
||||
from horizon import tabs
|
||||
|
||||
|
||||
|
@ -17,7 +17,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 _
|
||||
import horizon.exceptions
|
||||
from horizon import forms
|
||||
import horizon.tables
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django.template.defaultfilters import title # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon.exceptions
|
||||
import horizon.messages
|
||||
import horizon.tables
|
||||
|
@ -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 _
|
||||
from horizon import tabs
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon.exceptions
|
||||
import horizon.tables
|
||||
import horizon.tabs
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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.exceptions
|
||||
import horizon.messages
|
||||
import horizon.tables
|
||||
|
@ -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 _
|
||||
from horizon import tabs
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import horizon.exceptions
|
||||
import horizon.tables
|
||||
import horizon.tabs
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
|
||||
PANEL_GROUP = 'watcher'
|
||||
|
Loading…
Reference in New Issue
Block a user