| | |
| | | window.layer.__wcsI18nWrapped = true; |
| | | } |
| | | |
| | | function hasElementLocaleMessages() { |
| | | var key; |
| | | if (!state.ready || !state.messages) { |
| | | return false; |
| | | } |
| | | for (key in state.messages) { |
| | | if (Object.prototype.hasOwnProperty.call(state.messages, key) && key.indexOf("el.") === 0) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | function wrapElement() { |
| | | if (!window.ELEMENT || window.ELEMENT.__wcsI18nWrapped) { |
| | | if (!window.ELEMENT || window.ELEMENT.__wcsI18nWrapped || !hasElementLocaleMessages()) { |
| | | return; |
| | | } |
| | | var element = window.ELEMENT; |