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

support i18n #170

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

support i18n #170

wants to merge 3 commits into from

Conversation

Yuki-Inoue
Copy link
Contributor

@Yuki-Inoue Yuki-Inoue commented Feb 2, 2019

This PR makes ActiveHash support i18n if I18n is available.

With this fix, model's model_name will be configurable by locale file, for example:

ja:
  activemodel:
    models:
      country: "国" # Country.model_name.human # => "国"

lib/active_hash/base.rb Outdated Show resolved Hide resolved
@syguer
Copy link
Collaborator

syguer commented Feb 4, 2019

Thank you for your contribution. Sounds good!
Could you write test codes and write short document to README.md?
If you are busy, I'll help these job 👍

@Yuki-Inoue
Copy link
Contributor Author

@syguer Thanks for the review. The point out you've made is fixed with the next commit.

About the document/testing, I'll try. Document is relatively easy, whereas the test it might take some time for me to figure out how to setup... (all the locale setup usually made by rails, I find it not obvious how to write tests...)

@Yuki-Inoue
Copy link
Contributor Author

README is updated.

@yhirano55
Copy link
Contributor

It looks nice work to me 👏 I would like to know why this pull request is not merged.

@Yuki-Inoue
Copy link
Contributor Author

From where I remember, I was asked to write tests.
I tried to do so, but had trouble; I couldn't figure out how to write test for this kind of feature.

I would be glad if anyone can help...

@ryu-sato ryu-sato mentioned this pull request Jun 17, 2021
1 task
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.

3 participants