Skip to content
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

Move tree synchronisation feature into Wagtail core #386

Open
4 tasks
kaedroho opened this issue May 5, 2021 · 4 comments
Open
4 tasks

Move tree synchronisation feature into Wagtail core #386

kaedroho opened this issue May 5, 2021 · 4 comments

Comments

@kaedroho
Copy link
Contributor

kaedroho commented May 5, 2021

The tree synchronisation feature creates alias pages of all the content in one locale into another. This is configured using the "Synchronise from" field on the locale.

Merging this feature into Wagtail core will simplify things a little bit. Firstly it removes the need for the wagtail_localize.locales app and makes Wagtail Localize purely a translation app. This change would also allow the tree synchronisation feature to be used by other translation apps

We should add this field directly on Wagtail core's Locale model (currently it's on wagtaillocalize.LocaleSynchronisation) and move the synctree.py module into Wagtail core somewhere.

Before this move, we should solve the following issues:

@kaedroho
Copy link
Contributor Author

Need to consider if this is a blocker too: #469

@zerolab
Copy link
Collaborator

zerolab commented Feb 23, 2022

Page tree sync added to core simple_translation in wagtail/wagtail#7548

@chris48s
Copy link
Collaborator

The code in wagtail/wagtail#7548 is something of a partial solution. It adds the after_create_page hook to core, so if you enable WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE then it will create mirrors for any new pages you create after that point, but it doesn't port anything comparable to sync_trees_on_locale_sync_save so if you enable a new locale on a site with existing content, any existing content won't be mirrored.
We've noted that adding new locales to sites with a lot of existing content is a place where you can run into performance issues with the localize approach so perhaps that is a reason why we've chosen not to port that bit, but just wanted to note the constraint here.

@zerolab
Copy link
Collaborator

zerolab commented Feb 25, 2022

I agree. I suppose I was thinking for new sites when I posted the comment above.

We do have a note to add a background worker mecahnism for the full tree sync to avoid the performance issues. This is where wagtail/rfcs#72 would come in handy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants