From 119e536a9764669d4c04ff550c120af8de4250e3 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sun, 17 Mar 2013 16:20:12 -0600 Subject: [PATCH 1/2] Fix off-by-one error in pie chart data A pie chart with exactly 10 contexts would show up with 9 contexts + (other). --- app/controllers/stats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index fc9a0d7e..313e1cd9 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -355,7 +355,7 @@ class StatsController < ApplicationController 'id' => all_actions_per_context[i][:id] } } - if size==pie_cutoff + if all_actions_per_context.size > pie_cutoff @actions_per_context[size-1]['name']=t('stats.other_actions_label') @actions_per_context[size-1]['total']=@actions_per_context[size-1]['total'] @actions_per_context[size-1]['id']=-1 From 08cf7ca542d75acb80cf99942c5db2737be7c70c Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sun, 17 Mar 2013 16:29:19 -0600 Subject: [PATCH 2/2] Fix grammar in pie chart legend --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index f69236b0..bb1f38e9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -321,7 +321,7 @@ en: top10_projects_30days: Top 10 project in past 30 days spread_of_running_actions_for_visible_contexts: Spread of running actions for visible contexts actions_selected_from_week: "Actions selected from week " - spread_of_actions_for_all_context: Spread of actions for all context + spread_of_actions_for_all_context: Spread of actions for all contexts click_to_show_actions_from_week: Click %{link} to show the actions from week %{week} and further. other_actions_label: (others) top10_projects: Top 10 projects