Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix subtree support in I18n::Backend::KeyValue #179

Closed

Conversation

chrisb
Copy link

@chrisb chrisb commented Nov 27, 2012

It looks like arrays were enforced on I18n::Backend::KeyValue about a year ago (see e2b0fe4) but this appears to have broken subtree support.

Take a look:

backend = I18n::Backend::KeyValue.new(Hash.new,true) # explicitly enable subtrees
backend.store_translations :en, { :foo => { :bar => 'bar' } }
backend.store_translations :en, { :foo => { :baz => 'baz' } }
backend.send :lookup, :en, :foo # => {:baz=>"baz"}

As you can see, we expect a lookup on :foo to return the subtree, i.e. {:foo=>{:bar=>"bar", :baz=>"baz"}}, but it doesn't 馃槩

@radar radar closed this Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants