cells icon indicating copy to clipboard operation
cells copied to clipboard

I18n lazy lookup, closes #272

Open mbajur opened this issue 9 years ago • 5 comments

Related to: https://github.com/apotonick/cells/issues/272

Ok, here is the raw module file. But still, after hundreds of attempts, i'm still not able to make it work as it should - using t('.something') is not being overwriten and produces an error. It would be great if you could advice me on how that module should be actually used with cells. Included by default? Included separately for each cell?

Sorry but i just think i'm missing something simple in here; no matter what i try, my overwrite is not visible from a single cell perspective and results in error

mbajur avatar Apr 15 '15 07:04 mbajur

To be more clear - adding my t method overwrite to specific cell class works fine but adding it anywhere in Cell::ViewModel don't

mbajur avatar Apr 15 '15 09:04 mbajur

Ok - that's because the I18N module might be included after you defined your method and thus overwrites your beautiful method! I'll go through this soon!

apotonick avatar Apr 15 '15 10:04 apotonick

@mbajur Can you add a test for that in a separate i18n_test.rb file? You can look up how to write such a test here: https://github.com/apotonick/cells/blob/master/test/url_helper_test.rb#L58

apotonick avatar May 03 '15 22:05 apotonick

Yeah, i'd love to but i don't have much time for that right now. But i'll do that for sure in upcoming days.

mbajur avatar Jun 09 '15 15:06 mbajur

Great addition, too bad it stalled. :cry:

svoop avatar Jan 26 '16 22:01 svoop