cells
cells copied to clipboard
I18n lazy lookup, closes #272
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
To be more clear - adding my t
method overwrite to specific cell class works fine but adding it anywhere in Cell::ViewModel
don't
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!
@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
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.
Great addition, too bad it stalled. :cry: