Skip to content

Commit

Permalink
Make Translation module compatible with Ruby 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
florentferry committed Nov 8, 2023
1 parent 09dbd83 commit 0d43fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/komponent/translation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Komponent
module Translation
def translate(key, options = {})
def translate(key, **options)
virtual_path = @virtual_path

is_component = key.to_s.first == "." &&
Expand All @@ -21,7 +21,7 @@ def translate(key, options = {})
key = "#{path}.#{key}"
end

super(key, options)
super(key, **options)
end
alias :t :translate

Expand Down

0 comments on commit 0d43fc6

Please sign in to comment.