Commit 8dc60a31264a9fb1098a7fb599d1511e2b669edb

Authored by Gabriel Silva
1 parent ad0090f5
Exists in stable-spb-1.5

Translates model name in search hint

Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com>
(cherry picked from commit 9576d0557144e7d9d55821dfc893e1650ee27182)
app/models/article.rb
... ... @@ -26,6 +26,8 @@ class Article &lt; ActiveRecord::Base
26 26 :display => %w[full]
27 27 }
28 28  
  29 + N_('article')
  30 +
29 31 def initialize(*params)
30 32 super
31 33 if params.present? && params.first.present?
... ...
app/models/community.rb
... ... @@ -9,7 +9,7 @@ class Community &lt; Organization
9 9 _('Community')
10 10 end
11 11  
12   - N_('Community')
  12 + N_('community')
13 13 N_('Language')
14 14  
15 15 settings_items :language
... ...
app/models/enterprise.rb
... ... @@ -13,7 +13,7 @@ class Enterprise &lt; Organization
13 13 _('Enterprise')
14 14 end
15 15  
16   - N_('Enterprise')
  16 + N_('enterprise')
17 17  
18 18 acts_as_trackable after_add: proc{ |p, t| notify_activity t }
19 19  
... ...
app/models/person.rb
... ... @@ -13,6 +13,8 @@ class Person &lt; Profile
13 13 _('Person')
14 14 end
15 15  
  16 + N_('person')
  17 +
16 18 acts_as_trackable :after_add => Proc.new {|p,t| notify_activity(t)}
17 19 acts_as_accessor
18 20  
... ...
app/views/search/search_page.html.erb
1   -<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %>
  1 +<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % _(@asset.to_s.singularize) } %>
2 2 <%= render :partial => 'search_content' %>
3 3  
4 4 <div style="clear: both"></div>
... ...