I believe you should use i18n for cases like this: 
https://guides.rubyonrails.org/i18n.html#pluralization

Also it's enough to add a word 'no' before people in English, but that might 
not be enough for other languages where you need to add that word after 
'people' or change the word 'people' in general.

On Wed, Oct 2, 2019, at 18:30, Marc Köhlbrugge wrote:
> I'm considering making a PR to add an optional "zero" argument to the 
> pluralize text helper. This would allow you to set an alternative word for 0 
> (zero) when the count is zero. This is especially useful in cases where a 
> more human "You have no bookmarks." is preferred over "You have 0 bookmarks.")
> 
> Since this would be a named parameter, I don't think it would negatively 
> affect any existing code.
> 
> pluralize(0, "bookmark", zero: "no")
> => "no bookmarks"
> 
> 
> Here's the code I have so far: 
> https://github.com/marckohlbrugge/rails/commit/b939907824a74510adfa3d8f68c24a61a74a7758
> 
> Is it worth making an official PR for this?
> 
> 
> 
> 

> --
>  You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-core+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-core/646bbf1e-cff5-4ff4-b29e-54f944e2069c%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/rubyonrails-core/646bbf1e-cff5-4ff4-b29e-54f944e2069c%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-core/7904d4d4-a5bd-47aa-9b05-51a6050766de%40www.fastmail.com.

Reply via email to