From 931ecae4d132ad1affaf7723785ab476bbd66e6e Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 16 Jan 2009 15:17:34 -0800 Subject: [PATCH] Renamed the Rates tab to Rate History to match the comp. #1915 --- app/views/users/_rates.html.erb | 2 +- lang/en.yml | 2 ++ lib/rate_users_helper_patch.rb | 2 +- spec/lib/rate_users_helper_patch_spec.rb | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/users/_rates.html.erb b/app/views/users/_rates.html.erb index 70a666c..6b17e73 100644 --- a/app/views/users/_rates.html.erb +++ b/app/views/users/_rates.html.erb @@ -1,4 +1,4 @@ -

Rate History

+

<%= l(:rate_label_rate_history) %>

<%# TODO: Refactor out of the view once there is a hook in the controller (Post 0.8.0). %> <%# Can't expect everyone to upgrade at the moment %> <% @rates = Rate.history_for_user(@user) %> diff --git a/lang/en.yml b/lang/en.yml index 49ec4b5..a5ddd1d 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -1,3 +1,5 @@ # English strings go here rate_label_rates: Rates rate_label_rate: Rate +rate_label_rate_history: Rate History + diff --git a/lib/rate_users_helper_patch.rb b/lib/rate_users_helper_patch.rb index 3edcb94..a0c48e9 100644 --- a/lib/rate_users_helper_patch.rb +++ b/lib/rate_users_helper_patch.rb @@ -13,7 +13,7 @@ module RateUsersHelperPatch # Adds a rates tab to the user administration page def user_settings_tabs_with_rate_tab tabs = user_settings_tabs_without_rate_tab - tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rates} + tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rate_history} return tabs end diff --git a/spec/lib/rate_users_helper_patch_spec.rb b/spec/lib/rate_users_helper_patch_spec.rb index 14703d4..8ce9390 100644 --- a/spec/lib/rate_users_helper_patch_spec.rb +++ b/spec/lib/rate_users_helper_patch_spec.rb @@ -32,7 +32,7 @@ describe UsersHelper, 'user_settings' do end it 'should use the i18n rates label' do - @rate_tab[:label].should eql(:rate_label_rates) + @rate_tab[:label].should eql(:rate_label_rate_history) end end end