Polyconseil / vue-gettext

Translate your Vue.js applications with gettext.
MIT License
278 stars 55 forks source link

Cannot read property 'hasOwnProperty' of undefined #63

Closed narrowtux closed 6 years ago

narrowtux commented 6 years ago
vue.js:1693 TypeError: Cannot read property 'hasOwnProperty' of undefined
    at Object.getTranslation (vue-gettext.js:276)
    at Object.pgettext (vue-gettext.js:307)
    at Proxy.render (range_picker.vue?a873:35)
    at VueComponent.Vue._render (vue.js:4385)
    at VueComponent.updateComponent (vue.js:2694)
    at Watcher.get (vue.js:3035)
    at new Watcher (vue.js:3024)
    at mountComponent (vue.js:2698)
    at VueComponent.Vue$3.$mount (vue.js:8217)
    at VueComponent.Vue$3.$mount (vue.js:10531)
    at init (vue.js:3984)
    at createComponent (vue.js:5416)
    at createElm (vue.js:5352)
    at createChildren (vue.js:5487)
    at createElm (vue.js:5392)
    at VueComponent.patch [as __patch__] (vue.js:5870)

This usually happens when I introduce a msgid with context that is identical to a msgid without a context.

Version 2.0.25

narrowtux commented 6 years ago

Honestly I would prefer this tool never to crash and you could wrap it with a try-catch. The problem here is that I don't want to run my extract setup every time I introduce new msgids because it takes ages. But if this crashes, I can't even see the component that contains the translation.

kemar commented 6 years ago

If you want some help, please provide a link to a minimal reproduction of your problem. I don't have the time to reproduce your issue by myself.

narrowtux commented 6 years ago

Me not providing a full-blown reproduction repo doesn't mean my issue is not valid don't you think? I also don't have time to spend on setting this up.

kemar commented 6 years ago

Sorry, I didn't mean to offend you.

I'm closing this until you'll provide more information or a way for me to reproduce your issue.

narrowtux commented 6 years ago

Ok. I will try to give you more information on how to reproduce tomorrow. I was under the impression that you would only look at this if I created a repo.

Sorry if I sound harsh.