prograils / lit

rails i18n web interface
MIT License
298 stars 71 forks source link

Fix - pull hash of grouped translations from redis cache #151

Closed pnikrat closed 4 years ago

pnikrat commented 4 years ago

When user calls I18n.t('some.key') and this key is just a part of larger group of translations then I18n pulls out and returns whole tree-like hash. When using Lit it works the same way only when using Hash as a Cache engine. When using Redis it bugs out and returns humanized translation Some Key or default if passed.

This PR adds some changes to Redis adapter to make it work similar to how I18n behaves. Thanks to this we retain compatible and predictable translation api that is as close as possible to raw i18n

Closes #113