#12 new
Edgar Suarez

key :many instead of :other in pluralize

Reported by Edgar Suarez | August 30th, 2008 @ 09:22 PM

following the pastie http://pastie.org/253107 found in http://groups.google.com/group/r...


errors:
  template:
    header:
      one: "1 error prohibited this {{model}} from being saved"
      many: "{{count}} errors prohibited this {{model}} from being saved"

throws an InvalidPluralizationData exception because it is looking for the key :other instead of :many


def pluralize(locale, entry, count)
  return entry unless entry.is_a?(Hash) and count
  # raise InvalidPluralizationData.new(entry, count) unless entry.is_a?(Hash)
  key = :zero if count == 0 && entry.has_key?(:zero)
  key ||= count == 1 ? :one : :other
  raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key)
  entry[key]
end

So changing the 'many' key for 'other' works propperly but I think it should be working for many as well.


errors:
  template:
    header:
      one: "1 error prohibited this {{model}} from being saved"
      other: "{{count}} errors prohibited this {{model}} from being saved"

Comments and changes to this ticket

  • Clemens Kofler

    Clemens Kofler September 10th, 2008 @ 04:07 PM

    This stems from i18n trying to stick to existing conventions as defined in the Unicode CLDR/LDML. For details, check out the information on pluralization rules in the LDML.

  • tvdeyen

    tvdeyen August 3rd, 2009 @ 10:24 PM

    • Assigned user set to “Sven Fuchs”

    Yes, Clemens is right. So Iain Hecker should update the Wiki Page. Or can some give an account? So I could update the wiki page.

  • tvdeyen

    tvdeyen August 3rd, 2009 @ 10:24 PM

    • Assigned user changed from “Sven Fuchs” to “Ruby I18n Group”
  • PhilT

    PhilT August 23rd, 2009 @ 03:10 AM

    'other' takes care of zero (0) whereas 'many' does not.

  • Therin79

    Therin79 March 30th, 2019 @ 11:37 AM

    Being a programming student, I love to visit your source because it contains amazing information about different programs. Here you can best writing service to manage their any kind of blog post. Your source has become a great place of education and information. I keenly wait for your next posts.

  • peyila

    peyila May 3rd, 2020 @ 02:22 PM

    This is very useful, although it will be important to help simply click that web page link: 안전놀이터

  • peyila

    peyila May 4th, 2020 @ 12:43 AM

    It is fine, nonetheless evaluate the information and facts around this correct. 여우알바

  • BRAVO

    BRAVO May 5th, 2020 @ 06:20 PM

    This post is very simple to read and appreciate without leaving any details out. Great work! 바카라사이트

  • peyila

    peyila May 7th, 2020 @ 07:24 AM

    On this subject internet page, you'll see my best information, be sure to look over this level of detail. 온라인카지노

  • peyila

    peyila May 8th, 2020 @ 02:27 PM

    For many people this is important, so check out my profile: 안전공원

  • pbawerawi

    pbawerawi May 13th, 2020 @ 08:13 AM

    Lassen Sie die Wahrheit beiseite, dass Sie im Jahr 2020 dazu neigen, brandneue Stabilität über den Fuß der Streetstyle-Berühmtheit zu beobachten, wie ein Vorort Adidas I-5923 Schuhe Vater. Diese Art der Zusammenarbeit besteht in der Regel aus Schuhen, die Sie jeden Tag anziehen können und die in langer Zeit genauso gut aussehen werden. Sie haben vielleicht etwas mehr gebogenen Stil als Ihre typischen Adidas Ozweego Schuhe https://www.muriekschuhen.com/ mit brandneuen Stabilitätskicks - aber sie sind einfach nur klassisch.

  • pbawerawi

    pbawerawi May 14th, 2020 @ 04:34 AM

    Az ismeretlen huszadik fotózáshoz a hidden hátulján. new york, a közzététel tárgyát képező dolgok mindazonáltal úgy érzik, mintha a komolyan egyedi eljárás lenne. A rejtett kezdi a számlákat, az igaz, hogy az Adidas NMD cipő https://www.kabrincipo.com/ már több mint százötven 000 rajongó, amelyek nagyszerűen alkalmasak arra, hogy megbeszéljék a stílusával kapcsolatos időszakokat, amelyek vele együtt rezonáltak

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 ยป

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff

Pages