fix "1 commits" fixes #601

Wed, 19 Feb 2025 18:14:12 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 19 Feb 2025 18:14:12 +0100
changeset 35
d75805c1e3b9
parent 34
cc9d74d5eb46
child 36
e223879aa02a

fix "1 commits" fixes #601

src/html.cpp file | annotate | diff | comparison | revisions
--- a/src/html.cpp	Wed Feb 19 18:12:10 2025 +0100
+++ b/src/html.cpp	Wed Feb 19 18:14:12 2025 +0100
@@ -213,11 +213,12 @@
         color_class = "commit-spam";
     }
     indent();
-    printf("<td class=\"%s\" title=\"%s, %d-%02u-%02u: %u commits\"></td>\n",
+    printf("<td class=\"%s\" title=\"%s, %d-%02u-%02u: %u %s\"></td>\n",
         color_class,
         weekdays[weekday(ymd).iso_encoding() - 1],
         static_cast<int>(ymd.year()),
         static_cast<unsigned>(ymd.month()),
         static_cast<unsigned>(ymd.day()),
-        commits);
+        commits,
+        commits == 1 ? "commit" : "commits");
 }

mercurial