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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle accessing keys with a leading period #87

Conversation

gingermusketeer
Copy link
Contributor

Why: So that the ActiveRecord backend behaves the same as the Simple backend.

Why: So that ActiveRecord backend behaves the same as the Simple backend.
@gingermusketeer gingermusketeer force-pushed the bug/handle-lookups-with-leading-periods branch from eacdbb9 to 696302d Compare November 19, 2017 12:43
test "accessing keys with a leading period" do
expected_hash = { :bar => 'bar', :baz => 'baz' }
assert_equal expected_hash, I18n.t('foo')
assert_equal expected_hash, I18n.t('.foo')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about I18n.t('foo.')? I think it should also return the same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I have added support for that.

@timfjord timfjord merged commit 118bc91 into svenfuchs:master Nov 20, 2017
@timfjord
Copy link
Collaborator

Thanks, @gingermusketeer. Merged!

@gingermusketeer
Copy link
Contributor Author

@Timsly Any chance of a release with this change included?

@timfjord
Copy link
Collaborator

Completely forgot to release it.
But just did that - 0.2.2

@gingermusketeer
Copy link
Contributor Author

Many thanks :)

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.

2 participants