diff --git a/app/views/stats/index.html.erb b/app/views/stats/index.html.erb index 5a10d34406..98548abd09 100644 --- a/app/views/stats/index.html.erb +++ b/app/views/stats/index.html.erb @@ -17,10 +17,13 @@
<%= raw t('notes.stats.looking_back', :time => @time.to_formatted_s(:long)) %>
- <%= raw t('notes.stats.try_time_further_back', :url1 => "?time="+(@time-1.year).to_formatted_s(:long), + <%= raw t('notes.stats.try_time_further_back', :url1 => "?time="+(@time-1.year).to_formatted_s(:long), :url2 => "?time="+(@time-1.month).to_formatted_s(:long), :url3 => "?time="+(@time-1.week).to_formatted_s(:long)) %>
- ++ <%= raw t('notes.stats.try_time_further_forward', :url1 => "?time="+(@time+1.year).to_formatted_s(:long), + :url2 => "?time="+(@time+1.month).to_formatted_s(:long), :url3 => "?time="+(@time+1.week).to_formatted_s(:long)) %> +
<%= raw t('notes.stats.notes_per_week_past_year', :note_count => @notes_per_week_past_year.round(2)) %>
- +<%= t('notes.stats.note_posting_52_weeks') %>
@@ -82,7 +85,7 @@ divisions[2] = <%= @graph_comments %> let months = ["J", "F", "M", "A", "M", "J", "J", "A","S", "O", "N", "D"]; - + let parents = new Array(); parents[0] = "#notes"; parents[1] = "#wikis"; @@ -123,10 +126,10 @@ count++; } let title = new Array(); - title[0] = "notes"; - title[1] = "wikis"; + title[0] = "notes"; + title[1] = "wikis"; title[2] = "comments"; - + let values = new Array(); for(i = 0; i < 3; i++){ let j = 0; @@ -135,33 +138,33 @@ values[i][j] = divisions[i][j][1][1]; } } - + let datasets = new Array(); for(i = 0; i < 3; i++){ datasets[i] = new Array(); - obj = new Object(); + obj = new Object(); obj.title = title[i]; obj.values = new Array(); obj.values = values[i]; datasets[i][0] = new Object(); datasets[i][0] = obj; } - + let data = new Array(); for(i = 0; i < 3; i++){ data[i] = new Object(); data[i].labels = labels; data[i].datasets = datasets[i]; } - + for(i = 0; i < 3; i++){ let lineGraph = new Chart({ - parent: parents[i], - type: "bar", + parent: parents[i], + type: "bar", show_dots: 0, heatline: 1, height: 115, - region_fill: 0, + region_fill: 0, data: data[i], x_axis_mode: "tick", y_axis_mode: "span", diff --git a/config/locales/en.yml b/config/locales/en.yml index 0a28921644..45e087fde3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -103,3 +103,41 @@ en: month: Month second: Seconds year: Year + notes: + stats: + about_this_page: | +Public Lab is built on the contributions of community members, and this website represents our collective open source work.
+ contributors_statistics: "Contributor statistics" + looking_back: "Looking back from %{time}." + try_time_further_back: | + Try + one year, + one month, or + one week + further back. + try_time_further_forward: | + Or try + one year, + one month, or + one week + further forward. + notes_and_wiki_edits_past_week: | + %{note_count} notes + and %{wiki_count} wiki edits posted in the past week. + people_joined_past_week: "%{people_count} people joined in the past week." + notes_and_wiki_edits_past_month: | + %{note_count} notes + and %{wiki_count} wiki edits posted in the past month. + people_joined_past_month: "%{people_count} people joined in the past month." + research_notes_posted_by_contributors: "%{note_count} research notes have been posted by %{contributors_count} contributors since %{time} ago" + total_contributors: "%{all_contributors_count} Total Contributors (Tallied weekly)" + notes_per_week_past_year: "%{note_count} notes per week over the past year." + note_posting_52_weeks: "Note posting for the past 52 weeks:" + wiki_pages_posted: "%{count} wiki pages have been posted, total" + wiki_page_posting_52_weeks: "Wiki page posting for the past 52 weeks:" + comments_posted: "%{count} comments have been posted, total" + comments_posted_52_weeks: "Comments posted for the past 52 weeks:" + wiki_page_edits: "%{count} wiki page edits have been made, total" + edits_per_week: "%{count} edits per week over the past year." diff --git a/config/locales/views/notes/stats/en.yml b/config/locales/views/notes/stats/en.yml deleted file mode 100644 index ac1a1645e5..0000000000 --- a/config/locales/views/notes/stats/en.yml +++ /dev/null @@ -1,35 +0,0 @@ -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - notes: - stats: - about_this_page: | -Public Lab is built on the contributions of community members, and this website represents our collective open source work.
- contributors_statistics: "Contributor statistics" - looking_back: "Looking back from %{time}." - try_time_further_back: | - Try - one year, - one month, or - one week - further back. - notes_and_wiki_edits_past_week: | - %{note_count} notes - and %{wiki_count} wiki edits posted in the past week. - people_joined_past_week: "%{people_count} people joined in the past week." - notes_and_wiki_edits_past_month: | - %{note_count} notes - and %{wiki_count} wiki edits posted in the past month. - people_joined_past_month: "%{people_count} people joined in the past month." - research_notes_posted_by_contributors: "%{note_count} research notes have been posted by %{contributors_count} contributors since %{time} ago" - total_contributors: "%{all_contributors_count} Total Contributors (Tallied weekly)" - notes_per_week_past_year: "%{note_count} notes per week over the past year." - note_posting_52_weeks: "Note posting for the past 52 weeks:" - wiki_pages_posted: "%{count} wiki pages have been posted, total" - wiki_page_posting_52_weeks: "Wiki page posting for the past 52 weeks:" - comments_posted: "%{count} comments have been posted, total" - comments_posted_52_weeks: "Comments posted for the past 52 weeks:" - wiki_page_edits: "%{count} wiki page edits have been made, total" - edits_per_week: "%{count} edits per week over the past year." \ No newline at end of file