Skip to content

Commit

Permalink
Add note about not altering strings when no params are given
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilka2 committed Mar 30, 2024
1 parent cdc0bab commit 8f4bca1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/i18n/tests/interpolation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ module Interpolation
assert_equal '%{separator}', interpolate(:foo => :bar, :default => '%%{separator}')
end

# Note: The two interpolations below do not remove the escape character (%) because
# I18n should not alter the strings when no interpolation parameters are given,
# see the comment at the top of this file.
assert_nothing_raised do
assert_equal '%%{scope}', interpolate(:default => '%%{scope}')
end
Expand Down

0 comments on commit 8f4bca1

Please sign in to comment.