@@ -10,6 +10,8 @@ found at http://polymer.github.io/PATENTS.txt
10
10
*/
11
11
import '@polymer/polymer/polymer-legacy.js' ;
12
12
import '@polymer/iron-ajax/iron-ajax.js' ;
13
+ import IntlMessageFormat from 'intl-messageformat/src/main.js' ;
14
+ window . IntlMessageFormat = IntlMessageFormat ;
13
15
14
16
// This isn't a complete `Object.assign` polyfill, but this element expects
15
17
// JSON and doesn't provide more than one source object.
@@ -25,14 +27,14 @@ var assign =
25
27
} ;
26
28
27
29
/**
28
- `Polymer. AppLocalizeBehavior` wraps the [format.js](http://formatjs.io/)
30
+ `AppLocalizeBehavior` wraps the [format.js](http://formatjs.io/)
29
31
library to help you internationalize your application. Note that if you're on
30
32
a browser that does not natively support the
31
33
[Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)
32
34
object, you must load the polyfill yourself. An example polyfill can
33
35
be found [here](https://github.com/andyearnshaw/Intl.js/).
34
36
35
- `Polymer. AppLocalizeBehavior` supports the same
37
+ `AppLocalizeBehavior` supports the same
36
38
[message-syntax](http://formatjs.io/guides/message-syntax/) of format.js, in
37
39
its entirety; use the library docs as reference for the available message
38
40
formats and options.
@@ -42,7 +44,7 @@ var assign =
42
44
import {PolymerElement, html} from '@polymer/polymer';
43
45
import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
44
46
import {AppLocalizeBehavior} from
45
- '@polymer/app-localize-behavior/app-localize-behavior.js';
47
+ '@polymer/app-localize-behavior/app-localize-behavior.js';
46
48
47
49
class SampleElement extends extends mixinBehaviors(
48
50
[AppLocalizeBehavior], PolymerElement) {
@@ -98,7 +100,7 @@ var assign =
98
100
import {PolymerElement, html} from '@polymer/polymer';
99
101
import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
100
102
import {AppLocalizeBehavior} from
101
- '@polymer/app-localize-behavior/app-localize-behavior.js';
103
+ '@polymer/app-localize-behavior/app-localize-behavior.js';
102
104
103
105
class SampleElement extends extends mixinBehaviors(
104
106
[AppLocalizeBehavior], PolymerElement) {
@@ -128,7 +130,7 @@ var assign =
128
130
customElements.define('sample-element', SampleElement);
129
131
130
132
@demo demo/index.html
131
- @polymerBehavior Polymer. AppLocalizeBehavior
133
+ @polymerBehavior AppLocalizeBehavior
132
134
*/
133
135
export const AppLocalizeBehavior = {
134
136
/**
@@ -144,13 +146,11 @@ export const AppLocalizeBehavior = {
144
146
145
147
/**
146
148
Fired after the resources have been loaded.
147
- *
148
149
@event app-localize-resources-loaded
149
150
*/
150
151
151
152
/**
152
153
Fired when the resources cannot be loaded due to an error.
153
- *
154
154
@event app-localize-resources-error
155
155
*/
156
156
0 commit comments