jshcrowthe / wc-i18n

A web component centric solution for i18n (inspired by pkaske/i18-n and ebidel/i18n-msg). Designed for individual web components that come with translations built into the component.
https://jshcrowthe.github.io/wc-i18n
MIT License
6 stars 5 forks source link

Polymer 2 doesn't support this.is #12

Closed marybeshaw closed 7 years ago

marybeshaw commented 7 years ago

I'm trying to incorporate this wc-i18n into a Polymer 2 component, and the only trouble I ran into is the fact that this.is isn't supported. I forked the repo and added a function to replace this.is. I can create a PR using the code below or something similar, if you'd like.

        __getComponentName: function() {
          return (typeof this.is === 'function') ? this.is() :
            (typeof this.is === 'string') ? this.is : this.tagName.toLowerCase();
        },
marybeshaw commented 7 years ago

This is now merged.