Commit 9576d0557144e7d9d55821dfc893e1650ee27182

Authored by Gabriel Silva
1 parent 688cc083

Translates model name in search hint

Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com>
app/models/article.rb
... ... @@ -29,6 +29,8 @@ class Article &lt; ApplicationRecord
29 29 :display => %w[full]
30 30 }
31 31  
  32 + N_('article')
  33 +
32 34 def initialize(*params)
33 35 super
34 36 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
... ... @@ -12,7 +12,7 @@ class Enterprise &lt; Organization
12 12 _('Enterprise')
13 13 end
14 14  
15   - N_('Enterprise')
  15 + N_('enterprise')
16 16  
17 17 acts_as_trackable after_add: proc{ |p, t| notify_activity t }
18 18  
... ...
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>
... ...