Sha256: c6bacb6e17b4743e6228c6f8f896633173dece598d8b940227c881c13194c67d

Contents?: true

Size: 422 Bytes

Versions: 2

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literal: true

proc = ->(n) { n % 10 == 1 && n % 100 != 11 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) ? :few : n % 10 == 0 || [5, 6, 7, 8, 9].include?(n % 10) || [11, 12, 13, 14].include?(n % 100) ? :many : :other }

{
  ru: { i18n: { plural: { rule: proc, keys: [:one, :few, :many, :other] } } },
  uk: { i18n: { plural: { rule: proc, keys: [:one, :few, :many, :other] } } }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sunrise-cms-1.1.1 config/locales/defaults/pluralize.rb
sunrise-cms-1.1.0 config/locales/defaults/pluralize.rb