barsoom/traco

Issue with Carrierwave

tandrieu opened this issue · 2 comments

Hi,

Considering an app with rails 4.0.4, using Traco 3.1 and Carrierwave 0.10.0.
When translating a Carrierwave's attribute, Traco's attribute always returns nil.
That doesn't happen on rails 3.2.17 with same traco and carrierwave's versions.

I did a workaround in my models, for exemple :

def logo
    send("logo_#{I18n.locale}")
end

Let me know if i can help

Thanks

Thomas

Traco isn't really intended for things that aren't regular string attributes – one of my projects uses Carrierwave 0.9.0 with Rails 3.2.17 but I intentionally did not try using Traco when I localized an image, since Carrierwave does some fancy magic with the accessor.

So I don't consider it a bug.

That said, it would be convenient, so if it can be supported without complicating the code a lot, I don't think I'd mind having that in Traco. If I get the inclination I might look into that. Otherwise a pull request would be welcome, or some research into what the specific issue might be.

Thanks for the report!

Closing this since it's not a bug.