-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop translations from being automatically published when source is in draft state #511
Conversation
…s are in a draft state.
Hey @AndrewCalderSpringload, thank you for this PR. I do wonder whether it makes more sense to prevent sending a page for translation via the UI if the page is only a draft. In many cases, being only a draft means it is likely not ready. What is your use case? |
@AndrewCalderSpringload any thoughts on the above? |
Hi Dan, sorry for the delay in getting back to you.
The use case is, the editor wants to review and approve both the original
and translated versions of a page before publishing.
…On Fri, 18 Feb 2022 at 04:28, Dan Braghis ***@***.***> wrote:
@AndrewCalderSpringload <https://github.com/AndrewCalderSpringload> any
thoughts on the above?
—
Reply to this email directly, view it on GitHub
<#511 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV7WAQFGEMYDJRD43LSGOW3U3UHX5ANCNFSM5M4PDAUQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
*Andrew Calder* | he/his* | Senior Back End Developer | Springload | Te
Pipītanga
www.springload.co.nz
p: +64 4801 8205
LinkedIn: Springload <https://nz.linkedin.com/company/springload>
Twitter: Springloadnz <https://twitter.com/springloadnz>
Instagram: Springloadnz <https://www.instagram.com/springloadnz/>
We’re a certified B Corp committed to making the things that matter, better.
Check out our newsletter
<https://us17.campaign-archive.com/home/?u=fa183633fac91f88995b5dedc&id=d06154c2f2>
for the latest learnings, events, and workshops from us.
*Sharing pronouns in this way can help create a safe and inclusive
environment for gender diverse colleagues. Read this article
<https://medium.com/gender-inclusivit/why-i-put-pronouns-on-my-email-signature-and-linkedin-profile-and-you-should-too-d3dc942c8743>
if you'd like to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this one has sat around for a bit.
If we are going to allow translating drafts the translation should be draft too and we seem to have at least 2 users with a use for that rather than blocking the translation so I'm 👍 on this. One small comment from me.
def test_post_submit_page_translation_from_draft_source_still_draft(self): | ||
custom_page = make_test_page( | ||
self.en_homepage, | ||
cls=TestWithTranslationModeDisabledPage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason for picking TestWithTranslationModeDisabledPage
here? It isn't wrong, but this test isn't specifically about what happens when translation mode is off so it kind of distracts from the intent of the test IMO.
Rebased, updated the test and merged in a7b0099. Thank you @AndrewCalderSpringload for the PR and @chris48s for the review |
Stop translations from being automatically published when source is in draft state
The
publish
parameter ofTranslation.save_target()
defaults to True.When
save_target()
is called byTranslationCreator.create_translations()
, translations were saved in a live state even if a source page was in draft (live is False).create_translations()
now uses a page'slive
attribute to determine whether a translation of that page should be published when callingsave_target()
.If for some reason that value can not be determined, a value of True is applied to preserve existing behaviour.
Fixes #553