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

Redirect to newly translate page's edit view when submitting a translation for a single locale #518

Merged
merged 5 commits into from
Feb 10, 2022

Conversation

mixxorz
Copy link
Contributor

@mixxorz mixxorz commented Feb 8, 2022

When an editor decides to submit a page for translation and only chooses one locale, they are redirected to the new translated page's edit view.

When an editor decides to submit a page for translation and only chooses
one locale, they are redirected to the new translated page's edit view.
Copy link
Collaborator

@zerolab zerolab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @mixxorz.
Got a couple of minor changes then this is good to go

wagtail_localize/views/submit_translations.py Outdated Show resolved Hide resolved
This ensures that by default, the submit translation view redirects to
where it's supposed to go:

* When translating to one locale, go to the edit page of the new
  page/snippet
* When translating to multiple locales, go back to the parent page's
  explore view

The ability to route to an explicit "next" URL is kept if for some
reason we wanted to redirect the user to a non-default location.
Copy link
Collaborator

@zerolab zerolab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @mixxorz

@zerolab zerolab merged commit e84cbc1 into wagtail:main Feb 10, 2022
@zerolab zerolab added this to the 1.1 milestone Feb 10, 2022
@mixxorz mixxorz deleted the submit-page-for-translation-redirect branch February 10, 2022 11:03
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

Successfully merging this pull request may close these issues.

2 participants