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

make runtime key inference happen in I18n.normalize_keys #1

Open
jenseng opened this issue Jan 12, 2014 · 0 comments
Open

make runtime key inference happen in I18n.normalize_keys #1

jenseng opened this issue Jan 12, 2014 · 0 comments

Comments

@jenseng
Copy link
Contributor

jenseng commented Jan 12, 2014

every time I18n.translate is called without a key, it is inferred from the default (unless you're using the literal default as the key). really this should only happen once per call site, since the default doesn't change.

rather than have our own cache, we should extend I18n.normalize_keys so we can take advantage of I18n's existing normalized_key_cache.

bonus: if someone is using I18nema, then our inferred keys can live outside of Ruby-land for GC happiness

@jenseng jenseng closed this as completed May 1, 2014
@jenseng jenseng reopened this May 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant