Skip to content

Instantly share code, notes, and snippets.

@juancabrito
Last active December 12, 2015 00:28
Show Gist options
  • Save juancabrito/ecdfb9de85a59e6c0c4a to your computer and use it in GitHub Desktop.
Save juancabrito/ecdfb9de85a59e6c0c4a to your computer and use it in GitHub Desktop.
I18n::InvalidPluralizationData at registration
# Error
I18n::InvalidPluralizationData - translation data {:attributes=>{:base=>{:no_payment_methods_available=>{:one=>"No hay un método disponible", :other=>"No hay un métodos disponibles"}}}} can not be used with :count => 1:
(gem) i18n-0.6.1/lib/i18n/backend/base.rb:134:in `pluralize'
(gem) i18n-0.6.1/lib/i18n/backend/base.rb:40:in `translate'
(gem) i18n-0.6.1/lib/i18n.rb:156:in `block in translate'
(gem) i18n-0.6.1/lib/i18n.rb:152:in `catch'
(gem) i18n-0.6.1/lib/i18n.rb:152:in `translate'
(gem) activemodel-3.2.11/lib/active_model/naming.rb:57:in `human'
(gem) activemodel-3.2.11/lib/active_model/errors.rb:346:in `generate_message'
(gem) activemodel-3.2.11/lib/active_model/errors.rb:359:in `normalize_message'
(gem) activemodel-3.2.11/lib/active_model/errors.rb:234:in `add'
(gem) activemodel-3.2.11/lib/active_model/errors.rb:255:in `block in add_on_blank'
(gem) activemodel-3.2.11/lib/active_model/errors.rb:253:in `each'
(gem) activemodel-3.2.11/lib/active_model/errors.rb:253:in `add_on_blank'
(gem) activemodel-3.2.11/lib/active_model/validations/presence.rb:8:in `validate'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:310:in `_callback_before_8278'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:517:in `_run__267670898__validate__8935011__callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_validate_callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) activemodel-3.2.11/lib/active_model/validations.rb:228:in `run_validations!'
(gem) activemodel-3.2.11/lib/active_model/validations/callbacks.rb:53:in `block in run_validations!'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:437:in `block in _run__267670898__validation__8935011__callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_9139'
(gem) state_machine-1.1.2/lib/state_machine/integrations/active_model.rb:520:in `block in around_validation'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:149:in `block in run_actions'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:169:in `catch_exceptions'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:147:in `run_actions'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:132:in `run_callbacks'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:211:in `run_callbacks'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:63:in `catch'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:63:in `block in perform'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:185:in `within_transaction'
(gem) state_machine-1.1.2/lib/state_machine/transition_collection.rb:62:in `perform'
(gem) state_machine-1.1.2/lib/state_machine/integrations/active_model.rb:520:in `around_validation'
....
# What I have in locale
activerecord:
errors:
<<: *errors
models:
spree/order:
attributes:
base:
no_payment_methods_available:
one: "No hay método configurado"
other: "No hay métodos configurados"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment