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

Translations in config/locales/en.yml are only loaded when triggered by I18n.t #7

Open
hgmnz opened this issue Sep 12, 2011 · 2 comments

Comments

@hgmnz
Copy link

hgmnz commented Sep 12, 2011

The issue here is that what (lazy) loads translations is when we use the rails I18n#translate call. However, we're relying on config/locales/en.yml to push data to the copycopter_client's cache (to be later sync'ed) so that we can use them from the client side. Therefore there's nowhere in the app where we call I18n#t.

We should make the copycopter client load those translations automatically. Possibly make it configurable if there are any concerns with that.

Any other suggestions?

@jferris
Copy link
Member

jferris commented Sep 13, 2011

We use I18n's lazy loading to avoid loading translations from Copycopter when running tasks (like rake db:migrate) that don't require any translations. We could add a method to manually load translations from locales and Copycopter.

@hgmnz
Copy link
Author

hgmnz commented Sep 13, 2011

Cool, adding a method would do it. Not a priority right now, but I'll do it up at some point.

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

No branches or pull requests

2 participants