Partials should pick up I18n action scope


Is there any reason why Rails partials don’t lazily pick up the I18n scope like the views they appear in? The t(".some_key") is convenient and I would like to use it inside partials as well. I currently resort to forcing a scope on all my partials like so: t(“some_key”, scope: “controller.action”). And it’s tedious.

I found very few objections to this online, so I am interested in everyone’s opinion. The only downside I see is potentially forgetting to properly scope a partial that runs in different contexts, but I found that those partials are properly grouped in one namespace anyway (like a “shared” folder).

I can look into this further if there is no blocking issue.