UNPKG

i18n-behavior

Version:

Instant and Modular I18N engine for lit-html and Polymer

108 lines (99 loc) 3.54 kB
<!-- @license https://github.com/t2ym/i18n-behavior/blob/master/LICENSE.md Copyright (c) 2016, Tetsuya Mori <t2y3141592@gmail.com>. All rights reserved. --> <html lang="en" preferred locales-path="locales"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> <script type="module"> import './edge-case-test-imports.js'; </script> <script src="../webcomponentsjs/webcomponents-lite.min.js"></script> <!-- <script src="../../../custom-elements/src/native-shim.js"></script> --> <script src="../../../wct-browser-legacy/browser.js"></script> <script type="module" src="./edge-case-test-imports.js"></script> <style> .test-container.running-test { display: block; } .test-container:not(.running-test) { display: none; } </style> </head> <body> <h2 id="test-name"></h2> <test-fixture class="test-container" id="empty-element-fixture"> <template> <empty-element></empty-element> </template> </test-fixture> <test-fixture class="test-container" id="bound-empty-element-fixture"> <template is="dom-template"> <empty-element lang="{{lang}}" observe-html-lang="{{observeHtmlLang}}"></empty-element> </template> </test-fixture> <test-fixture class="test-container" id="no-template-element-fixture"> <template> <no-template-element></no-template-element> </template> </test-fixture> <test-fixture class="test-container" id="complex-compound-binding-element-fixture"> <template is="dom-template"> <complex-compound-binding-element lang="{{lang}}" observe-html-lang="{{observeHtmlLang}}"></complex-compound-binding-element> </template> </test-fixture> <test-fixture class="test-container" id="advanced-binding-element-fixture"> <template is="dom-template"> <advanced-binding-element lang="{{lang}}" observe-html-lang="{{observeHtmlLang}}" status="{{status}}" value="{{value}}" parameter="{{parameter}}"></advanced-binding-element> </template> </test-fixture> <div class="test-container"> <template id="edge-case-dom-bind" is="i18n-dom-bind"> name = {{text.name}} <i18n-number>1</i18n-number> <i18n-format> <json-data>{{text.format}}</json-data> <i18n-number offset="">1</i18n-number> </i18n-format> <i18n-format> <span>format</span> <br> </i18n-format> <span>{{tr('key')}}</span> <span>{{tr('key',text.table)}}</span> <span>{{tr('key','string')}}</span> <input placeholder="{ invalid: json }"> <p>hello <br><span></span> <span> </span> world</p> <p>hello<template is="dom-repeat" items="[0,1]"><br></template>world</p> hello <br><span></span> <span> </span> world </template> <template> <json-data text-id="target" data="{}"></json-data> <json-data id="func">{ "func": or }</json-data> <json-data text-id="format">{ "other": "other format" }</json-data> <json-data text-id="table">{ "message-id": "message 1" }</json-data> <span text-id="name">John</span> </template> </template> </div> <i18n-preference></i18n-preference> </body> </html>