forked from rails/rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`I18n.translate` returns `nil` when given a `nil` key, *unless* a `default` is also specified. If a `default` is specified, the `nil` key is treated as a missing key. In Rails 6.0, the `translate` helper always returned `nil` when given a `nil` key. After rails#40773, the `translate` helper always raised an `I18n::ArgumentError` when given a `nil` key. This commit fixes the `translate` helper to mirror the `I18n.translate` behavior when given a `nil` key, with and without a `default`.
- Loading branch information
1 parent
46337fa
commit b8b18bb
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters