Skip to content

Bugfix: Show UP_TO_DATE translation status when a translation is manually updated without changes - #4411

Merged
seluianova merged 1 commit into
developfrom
4397-a-previously-machine-translated-page-that-is-outdated-will-go-back-to-machine-translated-status-after-being-updated
Jul 8, 2026
Merged

Bugfix: Show UP_TO_DATE translation status when a translation is manually updated without changes#4411
seluianova merged 1 commit into
developfrom
4397-a-previously-machine-translated-page-that-is-outdated-will-go-back-to-machine-translated-status-after-being-updated

Conversation

@seluianova

@seluianova seluianova commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Short description

For some historical reasons, when a user saved a translation without content changes, we saved it as a major edit.
Only if there were any other changes on the form, except for the title or content fields, did we save it as a minor edit.

After this change was introduced, we started saving translations without content changes as minor edits.
This introduced the following side effect:
When a user manually updated a machine-translated page without any content changes, it did not change the status from "machine translated" to "up-to-date" (check mark).
Because we defined translation state based on the last major version.

Proposed changes

  • When a translation has no content changes, always save it as a minor edit (Previous behavior: only when translation had no content changes BUT other fields on the form were changed, it was saved as a minor edit)
  • Adjust the translation_state property: use the last public or draft version to determine the translation state (Previous behavior: the last major version was used)

Side effects

I could not find any, but careful testing is needed.

Faithfulness to issue description and design

There are no intended deviations from the issue and design.

How to test

Resolved issues

Fixes: #4397


Pull Request Review Guidelines

Comment thread integreat_cms/cms/forms/custom_content_model_form.py

@MizukiTemma MizukiTemma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good 😄

@hannaseithe
hannaseithe self-requested a review July 8, 2026 06:29

@hannaseithe hannaseithe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change looks good to me.

I would suggest to add some tests though, both for the translation_state logic and for the minor_edit flag - just to reduce the regression risk around this rather complex business logic. At the minimum I would suggest a test that checks for the "veraltete machine translated status -> no content update -> UP_TO_DATE state"

Comment thread integreat_cms/cms/forms/custom_content_model_form.py Outdated
@seluianova

seluianova commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

At the minimum I would suggest a test that checks for the "veraltete machine translated status -> no content update -> UP_TO_DATE state"

I agree, I added exactly this test in my another PR: #4399
It just needs to be updated a bit after this PR is merged (currently it checks the previous state - "veraltete machine translated status -> no content update -> up-to-date machine translated")
I will also add a check for minor_edit flag there.

UPD. okay it is not exactly the same, but I would prefer to continue with tests in 4399 anyway, because I also did some test refactoring there to simplify test creation. Would this be fine for you? @hannaseithe

@seluianova
seluianova force-pushed the 4397-a-previously-machine-translated-page-that-is-outdated-will-go-back-to-machine-translated-status-after-being-updated branch from e7c859c to f80a2ca Compare July 8, 2026 08:18
@seluianova
seluianova force-pushed the 4397-a-previously-machine-translated-page-that-is-outdated-will-go-back-to-machine-translated-status-after-being-updated branch from f80a2ca to e99ad62 Compare July 8, 2026 08:21
@seluianova
seluianova merged commit 4c8923f into develop Jul 8, 2026
5 checks passed
@seluianova
seluianova deleted the 4397-a-previously-machine-translated-page-that-is-outdated-will-go-back-to-machine-translated-status-after-being-updated branch July 8, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A previously machine translated page that is outdated will go back to 'machine translated' status after being Updated.

3 participants