svenfuchs/i18n — pull request #164 by marcandre (2012-09-15 02:47:30+00:00)
Title: Make pluralize pick the :other key if :one is not defined. Fix doc

I had problems with the following entries:

en:
used_in_pages:
zero: Not used anywhere
other: Already in use: %{page_list}

I wanted to display `I18n.t(:used_in_pages, page_list: pages.join(', '), count: pages.length)`

Works well, except for `count == 1`, where it raises an error. I made an extra entry for 'one' in my locale, but I see no compelling reason why that should be required.

This pull request changes that. Note that there was no test for that particular case.

It also fixes the documentation which was obsolete.

I believe the implementation is also faster.

Finally, it makes trivial to add entries for `2 => :two`, etc...
Actually, maybe all numbers up to ten should be included to allow for some languages that have different pluarl forms. Anyways, some people could hack it up by modifying the `PLURALIZATION_KEYS ` hash.

Thanks