{"_id":"preact-i18n","_rev":"29-9a9867baebf5679ffc6585d7ae49b330","name":"preact-i18n","description":"Preact internationalization, done simply.","dist-tags":{"latest":"1.5.0","preactx":"2.4.0-preactx"},"versions":{"1.0.0":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.0.0","description":"Preact internationalization, done simply.","jsnext:main":"src/index.js","umd:main":"dist/preact-i18n.umd.js","main":"dist/preact-i18n.js","scripts":{"lint":"eslint src test","test":"npm run lint && karma start karma.conf.js --single-run","build":"npm-run-all clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_jsnext_main -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_jsnext_main -o $npm_package_umd_main","minify:cjs":"uglifyjs $npm_package_main --pure-funcs classCallCheck possibleConstructorReturn -c pure_getters -m toplevel -o $npm_package_main -p relative --in-source-map ${npm_package_main}.map --source-map ${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main --pure-funcs classCallCheck possibleConstructorReturn -c pure_getters -m -o $npm_package_umd_main -p relative --in-source-map ${npm_package_umd_main}.map --source-map ${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size)\"","release":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD 3-Clause","files":["src","dist"],"babel":{"presets":["es2015","stage-0"]},"eslintConfig":{"extends":"eslint-config-synacor"},"devDependencies":{"babel-core":"^6.25.0","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-polyfill":"^6.9.1","babel-preset-es2015":"^6.9.0","babel-preset-es2015-minimal-rollup":"^2.0.0","babel-preset-stage-0":"^6.5.0","chai":"^4.0.2","chai-as-promised":"^6.0.0","chai-subset":"^1.2.2","diff":"^3.2.0","documentation":"^4.0.0-rc.1","documentation-theme-default":"^3.0.0-beta1","eslint":"^3.19.0","eslint-config-synacor":"^1.0.0","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^6.10.3","gzip-size-cli":"^2.0.0","karma":"^1.7.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.0.2","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^3.4.2","npm-run-all":"^4.0.2","phantomjs-prebuilt":"^2.1.7","preact":"^7.2.1","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.42.0","rollup-plugin-babel":"^2.4.0","rollup-plugin-buble":"^0.15.0","rollup-plugin-memory":"^2.0.0","sinon":"^2.3.2","sinon-chai":"^2.8.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^2.8.28","webpack":"^2.6.1"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"e275bfc3c47034f332bf4ef88420e760d925b69d","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.0.0","_shasum":"9a50ca8c0cf7206e6e271642e4ace69e9d5fb466","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"9a50ca8c0cf7206e6e271642e4ace69e9d5fb466","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.0.0.tgz","integrity":"sha512-JeCwSzC1Gq8O/KyZLc5g6blWie1KAqaXD5Wy9uSWgIP9wg3knqC5HxCmnDyR1hm/SWhqsK19gqRFO1b/M60QwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCRZX+blIud0/ouZTPcHziUkVePPywojLf8b/B8qwjQgIgPVYPD5IbuTwkXV/KIRYpYyKnv2Z6U8l4InrDVViMQ7Q="}]},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n-1.0.0.tgz_1497035366568_0.5031417761929333"},"directories":{}},"1.0.1":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.0.1","description":"Preact internationalization, done simply.","jsnext:main":"src/index.js","umd:main":"dist/preact-i18n.umd.js","main":"dist/preact-i18n.js","scripts":{"lint":"eslint src test","test":"npm run lint && karma start karma.conf.js --single-run","build":"npm-run-all clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_jsnext_main -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_jsnext_main -o $npm_package_umd_main","minify:cjs":"uglifyjs $npm_package_main --pure-funcs classCallCheck possibleConstructorReturn -c pure_getters -m toplevel -o $npm_package_main -p relative --in-source-map ${npm_package_main}.map --source-map ${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main --pure-funcs classCallCheck possibleConstructorReturn -c pure_getters -m -o $npm_package_umd_main -p relative --in-source-map ${npm_package_umd_main}.map --source-map ${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size)\"","release":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD 3-Clause","files":["src","dist"],"babel":{"presets":["es2015","stage-0"]},"eslintConfig":{"extends":"eslint-config-synacor"},"devDependencies":{"babel-core":"^6.25.0","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","babel-plugin-transform-object-assign":"^6.22.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-polyfill":"^6.9.1","babel-preset-es2015":"^6.9.0","babel-preset-es2015-minimal-rollup":"^2.0.0","babel-preset-stage-0":"^6.5.0","babelrc-rollup":"^3.0.0","chai":"^4.1.0","chai-as-promised":"^7.1.1","documentation":"^4.0.0-rc.1","documentation-theme-default":"^3.0.0-beta1","eslint":"^3.19.0","eslint-config-synacor":"^1.0.0","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^6.10.3","gzip-size-cli":"^2.0.0","karma":"^1.7.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.0.2","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^3.4.2","npm-run-all":"^4.0.2","preact":"^7.2.1","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-babel":"^2.7.1","rollup-plugin-memory":"^2.0.0","sinon":"^2.4.1","sinon-chai":"^2.12.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^2.8.28","webpack":"^2.6.1"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"1058ff2ba9cf3b0a112871c5c049a484cff25a6d","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"6.6.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-Q6iuZulyoeImBC02auK0MCJtGgnsMSWQxF58IxhWT6QlO2SW69qi1d8QEA70gI71lUPdIZ6QlJHAHSpflXqIsQ==","shasum":"bf44203b3d0c3dee2e324dc4eaaa792ad5126cdf","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIZbksrztodeix0lDc+UHDJYQJkFr1PK9E9SQ/7EOprQIgYsYlT4fPI4jXqRef7vHszZQKkE0CicJrx0+1pWNoEew="}]},"maintainers":[{"email":"pal21345@gmail.com","name":"pl12133"},{"email":"jason@developit.ca","name":"developit"},{"email":"billneff79@gmail.com","name":"billneff79"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n-1.0.1.tgz_1501946970363_0.2746176531072706"},"directories":{}},"1.1.0":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.1.0","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"lint":"eslint src test","test":"npm-run-all lint test:unit","test:watch":"karma start karma.conf.js --no-single-run","test:unit":"karma start karma.conf.js --single-run","build":"npm-run-all clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es -n $npm_package_amdName $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map,url=preact-i18n.js.map,filename=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map,url=preact-i18n.umd.js.map,filename=${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","release":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD 3-Clause","files":["src","dist"],"eslintConfig":{"extends":"eslint-config-synacor"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-object-assign":"^6.22.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.0","babel-preset-stage-0":"^6.5.0","babelrc-rollup":"^3.0.0","chai":"^4.1.2","chai-as-promised":"^7.1.1","documentation":"^5.2.2","documentation-theme-default":"^3.0.0-beta1","eslint":"^4.5.0","eslint-config-synacor":"^2.0.0-beta.2","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^7.3.0","gzip-size-cli":"^2.0.0","karma":"^1.7.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.2.4","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^3.4.2","npm-run-all":"^4.1.1","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^2.0.0","rollup-plugin-post-replace":"^1.0.0","sinon":"^3.2.1","sinon-chai":"^2.13.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.0.28","webpack":"^3.5.5"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"e4b4224e9c666ec4d4be1682844256d6eebfcb21","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.1.0","_shasum":"9513ffe0cf5ebbbe05774e1af462abce70a4ed51","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"9513ffe0cf5ebbbe05774e1af462abce70a4ed51","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.1.0.tgz","integrity":"sha512-6RJRIx3U5G4WQeuxlQiKyxP8TZaP/L0a0WX95wxhRV0+rPj2NLl7zkCesWEdGsUKlz2rT+n5Tcwo3922re41Gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmVXqEmgQfIvy7JbRPfZNRwK9uoB/SvukmA4SwF3XfsgIhAOKXYuYBm276b5Hg234VEr+Jn4/24sFIOejUH1Yfe2Sm"}]},"maintainers":[{"email":"pal21345@gmail.com","name":"pl12133"},{"email":"jason@developit.ca","name":"developit"},{"email":"billneff79@gmail.com","name":"billneff79"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n-1.1.0.tgz_1504814103783_0.5841707508079708"},"directories":{}},"1.1.1":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.1.1","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"lint":"eslint src test","test":"npm-run-all lint test:unit test:prod","test:watch":"karma start karma.conf.js --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map,url=preact-i18n.js.map,filename=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map,url=preact-i18n.umd.js.map,filename=${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","release":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD 3-Clause","files":["src","dist"],"eslintConfig":{"extends":"eslint-config-synacor"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-object-assign":"^6.22.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.0","babel-preset-stage-0":"^6.5.0","babelrc-rollup":"^3.0.0","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","documentation":"^5.2.2","documentation-theme-default":"^3.0.0-beta1","eslint":"^4.5.0","eslint-config-synacor":"^2.0.0-beta.2","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^7.3.0","gzip-size-cli":"^2.0.0","karma":"^1.7.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.2.4","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^3.4.2","npm-run-all":"^4.1.1","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-memory":"^2.0.0","rollup-plugin-post-replace":"^1.0.0","sinon":"^3.2.1","sinon-chai":"^2.13.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.0.28","webpack":"^3.5.5"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"a183d6c67fde69bf2a7a25d150b99e3c80c8fdc9","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.1.1","_shasum":"8fcca29f8e12c01bcf0067c067465632c1e88d38","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"8fcca29f8e12c01bcf0067c067465632c1e88d38","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.1.1.tgz","integrity":"sha512-sI4mAoUDmpLEbHVKyYFkGtPcSpb/ArKb+7caeKNRb4GL/pDUdD2SHeOC3khoLJ8JLnLaWu79oDnfF/BpdJLerg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEoyDIi0wfVXROG8f/da8Ayfbvaef1Nr/rBluvUheZjXAiAv5xlomn4keSp+AfN5rNftTf0rspo+YruEgXLkBJqSRg=="}]},"maintainers":[{"email":"pal21345@gmail.com","name":"pl12133"},{"email":"jason@developit.ca","name":"developit"},{"email":"billneff79@gmail.com","name":"billneff79"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n-1.1.1.tgz_1504833457991_0.004885506350547075"},"directories":{}},"1.1.2":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.1.2","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"lint":"eslint src test","test":"npm-run-all --silent lint build test:unit test:prod","test:watch":"karma start karma.conf.js --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map,url=preact-i18n.js.map,filename=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map,url=preact-i18n.umd.js.map,filename=${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","release":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD-3-Clause","files":["src","dist"],"eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-react-jsx":"^6.8.0","babel-preset-env":"^1.6.0","buble":"^0.15.2","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","documentation":"^5.2.2","documentation-theme-default":"^3.0.0-beta1","eslint":"^4.5.0","eslint-config-synacor":"^2.0.0-beta.2","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^7.3.0","gzip-size-cli":"^2.0.0","karma":"^1.7.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.2.4","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^3.4.2","npm-run-all":"^4.1.1","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-buble":"^0.15.0","rollup-plugin-memory":"^2.0.0","sinon":"^3.2.1","sinon-chai":"^2.13.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.0.28","webpack":"^3.5.5"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"86aad59342d5e40b3cf7c6527e83fc35ea2313c1","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.1.2","_npmVersion":"5.5.1","_nodeVersion":"6.6.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-gTyDH5C68HSRPeZp0jK1DV2gt7rrEHGazsQnWOgbEvxQiwfR9kyNWqsJOTPEv+WHuXzmvZUmnyJISoppt7jvHw==","shasum":"a173ef9c25ced8f595e71bf2d08fc7d3cb2bc206","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/oCt6BFUvGM/7YVWrIKcdMh/dA62LoxGYkUX+VwnA5AIhAO5NtwpGlDEi6kKty/NUofVZO/5RxbshEzZHk3LPjUpZ"}]},"maintainers":[{"email":"pal21345@gmail.com","name":"pl12133"},{"email":"jason@developit.ca","name":"developit"},{"email":"billneff79@gmail.com","name":"billneff79"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n-1.1.2.tgz_1509558103078_0.6811797274276614"},"directories":{}},"1.2.0":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.2.0","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"lint":"eslint src test","test":"npm-run-all --silent lint build test:unit test:prod","test:watch":"karma start karma.conf.js --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map,url=preact-i18n.js.map,filename=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map,url=preact-i18n.umd.js.map,filename=${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","release":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD-3-Clause","files":["src","dist"],"eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-preset-env":"^1.6.0","buble":"^0.15.2","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","documentation":"^5.2.2","documentation-theme-default":"^3.0.0-beta1","eslint":"^4.5.0","eslint-config-synacor":"^2.1.0","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^7.3.0","gzip-size-cli":"^2.0.0","karma":"^2.0.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.2.4","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^5.0.0","npm-run-all":"^4.1.1","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-buble":"^0.15.0","rollup-plugin-memory":"^2.0.0","sinon":"^4.2.2","sinon-chai":"^2.13.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.0.28","webpack":"^3.5.5"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"0287d0f1a5eabc050a475cee160ecedd7463145b","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-c6qtygR6usL8jfxevqE6fOVRT2Nl4SNkz1vtz67pM+CW7exWnppjduseAgyklNhcbDdTcEQyWqfD5cRjFx35LA==","shasum":"a1f49bb7b8001d433bffdffe0e7fc7cbaaf20cd8","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.2.0.tgz","fileCount":21,"unpackedSize":125878,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCV8EUly2fZZInoUafLvs3f3zwMfxwFP8MNkp9Yn61Q8wIhAJYY2vfSWUx0aTkhH61BqQfYrrAcTPtIiNfQNv9k5kT9"}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.2.0_1518112481669_0.7477391101582982"},"_hasShrinkwrap":false},"1.2.1":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.2.1","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"lint":"eslint src test","test":"npm-run-all --silent lint build test:unit test:prod","test:watch":"karma start karma.conf.js --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map,url=preact-i18n.js.map,filename=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map,url=preact-i18n.umd.js.map,filename=${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>"],"license":"BSD-3-Clause","files":["src","dist"],"eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-preset-env":"^1.6.0","buble":"^0.15.2","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","documentation":"^5.2.2","documentation-theme-default":"^3.0.0-beta1","eslint":"^4.5.0","eslint-config-synacor":"^2.1.0","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^7.3.0","gzip-size-cli":"^2.0.0","karma":"^2.0.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.2.4","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^5.0.0","npm-run-all":"^4.1.1","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-buble":"^0.15.0","rollup-plugin-memory":"^2.0.0","sinon":"^4.2.2","sinon-chai":"^2.13.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.0.28","webpack":"^3.5.5"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"10c6749a3c469ddb90e00372233488c15af3b3d8","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.2.1","_npmVersion":"5.10.0","_nodeVersion":"8.9.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-SNzhq1Wp+47wHcvk+Sf2BhKX66B2GdCuresMO4GvQtWjQZMoUM2OWPbFityEivKvZ54ipbg4I1GzrjQbzz/6Kw==","shasum":"e88ae58fd9b4ee7ff59fd2ed2458bc5b93916f48","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.2.1.tgz","fileCount":21,"unpackedSize":127034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/0Y+CRA9TVsSAnZWagAA3NsP/2EoxG4AxR0ajPIaVFVj\nSBxuAdZfYIwYa/r8go0DU5TnK3YMJjuajLSdHnfD/gWts9enLFQfE6E0da/1\nJYaQJoOT51qWfpWSoWmOyxfDGwV5VFSlnlZwmcxcDyCtUw9AxPe3baTbiVQ4\nmR2BvM+RBIg2qIHxK5+9AoO9RB5C1nr4oRJ+tBdEUrwqbHhSZ0fDzTolyiab\n0/5xSPGX9x3/iEooTfceijgizdNEkhh6lWWbvW2FpjkotQyV7E870Wx8W0fC\nSXEQDyMpjKcQue/g0Z6HqSP4+w/L9wHbgPUBEjysQDIS+eEE+xSa6zPvc2xr\nkvQ/c674YbYttjGh/lsVUINZzdlpVrz9BTw6Y20+EoXKPUDvtqlwumwF5s9x\nIxSbQhqqGbBWoKWXojQyJSUfurCCGT+HW6GxkhHdsczOaQn67lMF3QVyKsAN\nAD0RTtv6fAMQoBN0EjpSPh7DmZ4CPd1EdOePmmEz8tv0t+jFl7KY8hXWY7Ca\nFkmUKhu4W0CmPwP7ISOsFAPfaZWaaNCFKr5nRlEoe6UJu3Q18IcX/Jbuo9HS\nyb4RgGjpFa6cEqQmS14nAUlOtQTVe90qloCaar+eyIe9p73Byi8OIYxCaih6\n7dTW6+EzGPI1B46vzmX7jmWk486urvsitlo/Ol6UNJUd9O1/JFotinPr5epO\nUI0+\r\n=8GXA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCk2CkYA0TnWdLfPj2wfNHt8Dp+5WUIa67L6phGxvkXFwIgT4bDnQR5BrnCyuc1hlNHMz07EX3cbKeKbiVB3i/zCJE="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.2.1_1526679101125_0.7579547387470293"},"_hasShrinkwrap":false},"1.2.2":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.2.2","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"lint":"eslint src test","test":"npm-run-all --silent lint build test:unit test:prod","test:watch":"karma start karma.conf.js --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c pure_getters,pure_funcs=classCallCheck -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map,url=preact-i18n.js.map,filename=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c pure_getters,pure_funcs=classCallCheck -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map,url=preact-i18n.umd.js.map,filename=${npm_package_umd_main}.map","docs":"mkdirp docs && documentation readme -q --section API src && documentation build src -f html -o ./docs","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\""},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","files":["src","dist"],"eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.8.0","babel-preset-env":"^1.6.0","buble":"^0.15.2","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","documentation":"^5.2.2","documentation-theme-default":"^3.0.0-beta1","eslint":"^4.5.0","eslint-config-synacor":"^2.1.0","eslint-plugin-mocha":"^4.7.0","eslint-plugin-react":"^7.3.0","gzip-size-cli":"^2.0.0","karma":"^2.0.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-cli":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.2.4","karma-phantomjs-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.3","mkdirp":"^0.5.1","mocha":"^5.0.0","npm-run-all":"^4.1.1","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.5.4","rollup":"^0.45.2","rollup-plugin-buble":"^0.15.0","rollup-plugin-memory":"^2.0.0","sinon":"^4.2.2","sinon-chai":"^2.13.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.0.28","webpack":"^3.5.5"},"dependencies":{"dlv":"^1.0.2"},"peerDependencies":{"preact":"*"},"gitHead":"d2d4d00c6b49faafc74471c4f863e642ba5fb22b","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.2.2","_npmVersion":"6.1.0","_nodeVersion":"8.9.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-1gn4rPrsH/LKjznMEq6oHwytU6y6oQN36wv+xiO3//hTHm8nB8KIFzEmwGEJ7EpSWhH7myE0t4YPfPvXFkwO9Q==","shasum":"7bd0b4233aa27c290cb4b4600bbbb4d19273d312","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.2.2.tgz","fileCount":21,"unpackedSize":127436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRnUhCRA9TVsSAnZWagAANHIP/jdSN0pn/wz7mhVUn6tv\nCcQ8x7Uf9Lep5BPcIOo9n+z8EQczesvcJXUMnX8yqWnKJY4ui+dNQAN5ktv8\n+oiTst50QCm6Fiu8nqjy/sFq8BOTcxiuLUfMjU6GbNHlRU1qqtwVa3pRnu8V\nBlBDH+JUZ0MIfotQUy/sjo2yHrM9iqLz/MP8ZaPhTKf5saYp1r7WJm8s1bPx\nWl0XCvkVzcinQ6jbgLp7EWPdgdW9krytF4hdoUrwDC2ZW+i+4T/YKQE2jvfa\nrRdOygZpvpQxuJj38FEpYkbK9MOMx8jIpfosMc2GSbfzoHqbROWqIsvO6h0U\nYzEJBlM7GIIeRGWhnwW46vhTzoEIDShpGCbtkMHuk6bWSPuXzSWnc/kNkdMO\nYexpo8ECFLE76KH8tH5MiBbP+9SyA69aynI99f6VspYnR/zZFRXaz0W3O0xb\nMEdXly3KYTf5maKKhua2PoJJr8Bt3S86d0FkEH6SksyVofb6TZGDj0v3Qi6T\nAKXlL5auKKT8AZ20AYXrM2Md7JDK5DtTRJhyR77RMwUxMQ7mpZOyb5sAB0Yf\nkiPi7kfYmvIedYGh7pZSkFPtDpe/0QhFqXSxQXHxZpZn3c30BtjPDWSEaZC6\nKRLaHEExudTYf8anAp9Hybuhh9Hf1M+WCGWAOvkSl/h34ZCmRyXiQFDD0UTm\nmCJU\r\n=c+HS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/VvRnCnPneofWl1gGiv0mpWfLSB3dS++t2uO9QxVx6QIgIgwjPfHdKCeF31md6QHrgqykZfgbmY4vUw0toPC/Nkk="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.2.2_1531344160979_0.18207289621186096"},"_hasShrinkwrap":false},"1.3.0":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.3.0","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map","docs":"documentation readme -q --section API src","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\""},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":"*"},"gitHead":"732c18e6db60a423e2b0c1af17392362ad0df497","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.3.0","_nodeVersion":"8.9.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+6PA1JtqFxYVgTmeFv+ofrLMopUZosDpYHNl3gxiYoQKuB6zhU3FQ87XOLgM92xCPMLsHh8c43AdulGjGdl9SA==","shasum":"7599c599e2ea9a7112b5f64249fb99cc9490ae4f","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.3.0.tgz","fileCount":21,"unpackedSize":94856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmoslCRA9TVsSAnZWagAAxfoP/3cDVBs1epSkAwr7VRGT\nSF872T2gXeFitEp2IhqmXcPS7TiSkcSQlouaqNNfVdoC5CD+DU9h0HfHs7lr\nXZvdnkwukEEK7HqTu7oXnl1AVAhmN2+qBF3q/XM6n9nORGbleE9hCJtU0Wj4\nJh0yflIzOEZGgVHtzrygSu0zTelitbhedUeeRlSDyZz24S8Twwn1exTb6no5\nXoetq8QLCnACxjpJZaAaLSW+nU6iS026bkJmRTKRJIfar74G9mjvRX8INs0r\nfK3dTkfSWoBVaGBjK3/ml8LwDz0pTpMPUKGLTOQWHUwwWr0VVlepAAn49i6z\n9LuBo4AOfl4Px61rGM1t/+Ot3ZKbjru3pLWmbpZV0bnyitFW2Lg57j6RMtKL\nTFddMmMN1+JmbzLMymUCsvHM7/LKLkKnJSLyqzgWo2+yBxs2vE8qLCz6poRj\nHF+l5171hvs52DkndyPUsBVBu70brziwbxNUItDeIsSXHV1sC/smRhqBlBk9\nNgYn7rVbHXS79Ofe1RiG5vhWz+YD6z7SWcSI55hu2QFaEDEBMLa09/rNmRz9\ncjq8Ry6j0Ym3NcGIIH8wCG5gfod8OOMMbi7CKmkpJt90cv18zz26w7xx2iVu\nTwR1HUEwxqF2YaHE1h4IjLV0ldfRXDJxribTpPhyBkJoi9mskVM5IZf8QpO1\nxVcR\r\n=xfqL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKB2SrrQB9JS2l3uWloFbQdag35pClkPm/fnhTV31Y/AiAKARU5atVpUP5/lyTSeiVLCo1KHSaaKiJWCdUEAKZh9w=="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.3.0_1553632036350_0.8954434651336101"},"_hasShrinkwrap":false},"1.4.0":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.4.0","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map","docs":"documentation readme -q --section API src","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":"<10"},"gitHead":"b7e63ebf1185c3762d4683b5c1245afc913af000","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.4.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-2R+K1EjxhJSFUyZg5l5HpV/QynW50d+/LuN2xbqhOD5q0tvUGXft6Ib2ISscBVrE1MxAy1quO196aHBvdKDWCQ==","shasum":"d0009152e0a2141e496cfd1fab13b972ea3057bb","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.4.0.tgz","fileCount":21,"unpackedSize":98610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI5iZCRA9TVsSAnZWagAAo1oP/3ps6FJBTZ2BjnQlWBQO\net2DY6S7eX2LkVuIw+nhgf6A641DorGpTgTiKxfIZpATxbNpxutmXuAcFtt4\nla+JejrU8p3tXbPUaBZdliXKIXnmkYH3GvLRq+Zuku3jnfwtySCbIzYHV3Dg\n6t88Ko/4Of9y2qlaPGhtLx8WeCyyC1rp92kiJ0PXQt+STes+Q3NKSp0jZ5O5\njFLJtz8KYVzqiHqEMINYN4IOon6Zyrz5mS3xRReuVnaCxeHRiB2Wa1nRVuOJ\nKyovREd3p+TGWYNJm0guNhXqY5i7yUy+Ht709LQsKCIZTDMvpQCvYUJDXIox\ndxVFrJKjG3pd3Mbn0EN0vhiFEAEYRjoivTRCLTkCfCn46j8XtdsqqlnQbAmM\nm4xjlG0d3uz3rNCKBJElYte4SxZmhgtJZ+5TTKdAoF3xJ6fDl4llwJicqYF6\nihANfnNHrRHzB7edQnDa8lhfAE1ILgiSp0O0onqBKawg1A+9llr61uG+dYVQ\nilAhlH2wLcmkkl95SbWCW1s0pKHd60JnP9eEzb13EphouHlBc4VmJ6J1H98u\nqzzISJTC4rT5z2N6JDN3HsiwvT31r2dAPBzSMU7FbqTnrQ1gsoXkg1N2cNN7\nQy9sytoBrN7aW/oFsh6gG5uaPjsVO8w2xZ5ch9ipsAYCdnY4BjYnG8QRrXLB\nPO7q\r\n=4LRX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDp4mO37IhBOcf0k0Ov/2qWPb36EcmgkHzxO3wtlMa9wIhAKcOS6oTmgaDtmwg27+nIT9IIT0fat3zUwiZT1bMtNdK"}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.4.0_1562613912956_0.5961887129852894"},"_hasShrinkwrap":false},"2.0.0-preactx.2":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.0.0-preactx.2","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map","docs":"documentation readme -q --section API src","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.0.0-beta.2","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":">=10"},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [intl](#intl)\n    -   [Parameters](#parameters-5)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}` (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}` (optional, default `{}`)\n    -   `props.children`  \n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"e040a0aa5fb7bb91b799508a50262fed94fa07e2","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.0.0-preactx.2","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-UEuiSajR+RHTaPneqqWMgC0dmT9R5IF+n8slNV5Uog533UGsncKaCeK1UyadlWKPKGHLaM5oZohGE9YF70xFnA==","shasum":"13736788bf7c677c042e640517dd1d32cef49a06","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.0.0-preactx.2.tgz","fileCount":21,"unpackedSize":94302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI68/CRA9TVsSAnZWagAAsm0P/AkGokb7YN9h1urFQ+0X\n5IlDrmP3y2AN1N3B3VvvLvp62VCMruPouU/y3L3IIUlD2r5Tot4mFMRp0KOW\naFsNgrVYgnzXSUZM4n8V/I7iXRU4WUiGH0Wy/rF/lBs997SH/CqSRqmmW12F\nM6SuVIQRkBwmmFvrM03kjwOn1aVp2vNmTEGR8MALrSu3alfz/RjAdKMYlfSx\nDJsyqzzNtugYM6/EKwumdm5XALEwbbzKUuI28sCubfu09K1Mdo+ND7o2vSrZ\nOA2XdnUgh/7ktxqdaoMU3DRQ8vROsSH7/OSeG38DlFyDoue/OfN6Xmas5bfe\nDjgdqjS1Rx2BvQw7b6k+uGQ32m8IZeREXzje2t9ddUPwwfp1gLBeOzVP99HB\n/snX57Q8FQIISuH25dQcFojEnJ/RzoTsFGWIXsz6iWgYvFDSynrnc4XTGAfY\nmvdPat8OO5JU+eMCa0gQIdbAXrtm4/YCMDDEN9zCtVRcSVIbD63h96DYNE+A\naVE7q+FlUs4SHkooyTP8/bMD5fRSv3fDlUdX1hbW3dyZ91edov5lSdtFXTpI\n1oAVN/YC9V05pB0d3gtKL5tsFgAxFYXYvSSOKdhIDNUpt45gl9u+wUw11TXx\neOAzxijt+x5uUKT7P1kcCBBVxk8UjkE5rYc2p4ZCp8yyJPxK4czImDGQB5IQ\nmvsB\r\n=nDVT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKLEtCvhMSBXBZkFRYFmgVlbqOW8kwe+ZAmcox81/9ygIhAOaCK0jRpSModtciJ4OefQrfowYb6b30qZRVFXc7h/Au"}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.0.0-preactx.2_1562619711171_0.994759486324263"},"_hasShrinkwrap":false},"1.4.1":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.4.1","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"cross-var npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":"<10"},"gitHead":"1ea0fc187c2c795758a7e81c500959e062731090","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.4.1","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-FA0lVb3b3EVR1nJSglh/Bgg38ntRdp9VV1ewvpn46Pz7yuwOnJQBC8CddemmQjl9jdFCj5gUOgkJR8//9WZDSw==","shasum":"f9454485bbd589a5cee9064132cfbf4f4ab8ee0f","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.4.1.tgz","fileCount":21,"unpackedSize":98775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde6w8CRA9TVsSAnZWagAAHaoP/jW41tTYQchURsELolFK\njDLbexFkHJDyHGPH+MxlCghd8oaCzuELWzza6etvZ94MvGf7AXA72SHcj5FK\n9VdLfp0/l5umNMet7wbqQH9mO50A2oS9pBV1GBAAT+Zu/T2tiZuvC8Nb1+Ce\nojZqaA68OdgnCoO5od2DzmYcbKd1DAoHZMymqRATMz0fouttN6S0iYTkHRbt\nAWIlCzxR/M10qc6EMgQaBoieDUtgdI32mjL3SO6XqeOzZN6ztmuioqCBDXTf\nWfY99aCU0i/+umpvct9eS+W9Xq3QLgjbBcIqCrfmihquOsxGICthDnC767GR\nsbbc+2OlhLgDgtcX/EzUzS5ClGge2Hk5WdXVpwglzY93j31rQMBD5B6S9N9q\nhgNonMReNlR+P8LmwtrlmkdP6b47jfF0pjFq1/Ur/28rN+HytJKJgvLyl8Ji\nYT+Hl7gmYTDJbILvk8ENY7eyPUtA/MjIYpULPjRjkqc6Vs3uuQ+/KkYcMUMN\nZHbzSeb06bqTfzZiNWgLnIgXfUevEhp42kKLkO3Ju08bl4Q1TzaPTN/wXf1r\n53xSBPxQ3cGH837/G+Ebq+sWiNLMXmSvdCW6ygBvvjfhgcgDjuJBN0BRGUWw\nfNz61TGokCYzeEYh8r2e1sYKdLiV6ZQGf0xIHYW0h6Gszza8POrDykVu7rrU\nsjiC\r\n=A0P7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsrWKiFgKABH/PQPySQdt2QFRomI0dH2qetqKbGnGj6AiEAs4gDOlMPZlQPMwRR2R64Uixk77Dh/6vEkNcJpMLHNUo="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.4.1_1568386107993_0.9786942626044195"},"_hasShrinkwrap":false},"2.1.0-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.1.0-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map","docs":"documentation readme -q --section API src","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":">=10"},"gitHead":"e55aa3343b00a995080199e6483715028cbc84ee","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.1.0-preactx","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-VK1+1htTRWNp7XudlQ7nRSKhOyxhU/VV2WwuBtpMTOipGdJusNPnp9AYlgcCMDolb4F7KXMmyModUBicWV5e6g==","shasum":"6a2efaa70fa116e7bfbe80fefe1e16bb4eb2d89c","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.1.0-preactx.tgz","fileCount":26,"unpackedSize":141221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+bCCRA9TVsSAnZWagAAHpkP/iHuQgsmV0CEL+0nE8DK\nqbwX2BWO/C+YxGlC5AaW5lzdeQEAsIV6yh5tmkYyPz902Dnq/TxU2i22b37C\nynzbdP61lcbDWgOtRLzz52pwQU4aDBaN6gk00bBoP7QNcyqO9UlDx5yvxngN\ngTogHg5uNl58ArXJy13/eaTX7oYV+PwbIFntAV+6uDX9fCoGDiHLPFd/5hwS\nRnjQKkuXE6zP7d94d5WVlihp4Kcr6eAbe3EjTp4b7SaLKzE7bRnKUQTqOe/2\nhAKykCdQJ6+hFGumkIQWPIt+txtRpL1vWVUHOqM6WZgq1bDg+gIPenecAKkR\nK8JhiYFOprKgV7+2uaO3ilS8SVFxHPwy+Ifxcb24hhuuLUTY5rku5vJQcKHd\n9aB0t9F258QrLvbOyZOThFLTcG9Xa152pPlAJL19wPDLNmiLHSaSGFSo3wXK\nCZnzN1KOx0kn9Kv11P5QRa2CGRBLoPfwFUEePATKfrbhSU2Ukb9XgAHsAUc8\nXVgRDAqdDaUJMvfeXq1U6ot5A07yPJHlVFmrPFIniuWf7hYAKtKIkZux9FMZ\nCqZ5WR/rq3DpDWPl4UYc9O4dJwY6fyjFeG0KgM988xElK+ZLNjJc+Qba/j/N\neQOIihDh03y/f47oJ0NyV3HeUl0sriO15dqPNSNVkXCzrb+YF2cjuNafJ7q7\nGGfm\r\n=Y93y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtlHDzN8ICRKmlyunQu0PnKd2dRQnb3dpVhJrD6L6m5AiAEvv2uWaxy6aHsniPsYEPvve0Y7pQ3ENcOgYOXA1cQzg=="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.1.0-preactx_1591731905720_0.11553538350932757"},"_hasShrinkwrap":false},"2.1.1-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.1.1-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map","docs":"documentation readme -q --section API src","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":">=10"},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [useText](#usetext)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-5)\n-   [intl](#intl)\n    -   [Parameters](#parameters-6)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}` (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.children` **ReactElement?** Fallback text if no definition is found\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}` (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### useText\n\n`useText` is the hook version of [withText](#withtext)\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: 'user.placeholder'\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\tconst { placeholder } = useText('user.placeholder');\n\n\treturn <input placeholder={placeholder} />\n}\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"d8f55e469f3fed9c2650b0498a4123464df4a674","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.1.1-preactx","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-AwhuVO9GlQL4tZNWnoX1ztxK4LuXE37oXVMkG+3PJ/20olTYqvx9fGEjdW7Dpo8hZKL4fyA1ToAFILmAJAv6Qw==","shasum":"7170edece0f7f5ed59c66eefdb00efba16e2b663","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.1.1-preactx.tgz","fileCount":26,"unpackedSize":141221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+gqCRA9TVsSAnZWagAAkyIP/je6xw1kVBtlf0n4uXRW\nYSZ3pJjXLq9uhFu8ZJgHzEeH9pKYGMzeJga+ka3yIyzHlScPtxUNJHEqw4uR\n/2igNFXa3Rdh49FM93ux0oOwQhrcBXP6ps1eQ5gcUN4Y7oN0sf4ViC1SM9y8\n98I/Z/+UbIBxco8uzQjGg96/yEC2dFqP7eZCl4O9wfNfRP2KJXijZaopzv3X\nC83QpDrjm8kpg2cUyjOv8kkbpBJGfS2yrc9mM3sOQoeWumZ1vIQ4cWyRybhJ\nRNVxvUGJo1EEvA9HGTqx9lZv/CEMazCd1sJn1v9GpdZae/UWI65xUaCbFPTz\nnet3OpR4D/8BAcFLhUyZPMsSTQYIFtDzeuRxAJnManw2XFiJQV6IpVaDfbAn\n7g9FCfRkJiEw8YQFBizh97o0sKloAULEFZhijoFYlhBTVkXxUjrZvU7WtWLh\nJ4Tn60iIOdKbJE+PNIZy6t4ht+rBFr4as8qFKelhQKDkkRoA7LeDdY7AsFh8\nZeeA/r2R94w4ggb1QJPS222SKz4aHfC6nIjEOQq/NLYH1ipHxleA40TMyRAB\nrdaGINFF5A3FEq6edtCyTbf1ex05kC67Py2y+dKCk/JziB3eDbPSdZw5w8BA\nanNlVUMnEr0q7rnpfJqBLjJr3p6Ubv6ZI+h1Y3a7CM7q2I/bvKBOIYKCD/OC\ncF07\r\n=4vBa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDIcBWkt1rPPzToPQ8PrURCrk1JAv3UK3+POKPIdPkbNAiEAqUd4xy290eumA6zrDgR4O4VXqCZ4rCtXVQfvZWchaNY="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.1.1-preactx_1591732266310_0.3719474216521199"},"_hasShrinkwrap":false},"1.4.2":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.4.2","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"cross-var npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":"<10"},"gitHead":"93541d0aa6526faeed379f3e84b030f0afd08731","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.4.2","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-H/UI9DhmiPdD02NeMKpcA1reZx8jtD3H10r8c7nn0X1fpdoAsXyIY+ZFa01L8mub9alU93Gon2Wi9yExMlSI0A==","shasum":"71ddf48097e02c398193e07ce540ea2c2f72407d","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.4.2.tgz","fileCount":24,"unpackedSize":137478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+qhCRA9TVsSAnZWagAAhZcP/jIFmwA+vOIELwUbMtok\n6tAiBNHEG9Z3CuPr4qrJN+CuTvdrg4qRJl2pDg4ooFx7DGjDnJNiftGfZKvO\noX+6H3wkWac4DyHlyHAkk8kQlXxkwSSj4gQNKY+Mjx5OGEaduz68cJVlGORT\nmit9SRKdHK6z5nmRZth+cPNdBEjwULpLC5VMNg4qkEg+oTCRTY5DlaI0H9hz\nZoCk0I2W4X0vYIuVQNv2mMA60V1beEhrDtIfSRQpVKQD4NwAOeBZKmNVGjb1\n1/LHM1gjR+ZFVi0/py2hdh+ojZs8Gp190B0T6JiC4M9akG5sSFFmfKoLiNaR\nCqQ0JihQixzhC/GwSO1XsSO8Rtv+gMOSAUPttcJg2wFVFD7YPpuvAUxD4Wgz\nG8gJOzpUcWpl6ZUlW9fW3IBHhIKMj4Taa1Xja973PXGZCDwHzM0fjP4aWooO\n4UDBic1TXHD5xufyBp7WWWTgQW69t+LGgGupvmdo+62Vz1863/cUNsf29Z2w\nIoRZ2wrUjpGSCq3VFXUGYeIejfA5pf8OeBK2RIWYYacNximDK9PTb9YLNZSZ\nMF5bxv+yQ7sPrHSUAKEYvDcfGFYA+3/jtHLPf8fG/GRE4Q29KzO34vtXS6Hj\nHDA6gFp1iyxz2/5vaN1ZvTjJIgAOHlM1OCeNdr2JWyoAZrQbmNbTC+KVwmgJ\npc/Q\r\n=MOFF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3XKUt60I9ZaVDFHo7eZO1W+eb6uCx8YJ5MdcY4UtbKAIgf/0vvZBRPbyACD/f3zjKe0Wxwqm6g6YQs7jApF+aOiY="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.4.2_1591732896488_0.18344135093857328"},"_hasShrinkwrap":false},"2.1.2-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.1.2-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=${npm_package_main}.map","minify:umd":"uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=${npm_package_umd_main}.map","docs":"documentation readme -q --section API src","size":"echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":">=10"},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [useText](#usetext)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-5)\n-   [intl](#intl)\n    -   [Parameters](#parameters-6)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}` (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.children` **ReactElement?** Fallback text if no definition is found\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}` (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### useText\n\n`useText` is the hook version of [withText](#withtext)\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: 'user.placeholder'\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\tconst { placeholder } = useText('user.placeholder');\n\n\treturn <input placeholder={placeholder} />\n}\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"ae9818c1296c86c6da1b5fb423f9e27942b2f19f","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.1.2-preactx","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-KHiQS6Ph3W/xiFRLT6N3VtREQt7UBWyFF9JerqQUjTVuSGojFeuESg3mvD1bBZ2Ac06xww/NYe9j6UDFyskvpw==","shasum":"c5f4a489fa49bbca0ca0e94df10c0b655b0fbb21","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.1.2-preactx.tgz","fileCount":23,"unpackedSize":104363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3/twCRA9TVsSAnZWagAAnNQP/0J6ezQ2ZXEr6wgYsuRZ\nEXjpZBLUFaRbhyvfUi3yuvjnOof1PAczhLkFck49LgPoN5KXH1njllRTRLDI\nKGGtWAuT2MADLCP1Nju7bAcZkpOzFNLzGapNU4TVsDAtB1ekaiseJeQf+P/Z\nDJn6VQ9LOPrhLlq8i6zhLKDOodWikb+rtc42l2Y61cd64Th7e/Hio5xjuWKV\nWOsnEA1P7E/7lxC++DJZctyDwaRyK+In5NGYUfP9kzdei/AsuRFFuvnojnSl\nEGZTTk1SIdQQapAO/LEdbdxVHmvSyEjPEFkDEQIUgLTqdeEBOR/F0Uu67ami\nT8zY8Uh2GnuSYSSQprpUrxApZHibTiO0oQ1yErBUUcn+JkyvijqUs0wrLj7b\navAswRVcNSjs0Uxf+pMcvrwxAXQIvXKGQ4yVX8dZ6Wu5x9ja5VMU2nVKh2ZK\ng+RYwu9/nL4fWe94a1yIkHuk4CHbsLSFMjsaNobif0XPOOgxWwbbyyJfOUe4\nmnvboQi3lzJqNunvZdpsgmL4KoPjwsrjrx9rYGFHMGMiJoekZbYKI2Gg0VxI\ncewExZDRMqlytIGz//KexEW+mqNRkL8Oa4KlV67uJmheg5sO7TDH532pIu6v\nQ4GcTLaP/gTOnsUSOFbX9uqb3IwnbM7nQoU6i7ZOCQ4wAJiLj2bOqPDcL2vP\nUNR1\r\n=dhPC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqg8utYOairwSOUY9WDam3xxFiWyHL0AvWzS46a8Vl+QIhANfHpGpIbodh3RnzTH3xrBdIw8k/U2V3fe3aG1TxcW/e"}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.1.2-preactx_1591737200063_0.41726548608541547"},"_hasShrinkwrap":false},"2.2.0-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.2.0-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"cross-var npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":">=10"},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n\n# For TypeScript Definitions\nnpm install --save-dev @types/preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [useText](#usetext)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-5)\n-   [intl](#intl)\n    -   [Parameters](#parameters-6)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`.  Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.children` **ReactElement?** Fallback text if no definition is found\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`. Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### useText\n\n`useText` is the hook version of [withText](#withtext)\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: 'user.placeholder'\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\tconst { placeholder } = useText('user.placeholder');\n\n\treturn <input placeholder={placeholder} />\n}\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"a6450b2ac0a65b535433a0f1721d820d1a57e5e5","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.2.0-preactx","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-knRlFyAzeoVkQpg2NID3mergvV2TA8jypKT4hylhW3I14Tvaa7qzMY8DavCROKqdsLSYayLTv2y58zgwbIuBJQ==","shasum":"79892dbc919f36c965b4f4bf13dedd7c63445472","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.2.0-preactx.tgz","fileCount":32,"unpackedSize":218147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB2MfCRA9TVsSAnZWagAA9P4P/1DISpca9I7VFphT/nXk\nPKS2tvBkV8aj7vq7Zlg7hAbnGJZPtjex85AnxcQ0JA9s5nP0jWMYZexzZsIZ\nnvOYTev4nR5mg80RpBt0HTtIPdXGgKG7IaoUkdI5tDdZWqiAiJuwkXVWPc8q\nBMjM+AllWatanAXC+nX1YiTPQdzYISU/WHYXeb1T8KlR9rI7aUs6YzWeovbJ\nNnNLO0qJgStBFwAe9dH1t1WlG/US+WV33kAN4kxH4nzaAgAWS2WlhoyYoxp8\njtMQiM3ozdce+Q3ca19y+KpJ7frGJwqpHIR7CwJq6sBtOdUgVG6ZfmvU+7fh\nN5CXc4IbdQ4r2gUD0vwGUaFZcMPiSdNjwm/HDZbmnZemhd6CMd9cUbGqYITO\n45Ds9U0SGJphSbOxbOa838ciMifDiS2tXRtkwu2VsSApDIkXJ+TL4ecDzd0H\nbk3iWcXNCgjzJZnsmFpSzmr15+C6+5mTEQ8UApvMPNjkqBkxVTPyZEAVQt1I\nU5mHsWSUNio3WZ+rdQr9sHr/bXSMEDD/o35MRBsuyH2SZsD1PhVyMZ8cF4Ad\nQYKUXxcbg2CHuuM0TZR5Be2D0hxuu6pXi3mndXnOZRI63CPtPJ5Q7ZJeiFA1\n9kQdY6D406rxwvdWUyk5+xgASifQT/2UEkyE3ZrdRTnJOiE71rMwA3wsVCQ5\nGx1T\r\n=/lDB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCI0SEqXTc8fPU6Ymtc0jwWBIlGUg1nQYf6myEjcBrgKwIhAIqFM1J6qaBQwbm6/OoPIafp5rguPzpepXpJcV/FlF1h"}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.2.0-preactx_1594319646665_0.22172844127823366"},"_hasShrinkwrap":false},"2.3.0-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.3.0-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"cross-var npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2"},"peerDependencies":{"preact":">=10"},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n\n# For TypeScript Definitions\nnpm install --save-dev @types/preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [useText](#usetext)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-5)\n-   [intl](#intl)\n    -   [Parameters](#parameters-6)\n-   [translate](#translate)\n    -   [Parameters](#parameters-7)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`.  Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.children` **ReactElement?** Fallback text if no definition is found\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`. Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### useText\n\n`useText` is the hook version of [withText](#withtext)\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: 'user.placeholder'\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\tconst { placeholder } = useText('user.placeholder');\n\n\treturn <input placeholder={placeholder} />\n}\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n### translate\n\nAttempts to look up a translated value from a given dictionary.\n Also supports json templating using the format: {{variable}}\n Falls back to default text.\n\n#### Parameters\n\n-   `id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Intl field name/id (subject to scope)\n-   `scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope, which prefixes `id` with `${scope}.` (optional, default `''`)\n-   `dictionary` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** A nested object containing translations\n-   `fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Template fields for use by translated strings (optional, default `{}`)\n-   `plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Indicates a quantity, used to trigger pluralization\n-   `fallback` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))?** Text to return if no translation is found\n\nReturns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** translated\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"49621bfeeaa382dc33495da857783a08a15afffe","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.3.0-preactx","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-0q23eJ92YVarzGgC1h5Yi1YPtupz4gmcPs9mrlhwNe/WHpF0dFqgr13FYrCJ8Cadv6R+/Ak4J8s+IO/3amqtGA==","shasum":"cdf842a2d696e201efc7a0a6c6cdf84eb99a2842","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.3.0-preactx.tgz","fileCount":30,"unpackedSize":195321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ9PFCRA9TVsSAnZWagAAY9MQAJXZZa6EqttLMWwMCir/\nvGAsTnF4+Hv3Qt+Ifzbo4jN6wudjM0G9u1DQq8nxS4Taeu/8m9mDr/POfFlA\n5ZS03IIXQYyIVuOx+rMqSDn8rXAVMlR4AfjEYJmBzaXtFbmpVxX6AuYMzbr2\n0Sr1G0kRrVvR0zWJSXXFtNAVeCwO+Mj9JsTwpvK2kDc/K7fke5LnuCydCB+y\n4WRuUp/GpYpQslrTvcA+OvWamD5mKJ55Lxxv3vNA5my6fpIZUQLbZMzOj6R5\ngE3tDtT7oL1n49+vpAKJMJMLj77acJ1OOQp6RDTKLdheYP5DZeliaELzBJYB\ni2fWYzTQk74IBnMC8ECmGTLDWSdWU2K6Bd+tv0cTopl19zUmaiVsF1s41BcC\nd9zyU06VBynZbHUsV29oslBQpPXodI+sYS2XWEFk5EBCOHBpqvpzUamVN5cQ\n7kIDHYjAYLj33Wi/Sa775erI1yZC4qOol2r8eprEF2PO0kimAcaJxKAcN03s\n/LPtINt2raMn1KauyGUd2kS1hM8QAYgLFDEQAgutuNyFwKRK3A+yMyjeXMlF\nfCh/aEwHOBK2GOaxUmH3t1GgG8l74VqCJ4MYzVOTxH/ntKRuwrByRoizJF8L\nroxE04MTnDjdgo770O68cTj/mpciE0vrm1tg8/6yDtUuAeZd3A4UUQ+ZugEb\n8pMp\r\n=6PLj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGoq7WUkGpphouanJWZMxlV6TeDdR9yMTmXqFgruMXoRAiEAiR5cee6umf3otdmIdmdTCW3cVGI6vs0BVP9BJI+nDPM="}]},"maintainers":[{"email":"billneff79@gmail.com","name":"billneff79"},{"email":"jason@developit.ca","name":"developit"},{"email":"pal21345@gmail.com","name":"pl12133"}],"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.3.0-preactx_1598280645122_0.04804474008127402"},"_hasShrinkwrap":false},"2.3.1-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.3.1-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"cross-var npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.2","preact-markup":"^2.0.0"},"peerDependencies":{"preact":">=10"},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n\n# For TypeScript Definitions\nnpm install --save-dev @types/preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [useText](#usetext)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-5)\n-   [intl](#intl)\n    -   [Parameters](#parameters-6)\n-   [translate](#translate)\n    -   [Parameters](#parameters-7)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`.  Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.children`  \n    -   `props.props` **...any** \n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.children` **ReactElement?** Fallback text if no definition is found\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`. Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### useText\n\n`useText` is the hook version of [withText](#withtext)\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: 'user.placeholder'\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\tconst { placeholder } = useText('user.placeholder');\n\n\treturn <input placeholder={placeholder} />\n}\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n### translate\n\nAttempts to look up a translated value from a given dictionary.\n Also supports json templating using the format: {{variable}}\n Falls back to default text.\n\n#### Parameters\n\n-   `id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Intl field name/id (subject to scope)\n-   `scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope, which prefixes `id` with `${scope}.` (optional, default `''`)\n-   `dictionary` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** A nested object containing translations\n-   `fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Template fields for use by translated strings (optional, default `{}`)\n-   `plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Indicates a quantity, used to trigger pluralization\n-   `fallback` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))?** Text to return if no translation is found\n\nReturns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** translated\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"f94ec1cef302ae9a250862ee0934f1edda5d5d93","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.3.1-preactx","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-i/QGG3BQOWh4nFPXTnhazHGOq2STYMa9/0h6oiUkV+p/c5IDd0luPhRlXkAnEgGRZX3PjAEgx/tzWPQne61wuQ==","shasum":"d3aa78f7a8be45c368ad6e01751e4515e9fea8f6","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.3.1-preactx.tgz","fileCount":29,"unpackedSize":184481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIrUhCRA9TVsSAnZWagAA1sYP/AiALtTwrwxHZgRiujkQ\nNFOgPPm30ZwmwzCj1uxFkZxCHHqS4a13dOF+pK47/f9HPyThcFY5wEi/E5wV\nytqL2Vntmv12+OP1sqnta4nmiZhN54tew4wtIIEQ5zz6OJ6NkT81Xevg2OAn\nWTeNp4IIwpvyY+clWZ/inrVtuhWoKoYrR3ovkN1qWQ/GHuMlrswJm5EhgU2X\nIeeiCREJHMSf/B+Dkt/ZurReAyDttIrFeNGofVg1ZkCkg0jmgS07MU3yuUsx\nV9g24p0Ja8s1yBXfo/YluD45pUpY8BsiRU/qZLCGYmj2kY9n//MQyTaV/psX\n1LWmLz8rmF5YQuqcey4hhuIPGleuXjDOoVGSkrvId+gO/hz1VkTpGHNOvkkB\nZ8ae51NCRAo46HVsLGfmeonqu1WpKH30HvGFXwR4acgi6pd2xLklRvezhUx2\nd5jNP3zuAph9F6QDYt2wCxIrlNOvbv690B84/0ZmgKfMikN+f6tgOruFnTbE\nfYATVpCF6fDrRm8QRmZqL/SFf67CGCLq+c8oVXm0NY26azFo7naoCUAHrG17\nF2KmQa8o6z/5NrX0Ml9PU8EBzJ+aVqxSpF4aVsaiivycZ37mTdTuQHUps9TA\nS4pDeV9QLEamE3xi9Zu9C+E9e/IonJ573Rbd4nxLXUWCJ4hKWsOYJB802JcR\nAjKz\r\n=WReB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFP71wO6VjcSxfkwLYfffMIEcqfBdea0xRwLpUPHMFqTAiEAyl/orRu0laKgV30NaVXOHJvEvofFSxEx7PIgHNlqPFM="}]},"_npmUser":{"name":"pl12133","email":"pal21345@gmail.com"},"directories":{},"maintainers":[{"name":"billneff79","email":"billneff79@gmail.com"},{"name":"pl12133","email":"pal21345@gmail.com"},{"name":"developit","email":"jason@developit.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.3.1-preactx_1612887329075_0.5955885525867697"},"_hasShrinkwrap":false},"1.5.0":{"name":"preact-i18n","amdName":"preactLocalize","version":"1.5.0","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\""},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.5","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^8.2.5","preact-jsx-chai":"^2.2.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.3"},"peerDependencies":{"preact":"<10"},"gitHead":"28ff35cbdbee7cbd4bf4d7dc6dd75cfd79ff4e5f","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@1.5.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-gOSyXag3uP1ISSvpcvfP8rdONeLxtQWCEfEZyt+REnGcBUzEWwf7/tjBVZp/ymZeTv4mGh9sALd1NqPYyICkRA==","shasum":"f9e2ad29cb3abc8b810554963cc90f1a52242605","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-1.5.0.tgz","fileCount":21,"unpackedSize":100680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmXp5CRA9TVsSAnZWagAAC8MP/R7TB2PXt+FWDYI5j57E\npQSXv5RHQY1V+RZjAx4TPkCIoY4aUNsi8JI0lULVSzKHM4ShrEciDK0sooKy\n8bfUameyPc14m0xEszFSzKz1PQXWcc4EL6EfaNEjA5wXRDt7MYlCfekeFmEn\nCQMzOdiNIZ2iKq1xg79r+KwKhMKe7ldOyzwZo065tc6zuT9Gee2STgY6U/fU\nisIchMs7FvsWiO5CS/da32PytF8429sHKZKcRY/isp9bWc4G7tWJfR1/dAWw\n+lwa+6N+HQPIdxifVE9H5c4dD40hec6jtbX22UlfNB5+Fa/pn3ZwRJcCMjGj\nXzpPVqM8s6ThBFlVNadh+wFbFCGfOxdwbs/Gd6omw87HT4jF10htn4sOns8F\nZNIWw1JFH2p5L+KZHMQ5Z/zeBq0JwyE/dWUbEZURQ2hTIQ7/P5S8Ptl3E2aU\n5SU312vNkyVN/qQryGEMtsmriLQjkfdrJo088AexprT48Kx1D/WK5mo1FILM\nlb7Z9fZAhd6zfNISjN5OtLrQN4/TDkz0Wap5iDF9qU9IZw3qsEIKC3vj3J3j\nAJOD72laV6CblwVbs+CjYRPOk3/QIf1aHzv0JPHJFw5TzMhQ0GmxEB2ZKfFJ\nQrqkChtUEQV9b+fkPWbVwAXXhVcC1Z7mSs3DANTljVJ/zPMtd5LiEVF4/s8i\nQ/+J\r\n=MHBi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsw+cSeIJB8PPA/g+AmoiayPfy753ZTWLth1ovJ1q3RgIhAJg3IEkJaBJxzcrOun8Ura0iGgPiIPWyeNw4L4SlcblW"}]},"directories":{},"maintainers":[{"name":"billneff79","email":"billneff79@gmail.com"},{"name":"pl12133","email":"pal21345@gmail.com"},{"name":"developit","email":"jason@developit.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_1.5.0_1620671097025_0.856621182930764"},"_hasShrinkwrap":false},"2.4.0-preactx":{"name":"preact-i18n","amdName":"preactLocalize","version":"2.4.0-preactx","description":"Preact internationalization, done simply.","source":"src/index.js","module":"dist/preact-i18n.esm.js","main":"dist/preact-i18n.js","umd:main":"dist/preact-i18n.umd.js","scripts":{"test":"npm-run-all --silent -p lint build test:unit -s test:prod","lint":"eslint src test","test:watch":"npm run test:unit -- --no-single-run","test:unit":"karma start karma.conf.js --single-run","test:prod":"cross-env TEST_PRODUCTION=true karma start karma.conf.js --single-run","build":"npm-run-all --silent clean -p rollup:* -p minify:* -s docs size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"cross-var rollup -c rollup.config.js -m -f cjs -n $npm_package_amdName -i $npm_package_source -o $npm_package_main","rollup:umd":"cross-var rollup -c rollup.config.js -m -f umd -n $npm_package_amdName -i $npm_package_source -o $npm_package_umd_main","rollup:esm":"cross-var rollup -c rollup.config.js -m -f es --environment FORMAT:es -n $npm_package_amdName -i $npm_package_source -o $npm_package_module","minify:cjs":"cross-var uglifyjs $npm_package_main -c -m toplevel -o $npm_package_main --source-map content=$npm_package_main.map","minify:umd":"cross-var uglifyjs $npm_package_umd_main -c -m -o $npm_package_umd_main --source-map content=$npm_package_umd_main.map","docs":"documentation readme -q --section API src","size":"cross-var echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size --raw)\"","prepublishOnly":"cross-var npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"keywords":["intl","internationalization","localization"],"homepage":"https://github.com/synacor/preact-i18n","authors":["Jason Miller <jasonmiller@synacor.com>","Bill Neff <billneff79@gmail.com>"],"license":"BSD-3-Clause","eslintConfig":{"extends":"eslint-config-synacor","rules":{"guard-for-in":0}},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/preset-env":"^7.4.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","buble":"^0.19.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","cross-var":"^1.1.0","documentation":"^9.3.1","documentation-theme-default":"^3.0.0","eslint":"^5.15.3","eslint-config-synacor":"^3.0.3","gzip-size-cli":"^3.0.0","karma":"^4.0.1","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chai-sinon":"^0.1.5","karma-chrome-launcher":"^2.2.0","karma-cli":"^2.0.0","karma-junit-reporter":"^1.2.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^4.0.2","mkdirp":"^0.5.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","preact":"^10.4.1","rimraf":"^2.6.3","rollup":"^1.7.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-memory":"^3.0.0","sinon":"^7.3.0","sinon-chai":"^3.3.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^3.5.1","webpack":"^4.29.6"},"dependencies":{"dlv":"^1.1.3","preact-markup":"^2.0.0"},"peerDependencies":{"preact":">=10"},"gitHead":"e2d6438b8b841de6937fa65d33695658852b515b","bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"_id":"preact-i18n@2.4.0-preactx","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"billneff79","email":"billneff79@gmail.com"},"dist":{"integrity":"sha512-XJ15wZKdJrpuz2KBs8BkDB9gl85MjIkER5tx8r6RM1+j53hw3/XzUq2DMnkMoLVQiS0VSPI6bXk41CioKwTJIA==","shasum":"fbcb2e3ae22744c7fef5a102db2ef7506057d082","tarball":"https://registry.npmjs.org/preact-i18n/-/preact-i18n-2.4.0-preactx.tgz","fileCount":23,"unpackedSize":111023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmXxOCRA9TVsSAnZWagAAlUUQAJLdJpPDFawuu764OwRu\nMOh7y9AT3RlhPNRhNZKbgChKv6oJN1t5Jse4zjBeggF/BVnBEgEpz6oOa5Tg\n8n6geBLgaCUvbgipuDvgq1rESfbtVwkCwnLohRT8F87M20B0XyL4Esu1qwVV\nAbWNOuSpNmgnNEwoHMIYG/SJlJFW5WXijoNsKw64AbTSiJ1CE/Kwf8hZABHR\nP3GcAp+tGwCwDWBYDfqkWqNtvsR/JtVeZvkjJIeNMv3cCwsEM1kGorXdpbJm\nKIVX8oQE1S4JAs5NKX0H4hxjLMnYKi3NlnUw8Pu8MxuN7rVSYpAe6rJg/7h6\nIhJXA05XvkqviQvUWDaaMW8rwtmeaVd3laDoq2Gt5Umvt0Wle757omTsJdUs\nETvlYBDJuwN2vnFoGseEiXm1jp78L0iGPvqOYRlDxzl48iPULxaLWBJ+HO27\n/2Xv2EROkX3n1R7IePkqQPMniaSXlspEM/cfr04keEozsE4U+9S9D3TQEs0D\nhiVyjn8jzwk2hmVtsqkcDpp7CcWspI/DVW815gU1CHKbt3aDeCp+iwriKUS7\n0cUdR/9MAEHOd2deWaBDoNggrIM9Sp9XiZaZ9lRaUVeYzFSbqrz42tVlKVpr\nAbjL6jnBHkJQX+KIm19owe3+dETeV134wLP1UTIHJihrOaaF+vxeJlfFIAEu\nto6H\r\n=jEEN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/xUh7INYQ3T1AgIi+wFFBFZpAP8b7cmIjpSZy9e7y5AiEApr4vFeDVEznLUI2EaqDHCFsCDqyED+4z71qLGNE2PSU="}]},"directories":{},"maintainers":[{"name":"billneff79","email":"billneff79@gmail.com"},{"name":"pl12133","email":"pal21345@gmail.com"},{"name":"developit","email":"jason@developit.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preact-i18n_2.4.0-preactx_1620671565957_0.5605921870098447"},"_hasShrinkwrap":false}},"readme":"# preact-i18n 🌎 [![npm](https://img.shields.io/npm/v/preact-i18n.svg?style=flat)](https://npm.im/preact-i18n) [![travis](https://travis-ci.org/synacor/preact-i18n.svg?branch=preactX)](https://travis-ci.org/synacor/preact-i18n) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_shield)\n\n<img src=\"resources/example.png\" width=\"600\" alt=\"Usage example\" />\n\n**Simple localization for Preact.**\n\n-   Tiny: about 1.3kb gzipped\n-   Supports dictionary and key scopes/namespaces while maintaining a global dictionary\n-   Supports nested dictionaries:\n    -   Wrap your component in a default dictionary and scope key\n    -   Wrap it again later on (in an app!) to override the defaults\n-   Supports pluralization of strings using nested objects.\n-   Supports template `{{fields}}` in definition values\n-   Has a companion [ESLint plugin](https://www.npmjs.com/package/eslint-plugin-preact-i18n) to help catch bugs early\n\n* * *\n\n-   [Installation](#installation)\n-   [Getting Started](#getting-started)\n    -   [Fallback Text](#fallback-text)\n    -   [Pluralization and Templating](#pluralization-and-templating)\n-   [ESLint Plugin](#eslint-plugin)\n-   [API](#api)\n\n<!-- /MDTOC -->\n\n## Preact Version Support\n\nBy default, the `master` branch of this repo supports preact 9 and below, and is published in normal patch/minor/major releases to the `latest` tag in npm.  Support for preact X (versions 10+ of preact) is handled in the `preactX` branch and are always published to the `preactx` tag in npm.  When preact X obtains widespread adoption, the `master` branch of this project will support preact X and a new major version under `latest` tag will be published to in npm.\n\n## Installation\n\n```sh\nnpm install --save preact-i18n\n\n# For TypeScript Definitions\nnpm install --save-dev @types/preact-i18n\n```\n\n## Getting Started\n\n1.  Create a definition. Typically JSON files, we'll call ours `fr.json`:\n\n```json\n{\n\t\"news\": {\n\t\t\"title\": \"Nouvelles du Monde\",\n\t\t\"totalStories\": {\n\t\t\t\"none\": \"Aucun article\",\n\t\t\t\"one\": \"Un article\",\n\t\t\t\"many\": \"{{count}} articles\"\n\t\t}\n\t}\n}\n```\n\n2.  Expose the definition to your whole app via `<IntlProvider>`:\n\n```js\nimport { IntlProvider } from 'preact-i18n';\nimport definition from './fr.json';\n\nrender(\n\t<IntlProvider definition={definition}>\n\t\t<App />\n\t</IntlProvider>\n);\n```\n\n3.  Use `<Text />` to translate string literals:\n\n```js\nimport { Text } from 'preact-i18n';\n\n// Assume the \"stories\" prop is a list of news stories.\nconst App = ({ stories=[] }) => (\n\t<div class=\"app\">\n\t\t<h1>\n\t\t\t{/* Default fallback text example: */}\n\t\t\t<Text id=\"news.title\">World News</Text>\n\t\t</h1>\n\t\t<footer>\n\t\t\t{/* Pluralization example: */}\n\t\t\t<Text\n\t\t\t\tid=\"news.totalStories\"\n\t\t\t\tplural={stories.length}\n\t\t\t\tfields={{\n\t\t\t\t\tcount: stories.length\n\t\t\t\t}}\n\t\t\t/>\n\t\t</footer>\n\t</div>\n);\n```\n\nThat's it!\n\n### Fallback Text\n\nRendering our example app with an empty definition _(or without the Provider)_ will attempt to use any text contained within `<Text>..</Text>` as fallback text.\n\nIn our example, this would mean rendering without a definition for `news.title` would produce `<h1>World News</h1>`.\n\nIf we provide a definition that has a `title` key inside a `news` object, that value will be rendered instead.\n\n### Pluralization and Templating\n\nIn our example, `<footer>` is using `<Text>` as a convenient way to do pluralization and templating. In our definition, `news.totalStories` is an Object with pluralization keys. The values in that object will be selected based on an integer `plural` prop passed to `<Text>`.\n\nAny definition value _(including pluralization values)_ can contain `{{field}}` placeholders. These placeholders get replaced with matched keys in an object passed as the `fields` prop.  In our example, the \"many\" plural form is such a template - it will render `\"5 articles\"` when `fields={{ count: 5 }}`.\n\nThe available forms for specifying pluralization values are as follows:\n\n-   `\"key\": { \"singular\":\"apple\", \"plural\":\"apples\" }`\n-   `\"key\": { \"none\":\"no apples\", \"one\":\"apple\", \"many\":\"apples\" }`\n-   `\"key\": { \"zero\":\"no apples\", \"one\":\"apple\", \"other\":\"apples\" }`\n-   `\"key\": [\"apples\", \"apple\"]`\n\nTaking `<Text id=\"news.totalStories\" ..>` from our example:\n\n-   `<.. plural={0}>` renders `Aucun article` _(no articles)_\n-   `<.. plural={1}>` renders `Un article` _(one article)_\n-   `<.. plural={2} fields={{ count: 2 }}>` renders `2 articles`\n-   `<.. plural={3} fields={{ count: 3 }}>` renders `3 articles`\n\nIn addition to [`<Text>`](#Text), [`withText()`](#withText) and [`<Localizer>`](#Localizer) provide ways to translate more than just display text - HTML attributes, component props, arbitrary Strings, etc.\n\n## ESLint Plugin\n\nA companion ESLint plugin exists, [eslint-plugin-preact-i18n](https://www.npmjs.com/package/eslint-plugin-preact-i18n), which has several rules that help spot common issues like un-i18n'd text, misconfigured tags, and missing keys, that are beneficial in spotting defects early and ensuring that your application is properly i18n'd.\n\n* * *\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [IntlProvider](#intlprovider)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples)\n-   [Localizer](#localizer)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-1)\n-   [MarkupText](#markuptext)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-2)\n-   [Text](#text)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-3)\n-   [withText](#withtext)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-4)\n-   [useText](#usetext)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-5)\n-   [intl](#intl)\n    -   [Parameters](#parameters-6)\n-   [translate](#translate)\n    -   [Parameters](#parameters-7)\n\n### IntlProvider\n\n`<IntlProvider>` is a nestable internationalization definition provider.\nIt exposes an Intl scope & definition into the tree,\nmaking them available to descendant components.\n\n> **Note:** When nested, gives precedence to keys higher up the tree!\n> This means lower-level components can set their defaults by wrapping themselves\n> in an `<IntlProvider>`, but still remain localizable by their parent components.\n\n#### Parameters\n\n-   `props`  \n    -   `props.scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `props.mark` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, all `<Text>` elements will be shown with a red/green background indicating whether they have valid Intl keys. (optional, default `false`)\n    -   `props.definition` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// generally imported from a JSON file:\nlet definition = {\n\tfoo: 'Le Feux'\n};\n\n<IntlProvider scope=\"weather\" definition={definition}>\n\t<Text key=\"foo\">The Foo</Text>\n</IntlProvider>\n\n// This will render the text:\n\"Le Feux\"\n```\n\n### Localizer\n\n`<Localizer />` is a Compositional Component.\nIt \"renders\" out any `<Text />` values in its child's props.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `props.children` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Child components with props to localize.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `context.intl` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** [internal] dictionary and scope info\n\n#### Examples\n\n```javascript\n<Localizer>\n\t<input placeholder={<Text id=\"username.placeholder\" />} />\n</Localizer>\n// produces:\n<input placeholder=\"foo\" />\n```\n\n```javascript\n<Localizer>\n\t<abbr title={<Text id=\"oss-title\">Open Source Software</Text>}>\n\t\t<Text id=\"oss\">OSS</Text>\n\t</abbr>\n</Localizer>\n// produces:\n<abbr title=\"Open Source Software\">OSS</abbr>\n```\n\n### MarkupText\n\n`<MarkupText>` is just like [Text](#text) but it can also contain html markup in rendered strings.  It wraps its contents in a `<span>` tag.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`.  Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.children`  \n    -   `props.props` **...any** \n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<MarkupText id=\"foo\"><b>The Foo</b></MarkupText>\n// ..produces the vnode:\n<span><b>The Foo</b></span>\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux <b>{{bar}}</b>' }}>\n\t<MarkupText id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le Feux <b>BEAR</b></span>\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le <a href=\"http://foo.com\">Feux</a>' }}>\n\t<MarkupText id=\"foo\">The Foo</MarkupText>\n</IntlProvider>\n// ..produces the vnode:\n<span>Le <a href=\"http://foo.com\">Feux</a></span>\n```\n\n```javascript\n// renders nothing if there is no key match and no fallback\n<div><MarkupText /></div>\n// ..produces the vnode:\n<div/>\n```\n\n### Text\n\n`<Text>` renders internationalized text.\nIt attempts to look up translated values from a dictionary in context.\n\nTemplate strings can contain `{{field}}` placeholders,\nwhich injects values from the `fields` prop.\n\nWhen string lookup fails, renders its children as fallback text.\n\n#### Parameters\n\n-   `props` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** props\n    -   `props.id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to look up in intl dictionary, within any parent scopes (`$scope1.$scope2.$id`)\n    -   `props.children` **ReactElement?** Fallback text if no definition is found\n    -   `props.plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Integer \"count\", used to select plural forms\n    -   `props.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Values to inject into template `{{fields}}`. Values in the `fields` object will be coerced to strings, with the exception of `<Text/>` nodes which will be resolved to their translated value (optional, default `{}`)\n\n#### Examples\n\n```javascript\n// If there is no dictionary in context..\n<Text id=\"foo\">The Foo</Text>\n// ..produces the text:\n\"The Foo\"\n```\n\n```javascript\n// Given a dictionary and some fields..\n<IntlProvider definition={{ foo:'Le Feux {{bar}}' }}>\n\t<Text id=\"foo\" fields={{ bar: 'BEAR' }}>The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux BEAR\"\n```\n\n```javascript\n// Within a scope, both `id` and the definition are namespaced..\n<IntlProvider scope=\"weather\" definition={{ foo:'Le Feux' }}>\n\t<Text id=\"foo\">The Foo</Text>\n</IntlProvider>\n// ..produces the text:\n\"Le Feux\"\n```\n\n### withText\n\n`@withText()` is a Higher Order Component, often used as a decorator.\n\nIt wraps a child component and passes it translations\nbased on a mapping to the dictionary & scope in context.\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\n@withText({\n\tplaceholder: 'user.placeholder'\n})\nclass Foo {\n\t// now the `placeholder` prop is our localized String:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText({\n\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n})\nclass Foo {\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\n```javascript\n@withText('user.placeholder')\nclass Foo {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\trender({ placeholder }) {\n\t\treturn <input placeholder={placeholder} />\n\t}\n}\n```\n\nWorks with functional components, too\n\n\n```javascript\nconst Foo = withText('user.placeholder')( props =>\n\t<input placeholder={props.placeholder} />\n)\n```\n\ngetWrappedComponent() returns wrapped child Component\n\n\n```javascript\nconst Foo = () => <div/>;\nconst WrappedFoo = withText('user.placeholer')(Foo);\nWrappedFoo.getWrappedComponent() === Foo; // true\n```\n\n### useText\n\n`useText` is the hook version of [withText](#withtext)\n\n#### Parameters\n\n-   `mapping` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Maps prop names to intl keys (or `<Text>` nodes).\n\n#### Examples\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: 'user.placeholder'\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\tconst { placeholder } = useText({\n\t\tplaceholder: <Text id=\"user.placeholder\">fallback text</Text>\n\t});\n\treturn <input placeholder={placeholder} />\n}\n```\n\n```javascript\nfunction MyComponent() {\n\t// for Strings/Arrays, the last path segment becomes the prop name:\n\tconst { placeholder } = useText('user.placeholder');\n\n\treturn <input placeholder={placeholder} />\n}\n```\n\n### intl\n\nHigher-order function that creates an `<IntlProvider />` wrapper component for the given component.  It\ntakes two forms depending on how many arguments it's given:\nIt can take a functional form like:\nintl(ComponentToWrap, options)\n\nor it can take an annotation form like:\n\n#### Parameters\n\n-   `Child`  \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** If there are two arguments, the second argument is Passed as `props` to `<IntlProvider />`\n    -   `options.scope`  Nest `definition` under a root key, and set the active scope for the tree (essentially prefixing all `<Text />` keys).\n    -   `options.definition`  Merge the given definition into the current intl definition, giving the _current_ definition precedence (i.e., only adding keys, acting as defaults) (optional, default `{}`)\n\n### translate\n\nAttempts to look up a translated value from a given dictionary.\n Also supports json templating using the format: {{variable}}\n Falls back to default text.\n\n#### Parameters\n\n-   `id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Intl field name/id (subject to scope)\n-   `scope` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope, which prefixes `id` with `${scope}.` (optional, default `''`)\n-   `dictionary` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** A nested object containing translations\n-   `fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Template fields for use by translated strings (optional, default `{}`)\n-   `plural` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Indicates a quantity, used to trigger pluralization\n-   `fallback` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))?** Text to return if no translation is found\n\nReturns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** translated\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsynacor%2Fpreact-i18n?ref=badge_large)\n","maintainers":[{"name":"billneff79","email":"billneff79@gmail.com"},{"name":"pl12133","email":"pal21345@gmail.com"},{"name":"developit","email":"jason@developit.ca"}],"time":{"modified":"2022-06-24T13:32:10.589Z","created":"2017-06-09T19:09:27.122Z","1.0.0":"2017-06-09T19:09:27.122Z","1.0.1":"2017-08-05T15:29:30.477Z","1.1.0":"2017-09-07T19:55:04.827Z","1.1.1":"2017-09-08T01:17:38.790Z","1.1.2":"2017-11-01T17:41:44.202Z","1.2.0":"2018-02-08T17:54:41.721Z","1.2.1":"2018-05-18T21:31:41.204Z","1.2.2":"2018-07-11T21:22:41.081Z","1.3.0":"2019-03-26T20:27:16.737Z","1.4.0":"2019-07-08T19:25:13.087Z","2.0.0-preactx.1":"2019-07-08T20:55:11.717Z","2.0.0-preactx.2":"2019-07-08T21:01:51.347Z","1.4.1":"2019-09-13T14:48:28.154Z","2.1.0-preactx":"2020-06-09T19:45:05.838Z","2.1.1-preactx":"2020-06-09T19:51:06.394Z","1.4.2":"2020-06-09T20:01:36.669Z","2.1.2-preactx":"2020-06-09T21:13:20.225Z","2.2.0-preactx":"2020-07-09T18:34:06.766Z","2.3.0-preactx":"2020-08-24T14:50:45.246Z","2.3.1-preactx":"2021-02-09T16:15:29.224Z","1.5.0":"2021-05-10T18:24:57.178Z","2.4.0-preactx":"2021-05-10T18:32:46.259Z"},"homepage":"https://github.com/synacor/preact-i18n","keywords":["intl","internationalization","localization"],"repository":{"type":"git","url":"git+https://github.com/synacor/preact-i18n.git"},"bugs":{"url":"https://github.com/synacor/preact-i18n/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}