thunderbird-patch-review

Easy-to-use patch review interface for Thunderbird

Contribute: ~marcc/thunderbird-review-plugin@lists.sr.ht

git clone git://mccd.space/thunderbird-patch-review

commit ddb4bee763b8210aa161971f35336a06b771988f
parent 27552a85b1df73487f327ccc9da214dadacdf224
Author: Pi Agent <agent@pi.local>
Date:   Sat, 18 Jul 2026 22:29:22 +0200

review: pluralize Send review -> Send reviews when more than one patch has a comment

Diffstat:
Mextension/review/review.js | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/extension/review/review.js b/extension/review/review.js
@@ -476,6 +476,9 @@ function updateCount() {
   const canSend = total > 0 || state.isSourcehut;
   $("#btn-send").disabled = !canSend;
   $("#send-split").querySelector(".menu-toggle").disabled = !canSend;
+  // One reply per commented patch — pluralize the button to match.
+  const commented = state.series.filter((_, i) => Object.keys(state.comments[i]).length).length;
+  $("#btn-send").firstChild.nodeValue = commented === 1 ? "Send review" : "Send reviews";
 }
 
 $("#btn-discard").addEventListener("click", async () => {
@@ -570,11 +573,14 @@ function openSendConfirm(mode) {
   const commented = state.series.filter((_, i) =>
     Object.keys(state.comments[i]).length
   ).length;
-  $("#send-confirm-title").textContent = mode === "preview" ? "Preview review" : "Send review";
-  $("#btn-send-confirm").textContent = mode === "preview" ? "Open in compose" : "Send review";
+  const verbSent = mode === "preview" ? "open in compose" : commented === 1 ? "send review" : "send reviews";
+  $("#send-confirm-title").textContent =
+    mode === "preview" ? "Preview review" : commented === 1 ? "Send review" : "Send reviews";
+  $("#btn-send-confirm").textContent =
+    mode === "preview" ? "Open in compose" : commented === 1 ? "Send review" : "Send reviews";
   $("#send-confirm-summary").textContent =
     `${commented} of ${n} patch${n === 1 ? "" : "es"} has a comment; ` +
-    `click ${mode === "preview" ? "open in compose" : "send review"} to continue.`;
+    `click ${verbSent} to continue.`;
   $("#send-confirm").hidden = false;
 }