Forum: Ruby on Rails i18n and count question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3518ff338e5eee9b32eb1815daabc602?d=identicon&s=25 Marcelo Barbudas (Guest)
on 2009-05-28 19:34
(Received via mailing list)
Hi.

What is the proper way to handle situations where you need
pluralization with and without adding the count?

The best I could think of is to write it twice:

item:
  one: 'item'
  other: 'items'

c_item:
  one: 'one item'
  other: '{{count}} items'

It's not very DRY.

I guess there should be a better way of doing. How do you handle this
situation?

--
M.
This topic is locked and can not be replied to.