Devise.registrations.reasons в yml файлах не рекомендуется?

Я только что обновился до Rails 3.2 и после запуска WEBrick я получил следующую ошибку:

[DEVISE] devise.registrations.reasons in yml files is deprecated, please use devise.registrations.signed_up_but_REASON instead. The default values are:

en:
  devise:
    registrations:
      signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
      signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
      signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'



[DEVISE] devise.registrations.inactive_signed_up in yml files is deprecated, please use devise.registrations.signed_up_but_REASON instead. The default values are:

en:
  devise:
    registrations:
      signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
      signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
      signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'

В моем исходном файле локализации у меня есть еще одна строка:

  registrations:
      signed_up: 'Welcome! You have signed up successfully.'
      inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
      updated: 'You updated your account successfully.'
      destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
      reasons:
        inactive: 'inactive'
        unconfirmed: 'unconfirmed'
        locked: 'locked'

Жаль, что я новичок Rails. Что именно мне нужно изменить? И как?

Ответ 1

Я тоже натолкнулся на это. Кажется, это нормально работает:

В config > locales > devise.en.yml > о строке 36 измените блок регистрации на:

registrations:
    signed_up: 'Welcome! You have signed up successfully.'
    updated: 'You updated your account successfully.'
    destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
    signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
    signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
    signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'

BTW: убедитесь, что вы удалите бит:

reasons:
    inactive: 'inactive'
    unconfirmed: 'unconfirmed'
    locked: 'locked'

Приветствия, матовый

Ответ 2

просто добавив в качестве ответа, что вы можете получить обновленный devise.en.yml, а также другие локали из https://github.com/plataformatec/devise/wiki/I18n