Sha256: 0249fe3d60246da44ca9e494242fc9495dfca754308ad626d3841b68ae761dc9

Contents?: true

Size: 384 Bytes

Versions: 21

Compression:

Stored size: 384 Bytes

Contents

Given /^String "([^"]*)" corresponds to "([^"]*)"$/ do |translation, key|
  *seq, last_key = key.split('.')
  result = seq.reverse.inject({last_key.to_sym => translation}) do |temp_result, nested_key|
    {nested_key.to_sym => temp_result}
  end
  I18n.backend.store_translations :en, active_admin: result
end

When /^I set my locale to "([^"]*)"$/ do |lang|
  I18n.locale = lang
end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
activeadmin-rails-1.7.1 features/step_definitions/i18n_steps.rb
activeadmin-rails-1.7.0 features/step_definitions/i18n_steps.rb
activeadmin-rb-1.6.0 features/step_definitions/i18n_steps.rb
activeadmin-rb-1.5.2 features/step_definitions/i18n_steps.rb
activeadmin-rb-1.5.1 features/step_definitions/i18n_steps.rb
activeadmin-rb-1.5.0 features/step_definitions/i18n_steps.rb
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin-rb-1.4.0 features/step_definitions/i18n_steps.rb
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin-1.3.1 features/step_definitions/i18n_steps.rb
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin_addons-1.5.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin-1.3.0 features/step_definitions/i18n_steps.rb
activeadmin_addons-1.4.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin_addons-1.3.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin_addons-1.2.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/step_definitions/i18n_steps.rb
activeadmin-1.2.1 features/step_definitions/i18n_steps.rb
activeadmin-1.2.0 features/step_definitions/i18n_steps.rb
activeadmin-1.1.0 features/step_definitions/i18n_steps.rb
activeadmin-1.0.0 features/step_definitions/i18n_steps.rb