-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Provide a uniform api between Simple, KeyValue and Chain stores #109
Conversation
Whoops, commented over here kidpollo@3bc7ac9#commitcomment-601777 where I though I'd comment on the pull request. Maybe more coffee is in order. So, I kinda like the idea. I do think though that if we're supporting an api for 3rd party code then we should make it public. Still pondering the exact api though. |
Examples of where protected instance methods are used elsewhere: https://github.com/fnando/i18n-js/blob/master/lib/i18n-js.rb#L127 https://github.com/toretore/babilu/blob/master/lib/i18n_extensions.rb#L11 My particular use case is because I want to use either of these gems with a Redis Store chained to the Simple store and neither Chain or Key Stores have the appropriate methods to be used with these either of these gems |
Woops closed this by accident :P |
Any further updates on this? Just bumped into the issue with i18n-js; I'm probably going to work around it for now but this would be useful in the future. |
I have not checked this out in a while. I will take a look at the most recent changes on the gem to see if things have changed. Is there still an interest on providing uniform public apis for all backends? |
@kidpollo Yes I like this idea too. Could you please update your branch against the latest master? Will look at releasing this in 0.9.0. |
Woah 5 years later still relevant? |
@kidpollo Do you think it would be relevant? Is it still useful to provide a uniform API? |
86ad57f
to
0766d7b
Compare
@radar updated |
…ublic and private methods
0766d7b
to
15343c5
Compare
Still seems useful if you want to make another attempt at getting it cleaned up and merged. |
Updated again |
Thank you for keeping this continuously up to date. I have a few comments for you, and then I think this is good to merge :) |
Done @radar |
Thank you! I will merge this on Monday when I am back at work. |
Provide a uniform api between Simple, KeyValue and Chain stores for public and private methods.
This is because a couple of gems I use out there need to call some of the internal methods of the simple store. When you try to use other gems configured with a Chain backend call those calls fail.
Basically I added the initialized?, translations and init_translations to the KeyValue and Chain stores.
Also added the functionality to be able to read back the translations from a key value store back to a hash as if it where read from the YAML files.
The gems that i know that would benefit from this would be i18n-js and babilu