#12 new
Tom Hughes

Pluralizer Enhancements

Reported by Tom Hughes | July 22nd, 2009 @ 11:02 AM

The attached patch adds several enhancements to the pluralizing backend.

Firstly it passes the entry to the locale specific pluralizers as well as the count, so that they can check whether keys exist and do fallback much like the current handling of the :zero key.

Secondly it enhances the :en pluralizer to fall back to :other if :one does not exist - sometimes there is no need to special case the number 1 in English (consider "he had {{count}} sheep" for example).

Finally it adds a :sl pluralizer for Slovenian, which apparently sometimes requires special cases for numbers which (mod 100) are 1, 2 or 3/4. These also fall back to :other as they are not also needed. This pluralization logic is based on a user contribution to the translation of the http://www.openstreetmap.org/ site.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The second incarnation of Globalize for Rails, which will let your Rails app speak any language on Earth, and beyond.

People watching this ticket

Attachments

Pages