diff --git a/.gitignore b/.gitignore index 1e501e3..696303e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bower_components -node_modules \ No newline at end of file +node_modules +.idea diff --git a/bower.json b/bower.json index f3f59ce..6df4f47 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "i18n-msg", - "version": "0.0.5", + "version": "1.0.1", "authors": [ "Eric Bidelman " ], @@ -22,13 +22,10 @@ "/tests/" ], "dependencies": { - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0", - "polymer": "Polymer/polymer#^0.5.5" + "polymer": "Polymer/polymer#^1.0.0", + "observe-js": "Polymer/observe-js" }, "devDependencies": { "web-component-tester": "Polymer/web-component-tester#master" - }, - "resolutions": { - "webcomponentsjs": "^0.6.0" } } diff --git a/demo.html b/demo.html index 740dd84..0e0ea64 100644 --- a/demo.html +++ b/demo.html @@ -9,7 +9,7 @@ - +

"Days" in selected language is: PLACEHOLDER_STRING!

"Hours" in selected language is: PLACEHOLDER_STRING!

diff --git a/i18n-msg.html b/i18n-msg.html index 6012830..9f7b568 100644 --- a/i18n-msg.html +++ b/i18n-msg.html @@ -1,4 +1,5 @@ + @@ -22,8 +23,8 @@ file on your server. For example, `I18nMsg.lang = 'es'` will use `locales/es.json`. `I18nMsg.lang = 'fr'` would use message strings from `locales/fr.json`. -The directory name can be configured by using the `messagesDir` attribute, but the file -cannot. `` will always attempt to use messages from `/.json`. +The directory name can be configured by using the `messagesUrl` attribute, but the file +cannot. `` will always attempt to use messages from `/.json`. Note: - message files are read once and reused for all instances of ``. @@ -46,7 +47,7 @@ -### Gettting a message: +### Getting a message: // No argument returns the instance's message: document.querySelector('i18n-msg').getMessage(); @@ -64,166 +65,209 @@ @param {Object} detail @param {string} detail.language Object full of messages for the set language. --> - + + - diff --git a/observer.html b/observer.html new file mode 100644 index 0000000..22acd83 --- /dev/null +++ b/observer.html @@ -0,0 +1 @@ + \ No newline at end of file