From 58865f0534a41c03950174a7000ad5969063bd2e Mon Sep 17 00:00:00 2001 From: niharchakravarti Date: Wed, 17 Jun 2026 00:06:44 +0530 Subject: [PATCH] Fix singular row count label Bug: T419564 Change-Id: Idaa739f08156f0a18440a40b282f0ce032c629f4 --- quarry/web/static/templates/compiled.js | 11 ++++++++++- quarry/web/static/templates/query-resultset.html | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/quarry/web/static/templates/compiled.js b/quarry/web/static/templates/compiled.js index 15db419..40ed791 100644 --- a/quarry/web/static/templates/compiled.js +++ b/quarry/web/static/templates/compiled.js @@ -18,7 +18,16 @@ output += "\n "; } output += "\n ("; output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "rowcount"), env.opts.autoescape); -output += " rows)\n \n
\n
\n \n
    \n "; +output += " "; +if(runtime.contextOrFrameLookup(context, frame, "rowcount") == 1) { +output += "row"; +; +} +else { +output += "rows"; +; +} +output += ")\n
\n
\n
\n \n
    \n "; frame = frame.push(); var t_3 = {"tsv": "TSV","json": "JSON","json-lines": "JSON Lines","csv": "CSV","wikitable": "Wikitable","html": "HTML"}; if(t_3) {var t_1; diff --git a/quarry/web/static/templates/query-resultset.html b/quarry/web/static/templates/query-resultset.html index cc18caf..87f5f42 100644 --- a/quarry/web/static/templates/query-resultset.html +++ b/quarry/web/static/templates/query-resultset.html @@ -6,7 +6,7 @@ {% else %} Resultset {{ resultset_number }} {% endif %} - ({{rowcount}} rows) + ({{ rowcount }} {% if rowcount == 1 %}row{% else %}rows{% endif %})