mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 08:52:14 -04:00
Replace pluralize calls
This commit is contained in:
@@ -13,7 +13,7 @@ module CropsHelper
|
||||
end
|
||||
|
||||
if (total_quantity != 0)
|
||||
"You have #{pluralize(total_quantity, "seed")} of this crop."
|
||||
"You have #{total_quantity} #{Seed.model_name.human(:count => total_quantity)} of this crop."
|
||||
else
|
||||
"You have an unknown quantity of seeds of this crop."
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- @forums.each do |forum|
|
||||
%h2= forum
|
||||
%p
|
||||
= pluralize(forum.posts.size, "post")
|
||||
= localize_plural(forum.posts, Post)
|
||||
|
|
||||
=link_to "Visit forum", forum
|
||||
|
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
%dd= garden.active ? "Yes" : "No"
|
||||
.col-md-12
|
||||
%b
|
||||
= "#{pluralize(garden.plantings.size, "Planting")} : "
|
||||
= "#{localize_plural(garden.plantings, Planting)} : "
|
||||
= display_garden_plantings(garden.plantings.current)
|
||||
- if garden.plantings.size > 2
|
||||
%br
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
- if @garden.photos.size > 0 or (can? :edit, @garden and can? :create, Photo)
|
||||
.row-fluid
|
||||
%h3 Photos
|
||||
%p= pluralize(@garden.photos.length, "photo")
|
||||
%p= localize_plural(@garden.photos, Photo)
|
||||
.row-fluid
|
||||
%ul.thumbnails
|
||||
- @garden.photos.each do |p|
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
- if g.photos.size > 0 or (can? :edit, g and can? :create, Photo)
|
||||
.row
|
||||
%h3 Photos
|
||||
%p= pluralize(g.photos.length, "photo")
|
||||
%p= localize_plural(g.photos, Photo)
|
||||
.row
|
||||
%ul.thumbnails
|
||||
- g.photos.each do |p|
|
||||
|
||||
@@ -3,28 +3,28 @@
|
||||
%ul.list-inline
|
||||
%li
|
||||
- if member.plantings.size > 0
|
||||
= link_to pluralize(member.plantings.size, "planting"), plantings_by_owner_path(:owner => member)
|
||||
= link_to localize_plural(member.plantings, Planting), plantings_by_owner_path(:owner => member)
|
||||
- else
|
||||
0 plantings
|
||||
%li
|
||||
- if member.harvests.size > 0
|
||||
= link_to pluralize(member.harvests.size, "harvest"), harvests_by_owner_path(:owner => member)
|
||||
= link_to localize_plural(member.harvests, Harvest), harvests_by_owner_path(:owner => member)
|
||||
- else
|
||||
0 harvests
|
||||
%li
|
||||
- if member.seeds.size > 0
|
||||
= link_to pluralize(member.seeds.size, "seeds"), seeds_by_owner_path(:owner => member)
|
||||
= link_to localize_plural(member.seeds, Seed), seeds_by_owner_path(:owner => member)
|
||||
- else
|
||||
0 seeds
|
||||
%li
|
||||
- if member.posts.size > 0
|
||||
= link_to pluralize(member.posts.size, "post"), posts_by_author_path(:author => member)
|
||||
= link_to localize_plural(member.posts, Post), posts_by_author_path(:author => member)
|
||||
- else
|
||||
0 posts
|
||||
|
||||
%li
|
||||
- if member.followed.size > 0
|
||||
= link_to pluralize(member.followed.size, "follow"), member_follows_path(member)
|
||||
= link_to localize_plural(member.followed, Follow), member_follows_path(member)
|
||||
- else
|
||||
0 following
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
ago.
|
||||
%p
|
||||
%small
|
||||
= [pluralize(member.gardens.size, "garden"), pluralize(member.plantings.size, "planting"), pluralize(member.seeds.size, "seed")].join(", ")
|
||||
= [localize_plural(member.gardens, Garden), localize_plural(member.plantings, Planting), localize_plural(member.seeds, Seed)].join(", ")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%a{:name => "comments"}
|
||||
- if post.comments
|
||||
%h2
|
||||
=pluralize(post.comments.size, "comment")
|
||||
=localize_plural(post.comments, Comment)
|
||||
- post.comments.post_order.each do |c|
|
||||
= render :partial => "comments/single", :locals => { :comment => c }
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
- unless defined?(hide_comments)
|
||||
.post-comments
|
||||
%ul.list-inline
|
||||
%li.first= link_to pluralize(post.comments.size, "comment"),
|
||||
%li.first= link_to localize_plural(post.comments, Comment),
|
||||
post_path(post, :anchor => 'comments')
|
||||
-if can? :create, Comment
|
||||
%li= link_to "Reply", new_comment_path(:post_id => post.id)
|
||||
|
||||
Reference in New Issue
Block a user