integreat-cms
integreat-cms copied to clipboard
Add bulk action to reset `currently_in_translation` status
Motivation
From time to time, some regions export all pages as XLIFF to get an offer from a translation office, but then don't want to accept it. In these cases, it would be very cumbersome to click through the entire page tree to abort the translation process for every single page.
Proposed Solution
Add a bulk action to abort the translation process for multiple pages at once. To avoid confusion with the existing bulk actions and to reduce complexity, I would only show this bulk action if at least one page of the current language is currently in translation.
Alternatives
At the moment, I do this with a simple DB query on the production system:
PageTranslation.objects.filter(language__slug="language_slug", page__region__slug="region_slug").update(currently_in_translation=False)
We could also convert this to a management command to allow this task e.g. via:
$ integreat-cms-cli cancel-translation-process <region_slug> <language_slug>
However, this would still require a server admin to manually perform the task, so I would prefer the bulk action.
Isn't such important any more after we do not export xlifss so often. (after MT was implemented). If we have resources, we can implement that but no urgency.
I'm nearly done with this ticket so would like to finish it in the next days