-
Notifications
You must be signed in to change notification settings - Fork 154
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
Migration from 0.4.0 to 1.1.0 fails because of the <span> tag in 1.1.0 #101
Comments
Yes, this causes different problems with migration, mainly with the autotests, but we met the side effects too with the For sure, starting right from 1.0 we will consider this as a feature, but now I'll be glad to see a sort of migration guide. |
The reason why the translation gets wrapped in a span tag probably has something to do with https://github.com/rubenv/angular-gettext/blob/master/src/directive.js#L49. The translation is wrapped because angular.element() fails when given text. Further down element.contents() should extract the translation from the wrapping and replace the existing translation. For some reason here the translation is still wrapped when swapped in. |
It seems $compile wraps root text elements in span's so that it can attach data elements. (angular/angular.js#1059) |
Angular 1.6 fixes the span issue. See: |
Great to see this fixed =) |
Hi,
Is there an easy way to migrate from 0.4.0 to 1.1.0?
As long as 1.1.0 starts to add with translated string, it fails in certail scenarios like
which ends up with
The text was updated successfully, but these errors were encountered: