Skip to content

Commit e881ea6

Browse files
committed
Rename heatmap to contribution calendar (UI + i18n)
1 parent 3a0659f commit e881ea6

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

app/assets/javascripts/heatmap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ $(document).on("turbo:frame-load", function () {
6666
}
6767

6868
function getTooltipText(date, value) {
69-
const localizedDate = OSM.i18n.l("date.formats.heatmap", date);
69+
const localizedDate = OSM.i18n.l("date.formats.contribution_calendar", date);
7070

7171
if (value > 0) {
72-
return OSM.i18n.t("javascripts.heatmap.tooltip.contributions", { count: value, date: localizedDate });
72+
return OSM.i18n.t("javascripts.contribution_calendar.tooltip.contributions", { count: value, date: localizedDate });
7373
}
7474

75-
return OSM.i18n.t("javascripts.heatmap.tooltip.no_contributions", { date: localizedDate });
75+
return OSM.i18n.t("javascripts.contribution_calendar.tooltip.no_contributions", { date: localizedDate });
7676
}
7777

7878
function getWeekInfo() {

app/views/profiles/heatmaps/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<% end %>
77

88
<%= bootstrap_form_for current_user, :url => { :action => :update } do |f| %>
9-
<%= f.check_box :public_heatmap, :label => t(".show_heatmap_in_public"), :checked => current_user.public_heatmap? %>
9+
<%= f.check_box :public_heatmap, :label => t(".show_contribution_calendar_in_public"), :checked => current_user.public_heatmap? %>
1010

1111
<%= f.primary t(".save") %>
1212
<%= link_to t(".cancel"), current_user, :class => "btn btn-link" %>

app/views/profiles/profile_sections/_navigation.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
<%= link_to t(".location"), profile_location_path, :class => { "nav-link" => true, "active" => controller_name == "locations" } %>
1818
</li>
1919
<li class="nav-item">
20-
<%= link_to t(".heatmap"), profile_heatmap_path, :class => { "nav-link" => true, "active" => controller_name == "heatmaps" } %>
20+
<%= link_to t(".contribution_calendar"), profile_heatmap_path, :class => { "nav-link" => true, "active" => controller_name == "heatmaps" } %>
2121
</li>
2222
</ul>

app/views/users/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
<% end %>
293293
<% if owned %>
294294
<div class="mt-2">
295-
<%= link_to t(".edit_heatmap"), profile_heatmap_path, :class => "btn btn-sm w-100 btn-outline-primary edit_heatmap_button" %>
295+
<%= link_to t(".edit_contribution_calendar"), profile_heatmap_path, :class => "btn btn-sm w-100 btn-outline-primary edit_heatmap_button" %>
296296
</div>
297297
<% end %>
298298

config/locales/en.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ en:
33
dir: ltr
44
date:
55
formats:
6-
heatmap: "%B %-d"
6+
contribution_calendar: "%B %-d"
77
time:
88
formats:
99
friendly: "%e %B %Y at %H:%M"
@@ -2147,7 +2147,7 @@ en:
21472147
image: Image
21482148
company: Company
21492149
location: Location
2150-
heatmap: Heatmap
2150+
contribution_calendar: contribution calendar
21512151
descriptions:
21522152
show:
21532153
title: Edit Profile
@@ -2208,13 +2208,13 @@ en:
22082208
failure: Couldn't update profile location.
22092209
heatmaps:
22102210
show:
2211-
title: Configure Heatmap
2212-
show_heatmap_in_public: "Show the heatmap on your profile page"
2213-
save: Update Heatmap Configuration
2211+
title: Configure contribution calendar
2212+
show_contribution_calendar_in_public: "Show the contribution calendar on your profile page"
2213+
save: Update contribution calendar Configuration
22142214
cancel: Cancel
22152215
update:
2216-
success: Heatmap updated.
2217-
failure: Couldn't update the heatmap.
2216+
success: contribution calendar updated.
2217+
failure: Couldn't update the contribution calendar.
22182218
sessions:
22192219
new:
22202220
tab_title: "Log In"
@@ -3248,7 +3248,7 @@ en:
32483248
change_image: Change Image
32493249
edit_company: Edit Company
32503250
edit_location: Edit Location
3251-
edit_heatmap: Configure Heatmap
3251+
edit_contribution_calendar: Configure contribution calendar
32523252
contributions:
32533253
one: "%{count} contribution in the last year"
32543254
other: "%{count} contributions in the last year"
@@ -3726,7 +3726,7 @@ en:
37263726
home:
37273727
marker_title: My home location
37283728
not_set: Home location is not set for your account
3729-
heatmap:
3729+
contribution_calendar:
37303730
tooltip:
37313731
no_contributions: "No contributions on %{date}"
37323732
contributions:

test/controllers/profiles/heatmaps_controller_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_update
4949
follow_redirect!
5050
assert_response :success
5151
assert_template :show
52-
assert_dom ".alert-success", :text => "Heatmap updated."
52+
assert_dom ".alert-success", :text => "contribution calendar updated."
5353

5454
assert_not_predicate user.reload, :public_heatmap?
5555
refute_select heatmap_selector
@@ -60,7 +60,7 @@ def test_update
6060
follow_redirect!
6161
assert_response :success
6262
assert_template :show
63-
assert_dom ".alert-success", :text => "Heatmap updated."
63+
assert_dom ".alert-success", :text => "contribution calendar updated."
6464

6565
assert_predicate user.reload, :public_heatmap?
6666
assert_select heatmap_selector

0 commit comments

Comments
 (0)