UpdateTranslationsView: sync draft content if available#884
UpdateTranslationsView: sync draft content if available#884th3hamm0r wants to merge 1 commit intowagtail:mainfrom
Conversation
If the sync is executed with the publish_translations-checkbox unchecked, the latest revision's content is synced to the translations. Fixes wagtail#823
5fbf7f1 to
84a167c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #884 +/- ##
=======================================
Coverage 93.07% 93.07%
=======================================
Files 47 47
Lines 4243 4245 +2
Branches 551 552 +1
=======================================
+ Hits 3949 3951 +2
Misses 175 175
Partials 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I reviewed this code and It solves the issue #823, Attaching a video that showcases this. wagtail.draft.sync.issue.resolved.demo.mp4My review on what is happening now:Two cases: Case 1: (Existing code without this PR changes applied)
Case 2: (Existing code without this PR changes applied)
After applying author's PR changes locally in the code it handles both CASE 1 and CASE 2 (Tested by me locally). So the issue was addressed but It could be enhanced a little. Suggestions as a User: What I felt was each time I have to publish/save draft and then click the three dots to open the pop up to translate the page. This is very redundant in nature. Instead we can have a button say Publish and sync in the bottom view itself or Save draft and sync or Publish and draft sync. This approach would reduce the frequent need of opening the three dots.
(Here we can add new buttons , maybe something which when hovered opens into more buttons "compactness :)" ) @zerolab if you prefer some changes in this PR or my suggestions I am more than happy to work in it and add @th3hamm0r as co-author to solve this issue. |

As noted in #823 (comment) the draft content is not synced, when the "Sync translated pages" action is used.
This allows to change/prepare the content of a source object, without publishing it (yet), and further sync those changes to the translations to prepare those changes to be published later all at once.
I've deviated slightly from my suggestion to introduce a new setting. Instead, the sync only uses the draft content if the "Publish immediately" checkbox is not checked.
What do you think about it? Better use a setting and disable that functionality by default?
Fixes #823