wagtail / wagtailtrans

A Wagtail add-on for supporting multilingual sites
http://wagtailtrans.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
104 stars 60 forks source link

Translate a page dropdown tree #190

Open jkevingutierrez opened 4 years ago

jkevingutierrez commented 4 years ago

Found a bug, please fill out the sections below

Issue summary

Having a big page tree, the "Parent page" dropdown could be messy. Especially, if there are pages with the same name as children of different pages.

image

It would be great to have something similar to the PageChooserPanel to select the parent page.

If not possible, it would be great to make more visible the hierarchy in the dropdown. Something like:

image

How to reproduce?

Having something like

/   (TranslatableSiteRootPage)
    en/        (TransHomePage)
        subpage-1/    (TransLandingPage)
            subsubpage-1/    (TransLandingPage)
                mypage/    (TransLandingPage)
            subsubpage-2/    (TransLandingPage)
        subpage-2/    (TransLandingPage)
            subsubpage-1/    (TransLandingPage)
            subsubpage-2/    (TransLandingPage)

    es/        (TransHomePage)
        subpage-1/    (TransLandingPage)
            subsubpage-1/    (TransLandingPage)
            subsubpage-2/    (TransLandingPage)
        subpage-2/    (TransLandingPage)
            subsubpage-1/    (TransLandingPage)
            subsubpage-2/    (TransLandingPage)

If I want to translate en -> subpage-1 -> subsubpage-1 -> mypage to es it won't be clear in the "Parent page" dropdown where is the es -> subpage-1 -> subsubpage-1

It would also be good to have a default selected element in the "Parent page" dropdown, or show a "recommended page" help text. Maybe the logic used in WAGTAILTRANS_SYNC_TREE to copy pages in the correct location, could also be used to detect the default or the recommended Parent page?

Technical details

Python 3.8 Django==3.0.9 wagtail==2.10 wagtailtrans==2.1