~daker/ubuntu-html5-theme/i18n-pojson

« back to all changes in this revision

Viewing changes to examples/html5-theme/widgets/index.html

  • Committer: daker
  • Date: 2014-03-19 00:32:25 UTC
  • Revision ID: adnane002@gmail.com-20140319003225-9lxo0zlt3lc4ns7r
Added bs4 deps
Fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    <title>Ubuntu UI HTML5: i18n</title>
31
31
    <link href="../../../0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
32
32
    <script src="../../../0.1/ambiance/js/fast-buttons.js"></script>
 
33
    <script src="../../../0.1/ambiance/js/buttons.js"></script>
33
34
    <script src="../../../0.1/ambiance/js/core.js"></script>
34
35
    <script src="../../../0.1/ambiance/js/i18n.js"></script>
35
36
    <script>
38
39
            UI.init();
39
40
            i18n = UI.i18n();
40
41
 
41
 
            setTimeout(function(){
 
42
            /*setTimeout(function(){
42
43
                console.log(i18n._('Good Morning'));
43
44
                console.log(i18n.strargs(i18n._('Good Morning {{ user }}'), '{ "user": "daker" }'));
44
45
                console.log(i18n.strargs(i18n.ngettext('I have a {{ brand }} car', 'I have {{ num }} {{ brand }} cars', '1'), '{ "num": "1", "brand": "Mercedes" }'));
45
46
                console.log(i18n.strargs(i18n.ngettext('I have a {{ brand }} car', 'I have {{ num }} {{ brand }} cars', '3'), '{ "num": "3", "brand": "Mercedes" }'));
46
47
 
47
 
            },100);
 
48
            },100);*/
 
49
 
 
50
            UI.button('t').click(function () {
 
51
                console.log(i18n._('Good Morning'));
 
52
            });
48
53
        };
49
54
    </script>
50
55
</head>
53
58
        <h1 data-i18n-translate>Good Morning</h1>
54
59
        <h1 data-i18n-translate data-i18n-args='{ "user": "daker" }'>Good Morning {{ user }}</h1>
55
60
        <h1 data-i18n-translate data-i18n-plural="I have {{ num }} {{ brand }} cars" data-i18n-args='{ "num": "1", "brand": "Mercedes" }'>I have a {{ brand }} car</h1>
 
61
 
 
62
        <button data-role="button" id="t">Primary action</button>
56
63
    </div>
57
64
</body>
58
65
</html>