diff --git a/app/controllers/admins_controller.rb b/app/controllers/admins_controller.rb
index 9b0ff0283..2650d7a97 100644
--- a/app/controllers/admins_controller.rb
+++ b/app/controllers/admins_controller.rb
@@ -52,16 +52,16 @@ class AdminsController < ApplicationController
case params[:range]
when "week"
range = 1.week
- @segment = "week"
+ @segment = t('admins.stats.week')
when "2weeks"
range = 2.weeks
- @segment = "2 week"
+ @segment = t('admins.stats.2weeks')
when "month"
range = 1.month
- @segment = "month"
+ @segment = t('admins.stats.month')
else
range = 1.day
- @segment = "daily"
+ @segment = t('admins.stats.daily')
end
[Post, Comment, AspectMembership, User].each do |model|
diff --git a/app/views/admins/stats.html.haml b/app/views/admins/stats.html.haml
index 9ef060a90..a12037054 100644
--- a/app/views/admins/stats.html.haml
+++ b/app/views/admins/stats.html.haml
@@ -1,32 +1,29 @@
.span-24
- = render :partial => 'admins/admin_bar'
+ = render :partial => 'admins/admin_bar.haml'
%br
%br
.span-24.last
%h1
- Usage Statistics
+ = t('.usage_statistic')
%div{:style => "float:right;"}
= form_tag('/admins/stats', :method => 'get') do
%select{:name => 'range'}
%option{:value => 'daily', :selected => ('selected' if params[:range] == 'daily')}
- Daily
+ = t('.daily')
%option{:value => 'week', :selected => ('selected' if params[:range] == 'week')}
- Week
+ = t('.week')
%option{:value => '2weeks', :selected => ('selected' if params[:range] == '2weeks')}
- 2 Weeks
+ = t('.2weeks')
%option{:value => 'month', :selected => ('selected' if params[:range] == 'month')}
- Month
+ = t('.month')
- = submit_tag 'go'
+ = submit_tag t('.go')
%br
%h3
- Displaying results from the
- %b
- = @segment
- segment
-
+ != t('.display_results', :segment => @segment)
+
%br
%br
%br
@@ -38,11 +35,16 @@
- [:posts, :comments, :aspect_memberships, :users].each do |name|
- model = eval("@#{name.to_s}")
- if name == :aspect_memberships
- - name = :shares
+ - name = t('.shares', :count => model[:yesterday])
+ - if name == :posts
+ - name = t('.posts', :count => model[:yesterday])
+ - if name == :comments
+ - name = t('.comments', :count => model[:yesterday])
+ - if name == :users
+ - name = t('.users', :count => model[:yesterday])
- .span-6{:class => ('last' if name == :users)}
+ .span-6{:class => ('last' if name == t('.users', :count => model[:yesterday]))}
%h2{:style => 'font-weight:bold;'}
- = model[:yesterday]
= name.to_s
%h4
= model[:day_before]
@@ -54,21 +56,12 @@
%br
%hr
-
%p{:style => "text-align:center;"}
- The current segment is averaging
- %b
- #{@posts[:yesterday]/@user_count.to_f}
- posts per user, from
- %b
- #{@posts[:day_before]/@user_count.to_f}
+ != t('.current_segment', :post_yest => @posts[:yesterday]/@user_count.to_f, :post_day => @posts[:day_before]/@user_count.to_f)
.span-24.last
%h3
- 50 Most Popular Tags
+ = t('.50_most')
- @popular_tags.each do |name,count|
- Tag Name:
- %b= name
- Count:
- %b= count
+ != t('.tag_name', :name_tag => name, :count_tag => count)
%br
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 1ec608e50..4cfb85b72 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -102,7 +102,44 @@ en:
many: "%{count} users found"
other: "%{count} users found"
stats:
- go: go
+ week: "Week"
+ 2weeks: "2 Week"
+ month: "Month"
+ daily: "Daily"
+ usage_statistic: "Usage Statistics"
+ go: "go"
+ display_results: "Displaying results from the %{segment} segment"
+ posts:
+ zero: "%{count} posts"
+ one: "%{count} post"
+ two: "%{count} posts"
+ few: "%{count} posts"
+ many: "%{count} posts"
+ other: "%{count} posts"
+ comments:
+ zero: "%{count} comments"
+ one: "%{count} comment"
+ two: "%{count} comments"
+ few: "%{count} comments"
+ many: "%{count} comments"
+ other: "%{count} comments"
+ shares:
+ zero: "%{count} shares"
+ one: "%{count} share"
+ two: "%{count} shares"
+ few: "%{count} shares"
+ many: "%{count} shares"
+ other: "%{count} shares"
+ users:
+ zero: "%{count} users"
+ one: "%{count} user"
+ two: "%{count} users"
+ few: "%{count} users"
+ many: "%{count} users"
+ other: "%{count} users"
+ current_segment: "The current segment is averaging %{post_yest} posts per user, from %{post_day}"
+ 50_most: "50 Most Popular Tags"
+ tag_name: "Tag Name: %{name_tag} Count: %{count_tag}"
application:
helper:
unknown_person: "unknown person"