ember-cli-i18n
ember-cli-i18n copied to clipboard
Fix helper error on Ember 1.13.0
I am not sure how are you dealing with handling different ember versions, but I am using this addon and after update to Ember 1.13.0 I got this error:
I played a little in the console and I found that view
is now inside env
. So I did this little change to make it work in my project.
Now it can work with the two versions, the problem is that I don't know how to test this because (as far as I understand) this function is just tested with acceptance tests and I am not sure how to handle another ember version. I think that a test is necessary because the reason of the change is not clear for someone that is just watching the helper code.
Well... hope it helps =)
:+1: I can confirm this is working under Ember 1.13.2. Just upgraded and with 0.0.6, app broke. Replaced myself the files to test.
Hope this gets merged asap, will have to branch for the time being.
:+1: Came to the same solution yesterday when I upgraded my project to 1.13.
We should actually swap to extend from Ember.Helper
for 1.13+. This lets us remove some of the hacks we have:
- gives us access to the container
- allows us to call
recompute
(which is conceptually similar torerender
of a view) when the locale changes
Although, I think that it might be better to just officially deprecate the library in favor of ember-i18n and focus our efforts over there...
@rwjblue I didn't know about the new Ember.Helper api ... and also didn't know about ember-i18n =S, but looks very nice and I think that migrate a project to use it won't be too hard.
@bhserna I just migrated one of my projects, and it wasn't hard at all.
If you run into any issues migrating (features that might be missing, a transition document or whatever) open an issue in ember-i18n and ping me in it. I'm happy to help...