1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

deviseをi18nを使って日本語化する

Posted at

#環境
Ruby 2.5.1
Rails 6.0.2

devise.ja.ymlの導入

こちらを参考にさせてもらってdeviseを日本語化した際に、いくつか違ったので、メモ書きしておく

gemを導入

gem 'devise-i18n'

上記のgemを導入した後に、

$rails g devise:views:locale ja

これを実行。

Running via Spring preloader in process 70886
Deprecation warning: Expected string default value for '--controller'; got false (boolean).
This will be rejected in the future unless you explicitly pass the options check_default_type: false or call allow_incompatible_default_type! in your code
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.
Could not find generator 'devise:views:locale'. Maybe you meant "devise:i18n:locale"?
Run rails generate --help for more options.

Maybe you meant "devise:i18n:locale"?

とのことだったので、改めて

$rails g devise:i18n:locale ja

こいつを実行した。

これによってdevise.ja.ymlが自動生成された。

#参考文献
Deviseを日本語化する

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?