Skip to content

Commit 223c12c

Browse files
authored
Merge pull request #291 from Koalephant/Fix-Translate-v3
Fix calls to I18n.t() using a hash
2 parents 2b75b7f + a25ea2a commit 223c12c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: lib/vagrant-hostmanager/action/update_guest.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ def initialize(app, env)
1717

1818
def call(env)
1919
if @config.hostmanager.manage_guest?
20-
env[:ui].info I18n.t('vagrant_hostmanager.action.update_guest', {
21-
:name => @machine.name
22-
})
20+
env[:ui].info I18n.t('vagrant_hostmanager.action.update_guest', name: @machine.name)
2321
@updater.update_guest(@machine)
2422

2523
@app.call(env)

Diff for: lib/vagrant-hostmanager/config.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ def validate(machine)
4949
# check if aliases option is an Array
5050
if !machine.config.hostmanager.aliases.kind_of?(Array) &&
5151
!machine.config.hostmanager.aliases.kind_of?(String)
52-
errors << I18n.t('vagrant_hostmanager.config.not_an_array_or_string', {
52+
errors << I18n.t('vagrant_hostmanager.config.not_an_array_or_string', **{
5353
:config_key => 'hostmanager.aliases',
5454
:is_class => aliases.class.to_s,
5555
})
5656
end
5757

5858
if !machine.config.hostmanager.ip_resolver.nil? &&
5959
!machine.config.hostmanager.ip_resolver.kind_of?(Proc)
60-
errors << I18n.t('vagrant_hostmanager.config.not_a_proc', {
60+
errors << I18n.t('vagrant_hostmanager.config.not_a_proc', **{
6161
:config_key => 'hostmanager.ip_resolver',
6262
:is_class => ip_resolver.class.to_s,
6363
})
@@ -72,7 +72,7 @@ def validate(machine)
7272
def validate_bool(key, value)
7373
if ![TrueClass, FalseClass].include?(value.class) &&
7474
value != UNSET_VALUE
75-
I18n.t('vagrant_hostmanager.config.not_a_bool', {
75+
I18n.t('vagrant_hostmanager.config.not_a_bool', **{
7676
:config_key => key,
7777
:value => value.class.to_s
7878
})

0 commit comments

Comments
 (0)