Closed JunichiIto closed 1 year ago
resource_name.to_s.humanize always returns English name, but devise-i18n users would like to have translated name. So it should be resource.model_name.human instead of resource_name.to_s.humanize.
resource_name.to_s.humanize
resource.model_name.human
resource_name #=> :user resource_name.to_s.humanize #=> "User" resource #=> #<User id: 10, email: "foo@example.com", created_at: "2023-02-24 02:50:05.580325000 +0000", updated_at: "2023-02-24 02:50:05.580325000 +0000"> resource.model_name.human #=> "ユーザー"
Here is an example in Japanese mode:
resource_name.to_s.humanize
always returns English name, but devise-i18n users would like to have translated name. So it should beresource.model_name.human
instead ofresource_name.to_s.humanize
.Here is an example in Japanese mode: