Files
wordcraft/crates/engine/src
42f8559b97 Review › Language: set the whole document's proofing language (#3518) (#5810)
* #3518: Review › Language can set the whole document's proofing language

review.language takes scope "selection" (default, unchanged) or "document":
every run and paragraph mark of every story (body, headers, footers, notes,
comments, text boxes, table cells, glossary) takes lang/noProof in one undo
step, selection unchanged, pending typing format follows. The Language dialog
gets an "Apply to the whole document" check box.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCVCCEo7u5wetHaJRU4

* #3518: whole-document OK sends only what was changed in the Language dialog

With "Apply to the whole document" ticked, OK sends noProof only if the user
changed it from the dialog's opening value, and lang if changed or if neither
changed (never the engine's en-US default). Heading reads "Mark the whole
document as:" while ticked. Glossary walker uses doc's PARA_WALK_DEPTH (now pub).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCVCCEo7u5wetHaJRU4

* #3518: whole-document OK with Do not check ticked marks the whole document

CodeRabbit: with the caret's text already not checked, the box was unchanged, so a
whole-document OK never sent noProof and the rest of the document stayed checked.
A ticked box is now always sent; an unticked, unchanged one is still omitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* #3518: refuse whole-document language changes under protection

Protection leaves only its exceptions editable, so document scope is refused before anything changes. The post-check now compares the glossary, which no story-level check reached.

* #3518: whole-document language keeps per-run proofing, returns selection, skips glossary while tracking

- Language dialog: whole-document OK sends noProof only when the box was changed, so a language-only change no longer marks everything no-proof.
- review.language scope "document" returns the caret/selection result (plus scope).
- Whole-document change skips glossary blocks while Track Changes and Track Formatting are on (tracked formatting does not cover them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* #3518: whole-document Do not check is sent when the box is clicked; report skipped glossary

- Language dialog: a whole-document OK sends noProof iff the Do-not-check box was clicked (proof_touched), so ticking it with the caret in a no-proof run still marks the whole document, while a language-only change leaves other runs alone.
- review.language document scope reports "glossarySkipped": true when the glossary was skipped under Track Changes + Track Formatting; doc comment reworded to state only the limitation.
- Docs status line and revision row bumped to 2026-11-16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Martin Ball <martin.ball@ucsmedical.co.uk>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-16 10:05:15 +00:00
..