Skip to content

Don't warn when leaving an autofilled translation (100% TM match) - #4410

Merged
flodolo merged 2 commits into
mozilla:mainfrom
flodolo:issue4274_confirm_tmautofill
Aug 14, 2026
Merged

flodolo merged 2 commits into
mozilla:mainfrom
flodolo:issue4274_confirm_tmautofill

Conversation

@flodolo

@flodolo flodolo commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes #4274

@flodolo

flodolo commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

I went with this approach of adding a property to make it easier to fix #4403 (originally, only compared the field's content on the assumption that we autofill only for a flat value).

@flodolo flodolo changed the title Don't warn when existing an autofilled translation (100% TM match) Don't warn when leaving an autofilled translation (100% TM match) Aug 14, 2026
@flodolo
flodolo requested a review from mathjazz August 14, 2026 06:51

@mathjazz mathjazz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

While moving between strings with 100% TM matches, the editor menu jump is now more pronouncd than before the fix.

We should reconsider the 100% TM match panel position, but that's a separate issue probably.

Floating bubble near the editor would work better:
Image

Comment thread translate/src/context/Editor.tsx Outdated
const { autofilled, initial } = state;
const hasChanges =
!pojoEquals(initial, result) &&
!(autofilled && pojoEquals(autofilled, result));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: Technically only the setUnsavedChanges() requires the autofill exception — folding it into hasChanges() also impacts resetFailedChecks().

Not sure there's a user-visible impact to this today.

@flodolo

flodolo commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

We should reconsider the 100% TM match panel position, but that's a separate issue probably.

Filed #4411

Will take a look at the other comment, and see if I can clean it up.

@flodolo
flodolo merged commit b7c87a9 into mozilla:main Aug 14, 2026
10 checks passed
@flodolo
flodolo deleted the issue4274_confirm_tmautofill branch August 14, 2026 08:45
mathjazz added a commit that referenced this pull request Aug 14, 2026
The indicator pushed the menu down by its own height on every string
that had a perfect match, and let it back up on every string that didn't.
Moving between such strings made the menu jump, which #4410 made worse by
removing the confirmation dialog that used to slow that movement down.

Show it next to the translation length instead.
mathjazz added a commit that referenced this pull request Aug 15, 2026
The indicator pushed the menu down by its own height on every string
that had a perfect match, and let it back up on every string that didn't.
Moving between such strings made the menu jump, which #4410 made worse by
removing the confirmation dialog that used to slow that movement down.

Show it next to the translation length instead.
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.

Do not ask for confirmation do leave when string translations are autofilled

2 participants