Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pluralization translate fails #46

Open
hauleth opened this issue Mar 17, 2012 · 0 comments
Open

Pluralization translate fails #46

hauleth opened this issue Mar 17, 2012 · 0 comments

Comments

@hauleth
Copy link

hauleth commented Mar 17, 2012

I'm writeing my app with :pl locale and I've got custom plural method (because I must have one) that look like

def slavic(n)
  if n == 1
    :one
  elsif [2, 3, 4].include?(n % 10) and ![12, 13, 14, 22, 23, 24].include?(n % 100)
    :few
  else
    :other
  end
end

{
  pl: {
    i18n: {
      plural: {
        keys: [:one, :few, :other],
        rule: ->(n){ slavic n }
      }
    }
  }
}

But when I use CopyCopter and try to translate with t MyModel.model_name.human count: 2 it return :other key instead of :few.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant