-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cannot read property '_common' of undefined #44
Comments
What is your version of Angular ? I tried to remove |
1.3. |
Do you have a gist with how you try to change the lang, also a small exemple to have this error. |
I change the lang with each lang in languages
- var country = (lang == 'fr') ? 'France' : (lang == 'nl') ? 'Netherlands' : (lang == 'en') ? 'United-Kingdom' : 'Belgium'
- var langCountry = (lang == 'fr') ? 'FR' : (lang == 'nl') ? 'NL' : (lang == 'en') ? 'EN' : 'EN'
li(class=(currentLanguage == lang) ? 'active' : '')
a(href="", id="site-#{lang}" data-i18n-load="#{lang}-#{langCountry}")
img(src="#{MEDIA_URL}images/global/flags/#{country}.png").flag-icon And my config is: babelfishProvider.init({
namespace: 'i18n',
state: 'dashboard',
lang: $cookies["sy-locales"] + "-" + $cookies["sy-locales"].toUpperCase(),
});
babelfishProvider
.lang({
lang: "fr-FR",
url: "/i18n/fr-FR.json"
})
.lang({
lang: "en-EN",
url: "/i18n/en-EN.json"
})
.lang({
lang: "nl-NL",
url: "/i18n/nl-NL.json"
}); |
Ok I've seen it once. It's a bug coming from this commit 0f486aa ( I don't know why we do not have this error everytime, and it should not be able to enter the condition. A patch is coming. |
It should be ok now. v1.7.2 is available with the patch. |
Works fine ! Thanks. |
In lazy mode I have this error when I switch the language. It doesn't break my app though.
I have a file for each language: fr-FR.json, nl-NL.json, en-EN.json
TypeError: Cannot read property '_common' of undefined
at Object.setTranslation as updateState
at bundle.js:583
at Scope.$get.Scope.$broadcast (angular.js:14720)
at x.transitionTo.x.transition.I.then.x.transition.x.transition (angular-ui-router.min.js:7)
at processQueue (angular.js:13189)
at angular.js:13205
at Scope.$get.Scope.$eval (angular.js:14401)
at Scope.$get.Scope.$digest (angular.js:14217)
at Scope.$get.Scope.$apply (angular.js:14506)
at dependencyResolverFor.js:13
The text was updated successfully, but these errors were encountered: