From b619a32cc6410fec28a27c0ce1e305605dcb44c0 Mon Sep 17 00:00:00 2001 From: zerolab Date: Tue, 24 Dec 2024 15:20:29 +0100 Subject: [PATCH] Fix UpdateTranslationsView when machine translation is not enabled Follow up to #807 --- CHANGELOG.md | 9 ++++++++- package.json | 2 +- wagtail_localize/__init__.py | 2 +- wagtail_localize/views/update_translations.py | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4ce7080..9f3f56ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.11.1] - 2025-12-24 + +### Fixed + +- `UpdateTranslationsView` validation when machine translations are not enabled. Follow up to [#807](https://github.com/wagtail/wagtail-localize/pull/807) + ## [1.11] - 2025-12-20 ### Added @@ -378,7 +384,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Make sure field level validation runs when translating snippets](https://github.com/wagtail/wagtail-localize/pull/427) -[unreleased]: https://github.com/wagtail/wagtail-localize/compare/v1.11...HEAD +[unreleased]: https://github.com/wagtail/wagtail-localize/compare/v1.11.1...HEAD +[1.11.1]: https://github.com/wagtail/wagtail-localize/compare/v1.11...v1.11.1 [1.11]: https://github.com/wagtail/wagtail-localize/compare/v1.10...v1.11 [1.10]: https://github.com/wagtail/wagtail-localize/compare/v1.9.1...v1.10 [1.9.1]: https://github.com/wagtail/wagtail-localize/compare/v1.9...v1.9.1 diff --git a/package.json b/package.json index 1422cec7..3331b4d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wagtail-localize-admin", - "version": "1.11.0", + "version": "1.12.0-alpha.0", "private": "true", "repository": { "type": "git", diff --git a/wagtail_localize/__init__.py b/wagtail_localize/__init__.py index acb1e26a..4d75d4d3 100644 --- a/wagtail_localize/__init__.py +++ b/wagtail_localize/__init__.py @@ -2,6 +2,6 @@ # release must be one of alpha, beta, rc, or final -VERSION = (1, 11, 0, "final", 0) +VERSION = (1, 12, 0, "alpha", 0) __version__ = get_version(VERSION) diff --git a/wagtail_localize/views/update_translations.py b/wagtail_localize/views/update_translations.py index f8977aae..026c08fc 100644 --- a/wagtail_localize/views/update_translations.py +++ b/wagtail_localize/views/update_translations.py @@ -156,7 +156,7 @@ def form_valid(self, form): self.object.update_from_db() enabled_translations = self.object.translations.filter(enabled=True) - if form.cleaned_data["use_machine_translation"]: + if form.cleaned_data.get("use_machine_translation"): machine_translator = get_machine_translator() for translation in enabled_translations.select_related("target_locale"): apply_machine_translation(