diff --git a/docs/how-to/installation.md b/docs/how-to/installation.md index e76adf36..a61cf16e 100644 --- a/docs/how-to/installation.md +++ b/docs/how-to/installation.md @@ -57,7 +57,7 @@ class MyPage(Page): ## Disabling default publication of translated pages Live pages that are submitted for translation are made live immediately. If you wish live pages submitted for -translatio to remain as drafts, set `WAGTAILLOCALIZE_SYNC_LIVE_STATUS_ON_TRANSLATE = False` in your settings file. +translation to remain as drafts, set `WAGTAILLOCALIZE_SYNC_LIVE_STATUS_ON_TRANSLATE = False` in your settings file. ## Control translation cleanup mode diff --git a/wagtail_localize/tests/test_submit_translations.py b/wagtail_localize/tests/test_submit_translations.py index d83b24ec..9b270fe3 100644 --- a/wagtail_localize/tests/test_submit_translations.py +++ b/wagtail_localize/tests/test_submit_translations.py @@ -242,6 +242,25 @@ def test_post_submit_page_translation(self): response, reverse("wagtailadmin_pages:edit", args=[translated_page.id]) ) + @override_settings(WAGTAILLOCALIZE_SYNC_LIVE_STATUS_ON_TRANSLATE=False) + def test_post_submit_page_translation_draft(self): + self.client.post( + reverse( + "wagtail_localize:submit_page_translation", + args=[self.en_blog_index.id], + ), + {"locales": [self.fr_locale.id]}, + ) + + translation = Translation.objects.get() + self.assertEqual(translation.source.locale, self.en_locale) + self.assertEqual(translation.target_locale, self.fr_locale) + self.assertTrue(translation.created_at) + + # The translated page should've been created and published + translated_page = self.en_blog_index.get_translation(self.fr_locale) + self.assertFalse(translated_page.live) + def test_post_submit_page_translation_submits_linked_snippets(self): self.en_blog_index.test_snippet = TestSnippet.objects.create( field="My test snippet"