[Git][noosfero/noosfero][master] 2 commits: Fixes pluralization of search results string

Rodrigo Souto gitlab at mg.gitlab.com
Wed Apr 27 16:19:04 BRT 2016


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
d9ed443c by Larissa Reis at 2016-04-26T09:56:19-03:00
Fixes pluralization of search results string

- - - - -
c10cc29c by Rodrigo Souto at 2016-04-27T19:18:51+00:00
Merge branch 'results-plural' into 'master'

Fixes pluralization of search results string



See merge request !872
- - - - -


2 changed files:

- app/views/profile_search/_results_list.html.erb
- app/views/search/_search_content.html.erb


Changes:

=====================================
app/views/profile_search/_results_list.html.erb
=====================================
--- a/app/views/profile_search/_results_list.html.erb
+++ b/app/views/profile_search/_results_list.html.erb
@@ -1,7 +1,7 @@
 <div id='search-content'>
   <% if @results %>
     <div class='results-found-message'>
-      <%= _("%s results found") % @results.total_entries %>
+      <%= n_("%s result found", "%s results found", @results.total_entries) % @results.total_entries %>
     </div>
 
     <ul class='results-list'>


=====================================
app/views/search/_search_content.html.erb
=====================================
--- a/app/views/search/_search_content.html.erb
+++ b/app/views/search/_search_content.html.erb
@@ -1,6 +1,6 @@
 <div id='search-content'>
   <div class='total'>
-    <%= _('Total of %s results ') % @searches[@asset][:results].total_entries.inspect %>
+    <%= n_('Total of 1 result', 'Total of %s results', @searches[@asset][:results].total_entries) % @searches[@asset][:results].total_entries.inspect %>
   </div>
 
 <%= display_results(@searches, @asset) %>



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/55c72be93e86011d7b78bc70dec6c0c75bbe83b6...c10cc29cdb86ec78dbdf8804c0a8d2e64a8d0e54
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160427/2950968d/attachment-0001.html>


More information about the Noosfero-dev mailing list