From 0f61d97a5d6fa5e14b671e2de928d952c6ceb4ec Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 16 May 2025 17:43:31 +0100 Subject: [PATCH] Improve dates in heatmap tooltips --- app/assets/javascripts/heatmap.js | 2 +- config/locales/en.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/heatmap.js b/app/assets/javascripts/heatmap.js index 11a74597f..3cdee0f62 100644 --- a/app/assets/javascripts/heatmap.js +++ b/app/assets/javascripts/heatmap.js @@ -65,7 +65,7 @@ $(function () { } function getTooltipText(date, value) { - const localizedDate = OSM.i18n.l("date.formats.long", date); + const localizedDate = OSM.i18n.l("date.formats.heatmap", date); if (value > 0) { return OSM.i18n.t("javascripts.heatmap.tooltip.contributions", { count: value, date: localizedDate }); diff --git a/config/locales/en.yml b/config/locales/en.yml index a77f46623..6dae7ba51 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,6 +1,9 @@ en: html: dir: ltr + date: + formats: + heatmap: "%B %-d" time: formats: friendly: "%e %B %Y at %H:%M" -- 2.39.5