Skip to content

Commit

Permalink
Fix UpdateTranslationsView when machine translation is not enabled
Browse files Browse the repository at this point in the history
Follow up to #807
  • Loading branch information
zerolab committed Dec 24, 2024
1 parent 6d40c66 commit 42de3c2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wagtail-localize-admin",
"version": "1.11.0",
"version": "1.11.1",
"private": "true",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion wagtail_localize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@


# release must be one of alpha, beta, rc, or final
VERSION = (1, 11, 0, "final", 0)
VERSION = (1, 11, 1, "final", 0)

__version__ = get_version(VERSION)
2 changes: 1 addition & 1 deletion wagtail_localize/views/update_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 42de3c2

Please sign in to comment.