From 5f86006e07f20bd4379b8f4e19a1303f10127b23 Mon Sep 17 00:00:00 2001 From: Arpan Mukherjee Date: Wed, 25 Mar 2026 00:34:28 +0530 Subject: [PATCH] Rename heatmap to contribution calendar (UI + i18n) --- app/assets/javascripts/heatmap.js | 6 +++--- app/views/profiles/heatmaps/show.html.erb | 2 +- .../profile_sections/_navigation.html.erb | 2 +- app/views/users/show.html.erb | 2 +- config/locales/en.yml | 18 +++++++++--------- .../profiles/heatmaps_controller_test.rb | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/heatmap.js b/app/assets/javascripts/heatmap.js index c60b6bf90..a3f217d00 100644 --- a/app/assets/javascripts/heatmap.js +++ b/app/assets/javascripts/heatmap.js @@ -66,13 +66,13 @@ $(document).on("turbo:frame-load", function () { } function getTooltipText(date, value) { - const localizedDate = OSM.i18n.l("date.formats.heatmap", date); + const localizedDate = OSM.i18n.l("date.formats.contribution_calendar", date); if (value > 0) { - return OSM.i18n.t("javascripts.heatmap.tooltip.contributions", { count: value, date: localizedDate }); + return OSM.i18n.t("javascripts.contribution_calendar.tooltip.contributions", { count: value, date: localizedDate }); } - return OSM.i18n.t("javascripts.heatmap.tooltip.no_contributions", { date: localizedDate }); + return OSM.i18n.t("javascripts.contribution_calendar.tooltip.no_contributions", { date: localizedDate }); } function getWeekInfo() { diff --git a/app/views/profiles/heatmaps/show.html.erb b/app/views/profiles/heatmaps/show.html.erb index 88f102abe..c93a44641 100644 --- a/app/views/profiles/heatmaps/show.html.erb +++ b/app/views/profiles/heatmaps/show.html.erb @@ -6,7 +6,7 @@ <% end %> <%= bootstrap_form_for current_user, :url => { :action => :update } do |f| %> - <%= f.check_box :public_heatmap, :label => t(".show_heatmap_in_public"), :checked => current_user.public_heatmap? %> + <%= f.check_box :public_heatmap, :label => t(".show_contribution_calendar_in_public"), :checked => current_user.public_heatmap? %> <%= f.primary t(".save") %> <%= link_to t(".cancel"), current_user, :class => "btn btn-link" %> diff --git a/app/views/profiles/profile_sections/_navigation.html.erb b/app/views/profiles/profile_sections/_navigation.html.erb index 0934dc12d..0f1d634ff 100644 --- a/app/views/profiles/profile_sections/_navigation.html.erb +++ b/app/views/profiles/profile_sections/_navigation.html.erb @@ -17,6 +17,6 @@ <%= link_to t(".location"), profile_location_path, :class => { "nav-link" => true, "active" => controller_name == "locations" } %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index fecc461b6..0c4659dd5 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -292,7 +292,7 @@ <% end %> <% if owned %>
- <%= link_to t(".edit_heatmap"), profile_heatmap_path, :class => "btn btn-sm w-100 btn-outline-primary edit_heatmap_button" %> + <%= link_to t(".edit_contribution_calendar"), profile_heatmap_path, :class => "btn btn-sm w-100 btn-outline-primary edit_heatmap_button" %>
<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 2f2d51040..41eee467e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,7 +3,7 @@ en: dir: ltr date: formats: - heatmap: "%B %-d" + contribution_calendar: "%B %-d" time: formats: friendly: "%e %B %Y at %H:%M" @@ -2147,7 +2147,7 @@ en: image: Image company: Company location: Location - heatmap: Heatmap + contribution_calendar: Contribution Calendar descriptions: show: title: Edit Profile @@ -2208,13 +2208,13 @@ en: failure: Couldn't update profile location. heatmaps: show: - title: Configure Heatmap - show_heatmap_in_public: "Show the heatmap on your profile page" - save: Update Heatmap Configuration + title: Configure Contribution Calendar + show_contribution_calendar_in_public: "Show the contribution calendar on your profile page" + save: Update Contribution Calendar Configuration cancel: Cancel update: - success: Heatmap updated. - failure: Couldn't update the heatmap. + success: Contribution calendar updated. + failure: Couldn't update the contribution calendar. sessions: new: tab_title: "Log In" @@ -3248,7 +3248,7 @@ en: change_image: Change Image edit_company: Edit Company edit_location: Edit Location - edit_heatmap: Configure Heatmap + edit_contribution_calendar: Configure Contribution Calendar contributions: one: "%{count} contribution in the last year" other: "%{count} contributions in the last year" @@ -3726,7 +3726,7 @@ en: home: marker_title: My home location not_set: Home location is not set for your account - heatmap: + contribution_calendar: tooltip: no_contributions: "No contributions on %{date}" contributions: diff --git a/test/controllers/profiles/heatmaps_controller_test.rb b/test/controllers/profiles/heatmaps_controller_test.rb index a6f2dc4ff..38990ab25 100644 --- a/test/controllers/profiles/heatmaps_controller_test.rb +++ b/test/controllers/profiles/heatmaps_controller_test.rb @@ -49,7 +49,7 @@ module Profiles follow_redirect! assert_response :success assert_template :show - assert_dom ".alert-success", :text => "Heatmap updated." + assert_dom ".alert-success", :text => "Contribution calendar updated." assert_not_predicate user.reload, :public_heatmap? refute_select heatmap_selector @@ -60,7 +60,7 @@ module Profiles follow_redirect! assert_response :success assert_template :show - assert_dom ".alert-success", :text => "Heatmap updated." + assert_dom ".alert-success", :text => "Contribution calendar updated." assert_predicate user.reload, :public_heatmap? assert_select heatmap_selector -- 2.47.3