Fix up typo in slug field validation

- See #7730
pull/9719/head
LB Johnston 2022-11-25 21:07:30 +10:00 zatwierdzone przez LB (Ben Johnston)
rodzic 521895037d
commit ef8a970261
5 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -184,7 +184,7 @@ class WagtailAdminPageForm(WagtailAdminModelForm):
"slug",
forms.ValidationError(
_(
"The slug '%(page_slug)s' is already in use in use within the parent page"
"The slug '%(page_slug)s' is already in use within the parent page"
)
% {"page_slug": page_slug}
),

Wyświetl plik

@ -1383,7 +1383,7 @@ class TestCopyPageAction(AdminAPITestCase):
content,
{
"slug": [
"The slug 'events' is already in use in use within the parent page at '/'"
"The slug 'events' is already in use within the parent page at '/'"
]
},
)

Wyświetl plik

@ -717,7 +717,7 @@ class TestPageCreation(TestCase, WagtailTestUtils):
response,
"form",
"slug",
"The slug 'hello-world' is already in use in use within the parent page",
"The slug 'hello-world' is already in use within the parent page",
)
# form should be marked as having unsaved changes for the purposes of the dirty-forms warning

Wyświetl plik

@ -1285,7 +1285,7 @@ class TestPageEdit(TestCase, WagtailTestUtils):
response,
"form",
"slug",
"The slug 'hello-world' is already in use in use within the parent page",
"The slug 'hello-world' is already in use within the parent page",
)
def test_preview_on_edit(self):

Wyświetl plik

@ -1103,7 +1103,7 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
raise ValidationError(
{
"slug": _(
"The slug '%(page_slug)s' is already in use in use within the parent page at '%(parent_url_path)s'"
"The slug '%(page_slug)s' is already in use within the parent page at '%(parent_url_path)s'"
)
% {"page_slug": self.slug, "parent_url_path": parent_page.url}
}