Skip to content

Review src/common/sheets.cpp#218

Merged
janrysavy merged 1 commit intocomments-translation-v2from
codex/common-sheets-cpp-review
Apr 2, 2026
Merged

Review src/common/sheets.cpp#218
janrysavy merged 1 commit intocomments-translation-v2from
codex/common-sheets-cpp-review

Conversation

@janrysavy
Copy link
Copy Markdown
Owner

Summary

  • review translation update for src/common/sheets.cpp
  • lands seven comment-only wording fixes in layout and property-sheet code

Review

  • HTML artifact: /mnt/d/source/ostranslation/artifacts/src-common-sheets-cpp-review-20260401/triple-diff-report.html
  • Inline review context comments include Czech source blocks and one-line rationales

Applied the approved branch-target review result for src/common/sheets.cpp. The landed patch contains seven comment-only wording fixes in layout and property-sheet code.

The first two changes restore source-level contract details for geometry bookkeeping by explicitly preserving the MoveCtrlsY identifier and the ResizeCtrls relation to the envelope bottom edge. Several later changes remove unsupported interpretation from the current English, for example replacing notify the object with the source-faithful information that the window was detached, dropping an unsupported finally before DialogProc, and replacing hosted child dialog with the simpler child dialog from the source.

The final change in the tree-measurement note keeps the first warning line but repairs the second line into natural English that states the real outcome: RECT r ends up containing random data if expansion is skipped.

No other artifact changes were carried over. I copied the reviewed draft file from artifacts/src-common-sheets-cpp-review-20260401, confirmed the worktree diff only contains the intended comment updates in src/common/sheets.cpp, and then ran node --experimental-strip-types src/comment-guard.ts --target-root /mnt/d/source/OpenSal/salamander_codex_pr --artifacts-dir /mnt/d/source/ostranslation/artifacts/src-common-sheets-cpp-review-20260401 --selected-files src/common/sheets.cpp with exit code 0 before committing.
ScreenToClient(HWindow, &p);
int envelopeBottom = p.y;
// store each moving control's Y offset measured from the envelope's bottom edge
// 'MoveCtrlsY' coordinates will be relative to the envelope's bottom edge
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

// souradnice 'MoveCtrlsY' budou vztazene od spodni hrany obalky

Rationale: The quoted identifier is part of the source comment's contract semantics and should be preserved explicitly.

MoveCtrls[i].Pos.y = envelopeBottom - MoveCtrls[i].Pos.y;

// cache how far each resizable control's bottom edge sits above that envelope
// for ResizeCtrls elements, store their bottom-edge distance from the envelope's bottom edge
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

// pro prvky ResizeCtrls ulozime jejich vzdalenost spodni hrany od spodni hrany obalky

Rationale: The source explicitly names ResizeCtrls and describes a stored geometric relation; preserving that identifier restores the intended meaning.

delete dlg;
else
dlg->HWindow = NULL; // notify the object that the window was detached
dlg->HWindow = NULL; // information that the window was detached
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

// informace o odpojeni

Rationale: Source says 'information about detachment', not an imperative 'notify the object'.

}
}
// finally call the dialog object's DialogProc(...)
// call the DialogProc(...) method of the corresponding dialog object
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

//--- zavolani metody DialogProc(...) prislusneho objektu dialogu

Rationale: zavolani is just 'call'; finally is unsupported by the evidence.

return dlg->DialogProc(uMsg, wParam, lParam);
else
return FALSE; // report an error or that the message missed the WM_INITDIALOG...WM_DESTROY window
return FALSE; // error, or the message did not arrive between WM_INITDIALOG and WM_DESTROY
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

// chyba nebo message neprisla mezi WM_INITDIALOG a WM_DESTROY

Rationale: Candidate is awkward and distorts the meaning of 'neprisla mezi' into 'missed the window'.

CaptionHeight,
SWP_NOZORDER));
// hosted child dialog
// child dialog
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

// child dialog

Rationale: hosted adds meaning not supported by the source or code context.

tvis.item.state = 0;
// NOTE: expandable items must be expanded here, otherwise TreeView_GetItemRect() later returns FALSE
// and random data in the RECT r rectangle
// and the RECT r rectangle contains random data
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

// POZOR: expandovatelne polozky zde musime expandovat, jinak nasledne TreeView_GetItemRect() vrati FALSE
// a nahodna data v obdelniku RECT r

Rationale: The first line is fine, but the second is not natural English; the code-grounded meaning is that RECT r ends up holding garbage data if expansion is skipped.

@janrysavy janrysavy merged commit cc8d25c into comments-translation-v2 Apr 2, 2026
3 checks passed
@janrysavy janrysavy deleted the codex/common-sheets-cpp-review branch April 2, 2026 08:46
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.

2 participants