Skip to content

config.active_support.deprecation の訳を改善#1850

Merged
hachi8833 merged 1 commit intoyasslab:masterfrom
ykttdn:fix-deprecation-doc
Jun 29, 2025
Merged

config.active_support.deprecation の訳を改善#1850
hachi8833 merged 1 commit intoyasslab:masterfrom
ykttdn:fix-deprecation-doc

Conversation

@ykttdn
Copy link

@ykttdn ykttdn commented Jun 28, 2025

v7.1以降のconfig.active_support.deprecationの項目内の以下の訳についてです

https://railsguides.jp/v7.1/configuring.html#config-active-support-deprecation

デフォルトで生成されるconfig/environments以下のファイルでは、development環境では:logが、test環境では:stderrがそれぞれ設定されます。production環境ではこの設定は無視され、config.active_support.report_deprecationsの設定が使われます。

https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-deprecation

In the default generated config/environments files, this is set to :log for development and :stderr for test, and it is omitted for production in favor of config.active_support.report_deprecations.

'omitted' が「無視され」と訳されていますが、config/environments/production.rb内でconfig.active_support.deprecation = :logのように設定しても反映されないと解釈できてしまいます。しかし、原著に該当部分の記述が追加された rails/rails#46457 において、

This updates the description of several deprecation-related configuration settings to explain that their "default" values are from the default generated config/environments files, and that those values vary by environment.

とあることから、'omitted'の解釈としては、「rails newで作成されたconfig/environments/production.rbの中ではconfig.active_support.deprecationはデフォルトで省略されている(代わりにconfig.active_support.report_deprecationsが使われている)」というニュアンスが正しいと思います

Copy link
Collaborator

@hachi8833 hachi8833 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正ありがとうございます。(過去訳もやっていただき恐縮です)

合わせてクローズしますね

@hachi8833 hachi8833 merged commit fa1f087 into yasslab:master Jun 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants