質問

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.'

私のdeviseロケールファイルには、別の行があります。

  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'

申し訳ありませんが、私はレールズの初心者です。正確に何を変えなければなりませんか?そしてどうやって?

役に立ちましたか?

解決

私もこれに出くわしました。これは正常に機能しているようです:

config> config> loces> devise.en.yml> ring rine 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.'

ところで:ビットを削除してください:

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

乾杯、マット

他のヒント

更新されたdevise.en.ymlおよび他のロケールのために取得できるという答えとして追加するだけです https://github.com/plataformatec/devise/wiki/i18n

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top