pluralize, depending on count
// from Agile WebDevelopment with rails
// slightly extendet
// slightly extendet
def pluralize(count, noun, text) case count when 0: "There are no #{noun.pluralize} #{text}" when 1: "There is one #{noun} #{text}" else: "There are #{count} #{noun.pluralize} #{text}" end end