Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I18n::InvalidPluralizationData error

Based on help from this site, I was able to set up a display for the person's age. But when I do something like <%= distance_of_time_in_words(DateTime.now, p.dob) %>, I get an invalidPliralizationData error, "translation data {:one=>"1 an", :many=>"{{count}} ans"} can not be used with :count => 30" My yml file has all the translations for datetime:distance_in_words_... where ... defines all the various possible occurrences.

Again help will be highly appreciated. All previous Google searches haven't been fruitful

like image 907
azinyue Avatar asked Apr 12 '11 19:04

azinyue


1 Answers

I think the hash keys are :one and :other (not :many). I suspect they chose this wording because :other also includes the zero case (?).

Anyway, hope that helps!

like image 71
Xavier Holt Avatar answered Oct 28 '22 10:10

Xavier Holt