[Git][noosfero/noosfero][master] 2 commits: Translates model name in search hint

Marcos Ronaldo Pereira Junior gitlab at mg.gitlab.com
Wed May 25 17:53:37 BRT 2016


Marcos Ronaldo Pereira Junior pushed to branch master at Noosfero / noosfero


Commits:
9576d055 by Gabriel Silva at 2016-05-25T17:40:07+00:00
Translates model name in search hint

Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>

- - - - -
8cecb78f by Marcos Ronaldo Pereira Junior at 2016-05-25T20:53:23+00:00
Merge branch 'search_hint_translation' into 'master'

Translates model name in search hint

The text field hint in search page was  not fully translated

See merge request !945
- - - - -


5 changed files:

- app/models/article.rb
- app/models/community.rb
- app/models/enterprise.rb
- app/models/person.rb
- app/views/search/search_page.html.erb


Changes:

=====================================
app/models/article.rb
=====================================
--- a/app/models/article.rb
+++ b/app/models/article.rb
@@ -29,6 +29,8 @@ class Article < ApplicationRecord
     :display => %w[full]
   }
 
+  N_('article')
+
   def initialize(*params)
     super
     if params.present? && params.first.present?


=====================================
app/models/community.rb
=====================================
--- a/app/models/community.rb
+++ b/app/models/community.rb
@@ -9,7 +9,7 @@ class Community < Organization
     _('Community')
   end
 
-  N_('Community')
+  N_('community')
   N_('Language')
 
   settings_items :language


=====================================
app/models/enterprise.rb
=====================================
--- a/app/models/enterprise.rb
+++ b/app/models/enterprise.rb
@@ -12,7 +12,7 @@ class Enterprise < Organization
     _('Enterprise')
   end
 
-  N_('Enterprise')
+  N_('enterprise')
 
   acts_as_trackable after_add: proc{ |p, t| notify_activity t }
 


=====================================
app/models/person.rb
=====================================
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -13,6 +13,8 @@ class Person < Profile
     _('Person')
   end
 
+  N_('person')
+
   acts_as_trackable :after_add => Proc.new {|p,t| notify_activity(t)}
   acts_as_accessor
 


=====================================
app/views/search/search_page.html.erb
=====================================
--- a/app/views/search/search_page.html.erb
+++ b/app/views/search/search_page.html.erb
@@ -1,4 +1,4 @@
-<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %>
+<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % _(@asset.to_s.singularize) } %>
 <%= render :partial => 'search_content' %>
 
 <div style="clear: both"></div>



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/688cc083c709345b523021b37231041592204700...8cecb78f2bf9db1d00350dc2048f944493a077ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160525/01758458/attachment-0001.html>


More information about the Noosfero-dev mailing list