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 #11

Closed
mftaff opened this issue Jan 24, 2018 · 3 comments · Fixed by #13
Closed

Support I18n #11

mftaff opened this issue Jan 24, 2018 · 3 comments · Fixed by #13

Comments

@mftaff
Copy link
Contributor

mftaff commented Jan 24, 2018

Hey man,
I have been reading up on how to add I18n support to a gem, and mostly things seem pretty straightforward.
The main issue I have come up with is how to provide an easy way for someone using the gem to customize the YAML files - similar to how devise loads devise.en.yml into the main app's config/locales directory.

It seems like this happens in the gem's engine, but I haven't been able to find an example or documentation on how to do that. I have a feeling it is quite simple 😄

Have you done something like this before? Do you know of a resource I can turn to?

Thanks! I am looking forward to creating a PR for this, as soon as I sort out what steps are required

@mikker
Copy link
Owner

mikker commented Jan 25, 2018

Hey! Nice. As with so much else, Rails has us pretty much covered. We just need to tell it where to look – see my PR #12.

I've added the necessary glue. I'll leave it to you to go through the code and see what we might want to provide translation points for. Ok?

@mftaff
Copy link
Contributor Author

mftaff commented Jan 29, 2018

Cool! that is way simpler than I thought it would be.

Do you mind merging that pr? This way I can pull it down to my fork to add translations.

@mikker
Copy link
Owner

mikker commented Jan 29, 2018

You can pull down the branch that I committed it to. But don’t bother – I’ve merged it as you asked. Thanks for taking a look!

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 a pull request may close this issue.

2 participants