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

Translation path from wagtailtrans to wagtail-localize #297

Open
ceelian opened this issue Jan 8, 2021 · 6 comments
Open

Translation path from wagtailtrans to wagtail-localize #297

ceelian opened this issue Jan 8, 2021 · 6 comments

Comments

@ceelian
Copy link

ceelian commented Jan 8, 2021

Is there a migration path from wagtailtrans for existing installations to the new native translation system with wagtail-localize?

(As I am not aware to which project it may concern also added this in wagtail/wagtailtrans#208)

@kaedroho
Copy link
Contributor

kaedroho commented Jan 8, 2021

There's not really any overlap between Wagtail Localize and Wagtail trans since Wagtail Localize is a UI built on top of Wagtail's builtin translation models. Documentation for this is coming though!

I expect the move from Wagtail Trans to look like:

  • Install Wagtail 2.11
  • Replace wagtailtrans with a forked version that includes a data migration to port the data in TranslatablePage to Wagtail's builtin fields.
  • Remove the translation root page (probably have to do this manually)

@ceelian
Copy link
Author

ceelian commented Jan 8, 2021

Thank you for the quick reply. I think I got the idea.

Install Wagtail 2.11

Hmm, that's not possible as wagtailtrans prevents the installation of wagtail 2.11. So I will try to fork wagtailtrans first and change that limitation to install it.

@ceelian
Copy link
Author

ceelian commented Jan 10, 2021

I finally managed to create a migration path. Because it finally needed some more steps as expected I wrote a blog post about it. I also created the necessary fork of wagtailtrans at https://github.com/carrotandcompany/wagtailtrans

If anyone has any suggestions, improvements, bugfixes to the migration path or the migration fork, I am happy to update the migration guide. Hope this is helpful for others as well.

@kaedroho thanks for the initial idea on how to execute the migration

@mentecuantica
Copy link

@ceelian Hi, didn't you received an error like MainPage has no field named 'canonical_page' during your migration path?

@ceelian
Copy link
Author

ceelian commented Jan 13, 2021

@mentecuantica I don't think so, at which step did the error occur?

@JA-RO
Copy link

JA-RO commented Aug 5, 2021

@ceelian Hi, i'm following the steps on your blog post to migrate from wagtailtrans, but when i run the modified migration on step 4 i get the following error:

 line 11, in transfer_ids
    page.page_ptr = page.translatable_page_ptr
AttributeError: 'BasePage' object has no attribute 'translatable_page_ptr'

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

4 participants