Skip to content
Browse files

Add the ability to translate the site into different languages. An in…

…complete Chinese version is included.
  • Loading branch information...
1 parent fac4277 commit 4f501a34e70ee4f32d4f5c60e08b7f266078a659 @NielsLeenheer committed Jul 6, 2012
Showing with 575 additions and 163 deletions.
  1. +5 −0 .htaccess
  2. +15 −15 about.html
  3. +18 −18 backend/templates/browser.html
  4. +18 −18 backend/templates/feature.html
  5. +36 −36 backend/templates/results.html
  6. +15 −15 donate.html
  7. +33 −30 index.html
  8. +32 −31 scripts/reporting.js
  9. +70 −0 scripts/template.js
  10. +331 −0 translations/cn/index.js
  11. +2 −0 translations/en/index.js
View
5 .htaccess
@@ -6,6 +6,11 @@ RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.html5test\.com$
RewriteRule ^ http://html5test.com%{REQUEST_URI} [L,R=301]
+RewriteCond %{HTTP_HOST} ^(beta.)?cn.html5test.com
+RewriteRule ^translation.js$ /translations/cn/index.js
+
+RewriteRule ^translation.js$ /translations/en/index.js
+
RewriteRule ^compare.html$ /compare/browser/index.html [R]
RewriteRule ^results.html$ /results/desktop.html [R]
RewriteRule ^results-mobile.html$ /results/mobile.html [R]
View
30 about.html
@@ -25,7 +25,7 @@
<html>
<head>
- <title>The HTML5 test - How well does your browser support HTML5?</title>
+ <title data-i18n>The HTML5 test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
@@ -37,27 +37,31 @@
<link rel="stylesheet" href="css/main.css" type="text/css">
+ <script src='/translation.js' type='text/javascript'></script>
+
+ <script src='/scripts/template.js' type='text/javascript'></script>
+
<link rel="icon" href="/images/icon.png">
<link rel="apple-touch-icon" href="/images/button.png">
</head>
<body>
<div class='header'>
- <h1>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
+ <h1 data-i18n>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
<ul>
- <li><a href='/index.html'>Your browser</a></li>
- <li><a href='/results/desktop.html'>Other<span> browser</span>s</a></li>
- <li><a href='/compare/browser/index.html'>Compare</a></li>
+ <li><a href='/index.html' data-i18n>Your browser</a></li>
+ <li><a href='/results/desktop.html' data-i18n>Other<span> browser</span>s</a></li>
+ <li><a href='/compare/browser/index.html' data-i18n>Compare</a></li>
- <li class='right selected'><a href='/about.html'>About<span> the test</span></a></li>
+ <li class='right selected'><a href='/about.html' data-i18n>About<span> the test</span></a></li>
</ul>
</div>
<div class='page'>
<div class='paper'>
<ul>
- <li class='selected'><a href='about.html'>Frequently asked questions</a></li>
- <li><a href='donate.html'>Donate</a></li>
+ <li class='selected'><a href='about.html' data-i18n>Frequently asked questions</a></li>
+ <li><a href='donate.html' data-i18n>Donate</a></li>
</ul>
<div>
@@ -251,13 +255,9 @@
</div>
<div class='copyright'>
- <p>
- Copyright 2010-2012 by Sights
- </p>
- <p>
- April, 2012 - version 3.0
- </p>
- <p>
+ <p>Copyright 2010-2012 by Sights</p>
+ <p>April, 2012 - version 3.0</p>
+ <p data-i18n='footer'>
The HTML5 test is being developed at <a href='http://github.com/NielsLeenheer/html5test'>Github</a>. Please file an issue there if you find any bugs or think of any improvements to this test.
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.
</p>
View
36 backend/templates/browser.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>The HTML5 test - How well does your browser support HTML5?</title>
+ <title data-i18n>The HTML5 test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
@@ -12,8 +12,12 @@
<link href='//fonts.googleapis.com/css?family=Alfa+Slab+One' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/main.css" type="text/css">
+
+ <script src='/translation.js' type='text/javascript'></script>
+
<script src='/scripts/data.js' type='text/javascript'></script>
<script src='/scripts/engine.js' type='text/javascript'></script>
+ <script src='/scripts/template.js' type='text/javascript'></script>
<script src='/scripts/reporting.js' type='text/javascript'></script>
<script src='/scripts/useragents.js' type='text/javascript'></script>
@@ -23,30 +27,30 @@
<body>
<div class='header'>
- <h1>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
+ <h1 data-i18n>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
<ul>
- <li><a href='/index.html'>Your browser</a></li>
- <li><a href='/results/desktop.html'>Other<span> browser</span>s</a></li>
- <li class='selected'><a href='/compare/browser/index.html'>Compare</a></li>
+ <li><a href='/index.html' data-i18n>Your browser</a></li>
+ <li><a href='/results/desktop.html' data-i18n>Other<span> browser</span>s</a></li>
+ <li class='selected'><a href='/compare/browser/index.html' data-i18n>Compare</a></li>
- <li class='right'><a href='/about.html'>About<span> the test</span></a></li>
+ <li class='right'><a href='/about.html' data-i18n>About<span> the test</span></a></li>
</ul>
</div>
<div class='page'>
<div class='paper'>
<ul>
- <li class='selected'><a href='/compare/browser/index.html'>Browsers</a></li>
- <li><a href='/compare/feature/index.html'>Features</a></li>
+ <li class='selected'><a href='/compare/browser/index.html' data-i18n>Browsers</a></li>
+ <li><a href='/compare/feature/index.html' data-i18n>Features</a></li>
</ul>
<div>
<div id='comparison' class='comparisonTable'></div>
<hr>
- <h3>About these scores</h3>
- <div class='explaination'>
+ <h3 data-i18n>About these scores</h3>
+ <div class='explaination' data-i18n='score-explaination'>
The data above is compiled from automatically submitted test results. It is possible your results
may differ slightly due to external factors such as settings and which operating system is used.
If you believe the data above is incorrect, or if you think we are missing an important browser
@@ -63,7 +67,7 @@
});
var table = new FeatureTable({
- title: '<h2>browsers</h2><p>Select up to three browsers and compare their test results in detail</p>',
+ title: '<h2>' + t('Browsers') + '</h2><p>' + t('Select up to three browsers and compare their test results in detail') + '</p>',
parent: document.getElementById('comparison'),
tests: tests,
browsers: <?php echo json_encode($results); ?>,
@@ -107,13 +111,9 @@
</div>
<div class='copyright'>
- <p>
- Copyright 2010-2012 by Sights
- </p>
- <p>
- April, 2012 - version 3.0
- </p>
- <p>
+ <p>Copyright 2010-2012 by Sights</p>
+ <p>April, 2012 - version 3.0</p>
+ <p data-i18n='footer'>
The HTML5 test is being developed at <a href='http://github.com/NielsLeenheer/html5test'>Github</a>. Please file an issue there if you find any bugs or think of any improvements to this test.
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.
</p>
View
36 backend/templates/feature.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>The HTML5 test - How well does your browser support HTML5?</title>
+ <title data-i18n>The HTML5 test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
@@ -12,7 +12,11 @@
<link href='//fonts.googleapis.com/css?family=Alfa+Slab+One' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/main.css" type="text/css">
+
+ <script src='/translation.js' type='text/javascript'></script>
+
<script src='/scripts/data.js' type='text/javascript'></script>
+ <script src='/scripts/template.js' type='text/javascript'></script>
<script src='/scripts/reporting.js' type='text/javascript'></script>
<link rel="icon" href="/images/icon.png">
@@ -21,30 +25,30 @@
<body>
<div class='header'>
- <h1>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
+ <h1 data-i18n>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
<ul>
- <li><a href='/index.html'>Your browser</a></li>
- <li><a href='/results/desktop.html'>Other<span> browser</span>s</a></li>
- <li class='selected'><a href='/compare/browser/index.html'>Compare</a></li>
+ <li><a href='/index.html' data-i18n>Your browser</a></li>
+ <li><a href='/results/desktop.html' data-i18n>Other<span> browser</span>s</a></li>
+ <li class='selected'><a href='/compare/browser/index.html' data-i18n>Compare</a></li>
- <li class='right'><a href='/about.html'>About<span> the test</span></a></li>
+ <li class='right'><a href='/about.html' data-i18n>About<span> the test</span></a></li>
</ul>
</div>
<div class='page'>
<div class='paper'>
<ul>
- <li><a href='/compare/browser/index.html'>Browsers</a></li>
- <li class='selected'><a href='/compare/feature/index.html'>Features</a></li>
+ <li><a href='/compare/browser/index.html' data-i18n>Browsers</a></li>
+ <li class='selected'><a href='/compare/feature/index.html' data-i18n>Features</a></li>
</ul>
<div>
<div id='comparison' class='comparisonTable'></div>
<hr>
- <h3>About these scores</h3>
- <div class='explaination'>
+ <h3 data-i18n>About these scores</h3>
+ <div class='explaination' data-i18n='score-explaination'>
The data above is compiled from automatically submitted test results. It is possible your results
may differ slightly due to external factors such as settings and which operating system is used.
If you believe the data above is incorrect, or if you think we are missing an important browser
@@ -56,7 +60,7 @@
<!--
var table = new BrowserTable({
- title: '<h2>features</h2><p>Select up to three features and immediately see how well it is supported by each browser</p>',
+ title: '<h2>' + t('Features') + '</h2><p>' + t('Select up to three features and immediately see how well it is supported by each browser') + '</p>',
parent: document.getElementById('comparison'),
tests: tests,
browsers: <?php echo json_encode($results); ?>,
@@ -98,13 +102,9 @@
</div>
<div class='copyright'>
- <p>
- Copyright 2010-2012 by Sights
- </p>
- <p>
- April, 2012 - version 3.0
- </p>
- <p>
+ <p>Copyright 2010-2012 by Sights</p>
+ <p>April, 2012 - version 3.0</p>
+ <p data-i18n='footer'>
The HTML5 test is being developed at <a href='http://github.com/NielsLeenheer/html5test'>Github</a>. Please file an issue there if you find any bugs or think of any improvements to this test.
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.
</p>
View
72 backend/templates/results.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>The HTML5 test - How well does your browser support HTML5?</title>
+ <title data-i18n>The HTML5 test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
@@ -12,6 +12,10 @@
<link href='//fonts.googleapis.com/css?family=Alfa+Slab+One' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/main.css" type="text/css">
+
+ <script src='/translation.js' type='text/javascript'></script>
+
+ <script src='/scripts/template.js' type='text/javascript'></script>
<script src='/scripts/jquery/jquery-1.7.2.min.js' type='text/javascript'></script>
<script src='/scripts/highcharts/highcharts.src.js' type='text/javascript'></script>
<script src="/scripts/highcharts/modules/exporting.js" type="text/javascript"></script>
@@ -23,47 +27,47 @@
<body>
<div class='header'>
- <h1>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
+ <h1 data-i18n>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
<ul>
- <li><a href='/index.html'>Your browser</a></li>
- <li class='selected'><a href='/results/desktop.html'>Other<span> browser</span>s</a></li>
- <li><a href='/compare/browser/index.html'>Compare</a></li>
+ <li><a href='/index.html' data-i18n>Your browser</a></li>
+ <li class='selected'><a href='/results/desktop.html' data-i18n>Other<span> browser</span>s</a></li>
+ <li><a href='/compare/browser/index.html' data-i18n>Compare</a></li>
- <li class='right'><a href='/about.html'>About<span> the test</span></a></li>
+ <li class='right'><a href='/about.html' data-i18n>About<span> the test</span></a></li>
</ul>
</div>
<div class='page'>
<div class='paper'>
<ul>
- <li class='<?php echo $type == 'desktop' ? 'selected' : ''; ?>'><a href='/results/desktop.html'>Desktop<span> browsers</span></a></li>
- <li class='<?php echo $type == 'tablet' ? 'selected' : ''; ?>'><a href='/results/tablet.html'>Tablets</a></li>
- <li class='<?php echo $type == 'mobile' ? 'selected' : ''; ?>'><a href='/results/mobile.html'>Mobiles</a></li>
- <li class='<?php echo $type == 'gaming' ? 'selected' : ''; ?>'><a href='/results/gaming.html'>Gaming</a></li>
- <li class='<?php echo $type == 'television' ? 'selected' : ''; ?>'><a href='/results/television.html'>Television</a></li>
+ <li class='<?php echo $type == 'desktop' ? 'selected' : ''; ?>'><a data-i18n href='/results/desktop.html'>Desktop<span> browsers</span></a></li>
+ <li class='<?php echo $type == 'tablet' ? 'selected' : ''; ?>'><a data-i18n href='/results/tablet.html'>Tablets</a></li>
+ <li class='<?php echo $type == 'mobile' ? 'selected' : ''; ?>'><a data-i18n href='/results/mobile.html'>Mobiles</a></li>
+ <li class='<?php echo $type == 'gaming' ? 'selected' : ''; ?>'><a data-i18n href='/results/gaming.html'>Gaming</a></li>
+ <li class='<?php echo $type == 'television' ? 'selected' : ''; ?>'><a data-i18n href='/results/television.html'>Television</a></li>
</ul>
<div>
<div class='rankingPanel'>
<?php if (isset($first)): ?>
<dl id='winner'>
- <dt>first place</dt>
+ <dt data-i18n>first place</dt>
<dd class='score'><?php echo $first->score; ?></dd>
<dd><?php echo $first->nickname; ?></dd>
</dl>
<?php endif; ?>
<?php if (isset($runnerup)): ?>
<dl id='runnerup'>
- <dt>runner up</dt>
+ <dt data-i18n>runner up</dt>
<dd class='score'><?php echo $runnerup->score; ?></dd>
<dd><?php echo $runnerup->nickname; ?></dd>
</dl>
<?php endif; ?>
<?php if (isset($upcoming)): ?>
<dl id='upcoming'>
- <dt>upcoming</dt>
+ <dt data-i18n>upcoming</dt>
<dd class='score'><?php echo $upcoming->score; ?></dd>
<dd><?php echo $upcoming->nickname; ?></dd>
</dl>
@@ -73,15 +77,15 @@
<hr>
<?php if (isset($results['current'])): ?>
- <h2>Current</h2>
+ <h2 data-i18n>Current</h2>
<table class='scoreTable'>
<thead>
<tr>
<th class='nickname'></th>
<th class='details'></th>
<th class='description'></th>
- <th class='points'>Score</th>
- <th class='bonus'>Bonus</th>
+ <th class='points' data-i18n>Score</th>
+ <th class='bonus' data-i18n>Bonus</th>
</tr>
</thead>
<tbody>
@@ -105,15 +109,15 @@
<?php endif; ?>
<?php if (isset($results['development'])): ?>
- <h2>Development or beta</h2>
+ <h2 data-i18n>Development or beta</h2>
<table class='scoreTable'>
<thead>
<tr>
<th class='nickname'></th>
<th class='details'></th>
<th class='description'></th>
- <th class='points'>Score</th>
- <th class='bonus'>Bonus</th>
+ <th class='points' data-i18n>Score</th>
+ <th class='bonus' data-i18n>Bonus</th>
</tr>
</thead>
<tbody>
@@ -137,15 +141,15 @@
<?php endif; ?>
<?php if (isset($results['legacy'])): ?>
- <h2>Older</h2>
+ <h2 data-i18n>Older</h2>
<table class='scoreTable'>
<thead>
<tr>
<th class='nickname'></th>
<th class='details'></th>
<th class='description'></th>
- <th class='points'>Score</th>
- <th class='bonus'>Bonus</th>
+ <th class='points' data-i18n>Score</th>
+ <th class='bonus' data-i18n>Bonus</th>
</tr>
</thead>
<tbody>
@@ -173,7 +177,7 @@
<hr>
<div id='fsCanvas'>
- <h2>Timeline</h2>
+ <h2 data-i18n>Timeline</h2>
<button id='fsButton' style='display: none;'></button>
<br>
@@ -223,7 +227,7 @@
enabled: false
},
title: {
- text: 'HTML5test.com score over the years'
+ text: t('HTML5test.com score over the years')
},
legend: {
borderWidth: 0,
@@ -239,14 +243,14 @@
},
yAxis: {
title: {
- text: 'Score (points)'
+ text: t('Score (points)')
},
min: 0
},
tooltip: {
formatter: function() {
return '<b>'+ this.key +'</b><br/>'+
- (this.point.status != 'development' ? Highcharts.dateFormat('%b %Y', this.x) : 'Unreleased') +'<br>' +
+ (this.point.status != 'development' ? Highcharts.dateFormat('%b %Y', this.x) : t('Unreleased')) +'<br>' +
this.y +' points';
}
},
@@ -290,8 +294,8 @@
<hr>
- <h3>About these scores</h3>
- <div class='explaination'>
+ <h3 data-i18n>About these scores</h3>
+ <div class='explaination' data-i18n='score-explaination'>
The data above is compiled from automatically submitted test results. It is possible your results
may differ slightly due to external factors such as settings and which operating system is used.
If you believe the data above is incorrect, or if you think we are missing an important browser
@@ -308,13 +312,9 @@
</div>
<div class='copyright'>
- <p>
- Copyright 2010-2012 by Sights
- </p>
- <p>
- April, 2012 - version 3.0
- </p>
- <p>
+ <p>Copyright 2010-2012 by Sights</p>
+ <p>April, 2012 - version 3.0</p>
+ <p data-i18n='footer'>
The HTML5 test is being developed at <a href='http://github.com/NielsLeenheer/html5test'>Github</a>. Please file an issue there if you find any bugs or think of any improvements to this test.
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.
</p>
View
30 donate.html
@@ -25,7 +25,7 @@
<html>
<head>
- <title>The HTML5 test - How well does your browser support HTML5?</title>
+ <title data-i18n>The HTML5 test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
@@ -37,6 +37,10 @@
<link rel="stylesheet" href="css/main.css" type="text/css">
+ <script src='/translation.js' type='text/javascript'></script>
+
+ <script src='/scripts/template.js' type='text/javascript'></script>
+
<link rel="icon" href="/images/icon.png">
<link rel="apple-touch-icon" href="/images/button.png">
@@ -55,21 +59,21 @@
<body>
<div class='header'>
- <h1>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
+ <h1 data-i18n>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
<ul>
- <li><a href='/index.html'>Your browser</a></li>
- <li><a href='/results/desktop.html'>Other<span> browser</span>s</a></li>
- <li><a href='/compare/browser/index.html'>Compare</a></li>
+ <li><a href='/index.html' data-i18n>Your browser</a></li>
+ <li><a href='/results/desktop.html' data-i18n>Other<span> browser</span>s</a></li>
+ <li><a href='/compare/browser/index.html' data-i18n>Compare</a></li>
- <li class='right selected'><a href='/about.html'>About<span> the test</span></a></li>
+ <li class='right selected'><a href='/about.html' data-i18n>About<span> the test</span></a></li>
</ul>
</div>
<div class='page'>
<div class='paper'>
<ul>
- <li><a href='about.html'>Frequently asked questions</a></li>
- <li class='selected'><a href='donate.html'>Donate</a></li>
+ <li><a href='about.html' data-i18n>Frequently asked questions</a></li>
+ <li class='selected'><a href='donate.html' data-i18n>Donate</a></li>
</ul>
<div>
@@ -142,13 +146,9 @@
</div>
<div class='copyright'>
- <p>
- Copyright 2010-2012 by Sights
- </p>
- <p>
- April, 2012 - version 3.0
- </p>
- <p>
+ <p>Copyright 2010-2012 by Sights</p>
+ <p>April, 2012 - version 3.0</p>
+ <p data-i18n='footer'>
The HTML5 test is being developed at <a href='http://github.com/NielsLeenheer/html5test'>Github</a>. Please file an issue there if you find any bugs or think of any improvements to this test.
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.
</p>
View
63 index.html
@@ -2,7 +2,7 @@
<html>
<head>
- <title>The HTML5 test - How well does your browser support HTML5?</title>
+ <title data-i18n>The HTML5 test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
@@ -15,9 +15,13 @@
<link href='//fonts.googleapis.com/css?family=Alfa+Slab+One' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/main.css" type="text/css">
+
+ <script src='/translation.js' type='text/javascript'></script>
+
<script src='/scripts/useragents.js' type='text/javascript'></script>
<script src='/scripts/engine.js' type='text/javascript'></script>
<script src='/scripts/data.js' type='text/javascript'></script>
+ <script src='/scripts/template.js' type='text/javascript'></script>
<script src='/scripts/reporting.js' type='text/javascript'></script>
<link rel="icon" href="/images/icon.png">
@@ -73,13 +77,13 @@
<div id="fb-root"></div>
<div class='header'>
- <h1>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
+ <h1 data-i18n>The HTML5 test <em>&ndash; how well does your browser support HTML5?</em></h1>
<ul>
- <li class='selected'><a href='/index.html'>Your browser</a></li>
- <li><a href='/results/desktop.html'>Other<span> browser</span>s</a></li>
- <li><a href='/compare/browser/index.html'>Compare</a></li>
+ <li class='selected'><a href='/index.html' data-i18n>Your browser</a></li>
+ <li><a href='/results/desktop.html' data-i18n>Other<span> browser</span>s</a></li>
+ <li><a href='/compare/browser/index.html' data-i18n>Compare</a></li>
- <li class='right'><a href='/about.html'>About<span> the test</span></a></li>
+ <li class='right'><a href='/about.html' data-i18n>About<span> the test</span></a></li>
</ul>
</div>
@@ -105,7 +109,7 @@
<div>
<span id='html5'></span>
- <p>
+ <p data-i18n='index-intro-1'>
The HTML5 test score is an indication of how well your browser supports the
upcoming HTML5 standard and related specifications. Even though the specification
isn't finalized yet, all major browser manufacturers are making sure their
@@ -114,27 +118,27 @@
</p>
<div class='ads'>
- <p>Sponsors</p>
+ <p data-i18n>Sponsors</p>
<!-- BuySellAds.com Zone Code -->
<div id="bsap_1262954" class="bsarocks bsap_6c18c40d896c427f049e74e4c708ab51"></div>
<!-- End BuySellAds.com Zone Code -->
</div>
- <p>
+ <p data-i18n='index-intro-2'>
The HTML5 test does not try to test all of the new features offered by HTML5, nor does it try to test the functionality of each feature it does detect.
Despite these shortcomings we hope that by quantifying the level of support users and web developers will get an idea of how hard the
browser manufacturers work on improving their browsers and the web as a development platform.
</p>
- <p>
+ <p data-i18n='index-intro-3'>
The score is calculated by testing for the many new features of HTML5. Each feature is worth one or more points. Apart from the main HTML5
specification and other specifications created the W3C HTML Working Group, this test also awards points for supporting related drafts and
specifications. Some of these specifications were initially part of HTML5, but are now further developed by other W3C working groups.
WebGL is also part of this test despite not being developed by the W3C, because it extends the HTML5 canvas element with a 3d context.
</p>
- <p>
+ <p data-i18n='index-intro-4'>
The test also awards bonus points for supporting audio and video codecs and supporting SVG or MathML embedding in a plain HTML document.
These test do not count towards the total score because HTML5 does not specify any required audio or video codec. Also SVG and MathML are
not required by HTML5, the specification only specifies rules for how such content should be embedded inside a plain HTML file.
@@ -148,13 +152,13 @@
<!-- End BuySellAds.com Zone Code -->
</div>
- <p>
+ <p data-i18n='index-intro-5'>
Please be aware that the specifications that are being tested are still in development and could change before receiving an official status.
In the future new tests will be added for the pieces of the specification that are currently still missing.
The maximum number of points that can be scored is <span id='total'>0</span> at this moment, but this is a moving goalpost.
</p>
- <p>
+ <p data-i18n='index-intro-6'>
The HTML5 test is created by Niels Leenheer. Visit my website at <a href='http://rakaz.nl'>rakaz.nl</a> or follow me on <a href='http://twitter.com/rakaz'>twitter</a>.
</p>
@@ -172,13 +176,9 @@
</div>
<div class='copyright'>
- <p>
- Copyright 2010-2012 by Sights
- </p>
- <p>
- April, 2012 - version 3.0
- </p>
- <p>
+ <p>Copyright 2010-2012 by Sights</p>
+ <p>April, 2012 - version 3.0</p>
+ <p data-i18n='footer'>
The HTML5 test is being developed at <a href='http://github.com/NielsLeenheer/html5test'>Github</a>. Please file an issue there if you find any bugs or think of any improvements to this test.
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.
</p>
@@ -204,10 +204,10 @@
this.useragent = document.createElement('p');
this.useragent.className = 'useragent';
parent.appendChild(this.useragent);
- this.useragent.innerHTML = 'You are using ' + Browsers;
+ this.useragent.innerHTML = t('You are using') + ' ' + Browsers;
this.confirm = document.createElement('span');
- this.confirm.innerHTML = 'Correct?';
+ this.confirm.innerHTML = t('Correct?');
this.useragent.appendChild(this.confirm);
var correct = document.createElement('a');
@@ -232,7 +232,7 @@
this.thanks = document.createElement('span');
this.thanks.style.display = 'none';
- this.thanks.innerHTML = 'Thanks!';
+ this.thanks.innerHTML = t('Thanks!');
this.useragent.appendChild(this.thanks);
},
@@ -335,13 +335,16 @@
/* Update total score */
var results = document.getElementById('results');
- results.innerHTML =
+ results.innerHTML = tim(
"<div class='scorePanel'>" +
- "<p class='intro'>Your browser scores</p>" +
- "<h2>" + r.score + "</h2>" +
- "<h3>and " + (r.bonus ? r.bonus : 'no') + " bonus point" + (r.bonus != 1 ? 's' : '') + "</h3>" +
- "<p>out of a total of " + r.maximum + " points</p>" +
- "</div>";
+ "<p class='intro'>" + t('Your browser scores') + "</p>" +
+ "<h2>{{score}}</h2>" +
+ (r.bonus == 0 ? '<h3>' + t('and no bonus points') + '</h3>' : '') +
+ (r.bonus == 1 ? '<h3>' + t('and 1 bonus point') + '</h3>' : '') +
+ (r.bonus > 1 ? '<h3>' + t('and {{bonus}} bonus points') + '</h3>' : '') +
+ "<p>" + t('out of a total of {{maximum}} points') + "</p>" +
+ "</div>",
+ r);
var total = document.getElementById('total');
@@ -385,7 +388,7 @@
/* Submit results */
var payload = '{' +
'"version": "3",' +
- '"revision": "16",' +
+ '"revision": "17",' +
'"uniqueid": "' + r.uniqueid + '",' +
'"score": ' + r.score + ',' +
'"bonus": ' + r.bonus + ',' +
View
63 scripts/reporting.js
@@ -1,3 +1,4 @@
+
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
@@ -88,7 +89,7 @@
function process(r) {
that.updateColumn(column, {
id: 'mybrowser',
- nickname: 'My browser',
+ nickname: t('My browser'),
score: r.score,
bonus: r.bonus,
points: r.points,
@@ -162,7 +163,7 @@
var row = document.getElementById('row-header');
var cell = row.childNodes[column + 1];
cell.className = '';
- cell.firstChild.firstChild.innerHTML = '<span class="nickname">' + data.nickname + '</span><span class="score">' + data.score + '</span><span class="bonus">' + data.bonus + ' bonus points</span>';
+ cell.firstChild.firstChild.innerHTML = '<span class="nickname">' + t(data.nickname) + '</span><span class="score">' + data.score + '</span><span class="bonus">' + data.bonus + ' ' + t('bonus points') + '</span>';
}
for (var i = 0; i < this.tests.length; i++) {
@@ -182,7 +183,7 @@
var cell = row.childNodes[column + 1];
if (this.options.bonus && bonus > 0) {
- cell.innerHTML += "<span class='bonus'>+" + bonus + "<span> bonus points</span></span>";
+ cell.innerHTML += "<span class='bonus'>+" + bonus + "<span> " + t('bonus points') + "</span></span>";
}
if (this.options.grading) {
@@ -232,21 +233,21 @@
var results = this.updateItems(column, data, level + 1, id + '-' + tests[i].id, tests[i].items);
if (results[0] == results[1])
- cell.innerHTML = 'Yes <span class="check">✔</span>';
+ cell.innerHTML = t('Yes') + ' <span class="check">✔</span>';
else if (results[1] == 0)
- cell.innerHTML = 'No <span class="ballot">✘</span>';
+ cell.innerHTML = t('No') + ' <span class="ballot">✘</span>';
else
- cell.innerHTML = '<span class="partially">Partial</span> <span class="partial">○</span>';
+ cell.innerHTML = '<span class="partially">' + t('Partial') + '</span> <span class="partial">○</span>';
}
else {
if (unknown) {
- cell.innerHTML = '<span class="partially">Unknown</span> <span class="partial">?</span>';
+ cell.innerHTML = '<span class="partially">' + t('Unknown') + '</span> <span class="partial">?</span>';
} else {
if (passed)
- cell.innerHTML = 'Yes <span class="check">✔</span>';
+ cell.innerHTML = t('Yes') + ' <span class="check">✔</span>';
else
- cell.innerHTML = 'No <span class="ballot">✘</span>';
+ cell.innerHTML = t('No') + ' <span class="ballot">✘</span>';
}
}
@@ -300,7 +301,7 @@
scroll.appendChild(list);
var item = document.createElement('li');
- item.innerHTML = 'My browser';
+ item.innerHTML = t('My browser');
list.appendChild(item);
(function(c, menu, item, that) {
@@ -319,11 +320,11 @@
list.appendChild(item);
switch(this.options.browsers[i].type) {
- case 'desktop': item.innerHTML = 'Desktop browsers'; break;
- case 'gaming': item.innerHTML = 'Gaming'; break;
- case 'mobile': item.innerHTML = 'Mobile phones'; break;
- case 'tablet': item.innerHTML = 'Tablets'; break;
- case 'television': item.innerHTML = 'Television'; break;
+ case 'desktop': item.innerHTML = t('Desktop browsers'); break;
+ case 'gaming': item.innerHTML = t('Gaming'); break;
+ case 'mobile': item.innerHTML = t('Mobile phones'); break;
+ case 'tablet': item.innerHTML = t('Tablets'); break;
+ case 'television': item.innerHTML = t('Television'); break;
}
}
@@ -350,7 +351,7 @@
div.addEventListener('click', function(e) {
if (that.data[c] == null) {
if (e.altKey) {
- var id = prompt('Enter the unique id of the results you want to see')
+ var id = prompt(t('Enter the unique id of the results you want to see'))
if (id) {
that.loadColumn(c, 'custom:' + id);
}
@@ -370,7 +371,7 @@
for (var i = 0; i < this.tests.length; i++) {
if (typeof this.tests[i] == 'string') {
var h2 = document.createElement('h2');
- h2.innerHTML = tests[i];
+ h2.innerHTML = t(tests[i]);
parent.appendChild(h2);
} else {
var table = document.createElement('table');
@@ -385,7 +386,7 @@
thead.appendChild(tr);
var th = document.createElement('th');
- th.innerHTML = this.tests[i].name;
+ th.innerHTML = t(this.tests[i].name);
tr.appendChild(th);
for (var c = 0; c < this.options.columns; c++) {
@@ -417,14 +418,14 @@
th.className = 'details';
tr.appendChild(th);
- th.innerHTML = tests[i];
+ th.innerHTML = t(tests[i]);
}
} else {
var th = document.createElement('th');
if (this.options.links && typeof tests[i].url != 'undefined')
- th.innerHTML = "<a href='" + tests[i].url + "'>" + tests[i].name + "</a>";
+ th.innerHTML = "<a href='" + tests[i].url + "'>" + t(tests[i].name) + "</a>";
else
- th.innerHTML = "<span>" + tests[i].name + "</span>";
+ th.innerHTML = "<span>" + t(tests[i].name) + "</span>";
tr.appendChild(th);
@@ -451,7 +452,7 @@
})(this, tr, th, children);
} else {
if (this.options.features) {
- th.innerHTML = "<a href='/compare/feature/" + id + '-' + tests[i].id + ".html'>" + tests[i].name + " <span>»</span></a>";
+ th.innerHTML = "<a href='/compare/feature/" + id + '-' + tests[i].id + ".html'>" + t(tests[i].name) + " <span>»</span></a>";
}
}
@@ -600,7 +601,7 @@
var item;
if (item = this.getItemById(this.options.tests, data.id)) {
- cell.firstChild.firstChild.innerHTML = '<span class="feature">' + item.name + '</span>';
+ cell.firstChild.firstChild.innerHTML = '<span class="feature">' + t(item.name) + '</span>';
}
}
@@ -609,9 +610,9 @@
var cell = row.childNodes[column + 1];
if (match = (new RegExp(this.browsers[i].id + '=1')).exec(data.supported))
- cell.innerHTML = 'Yes <span class="check">✔</span>';
+ cell.innerHTML = t('Yes') + ' <span class="check">✔</span>';
else
- cell.innerHTML = 'No <span class="ballot">✘</span>';
+ cell.innerHTML = t('No') + ' <span class="ballot">✘</span>';
}
},
@@ -659,7 +660,7 @@
for (var i = 0; i < tests.length; i++) {
var item = document.createElement('li');
item.className = 'indent-' + tests[i].indent;
- item.innerHTML = tests[i].name;
+ item.innerHTML = t(tests[i].name);
list.appendChild(item);
@@ -713,11 +714,11 @@
tr.appendChild(th);
switch(this.browsers[i].type) {
- case 'desktop': th.innerHTML = '<h3>Desktop browsers</h3>'; break;
- case 'gaming': th.innerHTML = '<h3>Gaming</h3>'; break;
- case 'mobile': th.innerHTML = '<h3>Mobile phones</h3>'; break;
- case 'tablet': th.innerHTML = '<h3>Tablets</h3>'; break;
- case 'television': th.innerHTML = '<h3>Television</h3>'; break;
+ case 'desktop': th.innerHTML = '<h3>' + t('Desktop browsers') + '</h3>'; break;
+ case 'gaming': th.innerHTML = '<h3>' + t('Gaming') + '</h3>'; break;
+ case 'mobile': th.innerHTML = '<h3>' + t('Mobile phones') + '</h3>'; break;
+ case 'tablet': th.innerHTML = '<h3>' + t('Tablets') + '</h3>'; break;
+ case 'television': th.innerHTML = '<h3>' + t('Television') + '</h3>'; break;
}
}
View
70 scripts/template.js
@@ -0,0 +1,70 @@
+
+
+(function() {
+ window.t = function(s) { return (translation[s] ? translation[s] : s); };
+
+ if(document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", function()
+ {
+ document.removeEventListener( "DOMContentLoaded", arguments.callee, false);
+ translate();
+ }, false);
+ }
+ else if(document.attachEvent) {
+ document.attachEvent("onreadystatechange", function()
+ {
+ if(document.readyState === "complete") {
+ document.detachEvent("onreadystatechange", arguments.callee);
+ translate();
+ }
+ });
+ }
+
+ function translate() {
+ var elements = document.querySelectorAll('[data-i18n]');
+ for (var i = 0; i < elements.length; i++) {
+ var id = elements[i].getAttribute('data-i18n');
+ if (id == '') id = elements[i].innerHTML;
+ if (id && translation[id]) elements[i].innerHTML = translation[id];
+ }
+ }
+})();
+
+
+
+var tim = (function(){
+ var starts = "{{",
+ ends = "}}",
+ path = "[a-z0-9_][\\.a-z0-9_]*", // e.g. config.person.name
+ pattern = new RegExp(starts + "("+ path +")" + ends, "gim"),
+ undef;
+
+ return function(template, data, notFound){
+ // Merge the data into the template string
+ return template.replace(pattern, function(tag, ref){
+ var path = ref.split("."),
+ len = path.length,
+ lookup = data,
+ i = 0;
+
+ for (; i < len; i++){
+ lookup = lookup[path[i]];
+
+ // Error handling for when the property is not found
+ if (lookup === undef){
+ // If specified, substitute with the "not found" arg
+ if (notFound !== undef){
+ return notFound;
+ }
+ // Throw error
+ throw "Tim: '" + path[i] + "' not found in " + tag;
+ }
+
+ // Success! Return the required value
+ if (i === len - 1){
+ return lookup;
+ }
+ }
+ });
+ };
+}());
View
331 translations/cn/index.js
@@ -0,0 +1,331 @@
+var translation = {
+ 'The HTML5 test - How well does your browser support HTML5?': 'HTML5测试 - 你的浏览器能有多好的支持HTML5?',
+ 'The HTML5 test <em>– how well does your browser support HTML5?</em>': 'HTML5测试 <em>– 你的浏览器能有多好的支持HTML5?</em>',
+
+ 'Your browser': '你的浏览器',
+ 'Other<span> browser</span>s': '其他浏览器',
+ 'Compare': '比较',
+ 'About<span> the test</span>': '关于测试',
+
+ 'Your browser scores': '你的浏览器分数',
+ 'and no bonus points': '额外奖励分 {{bonus}} 分',
+ 'and 1 bonus point': '额外奖励分 {{bonus}} 分',
+ 'and {{bonus}} bonus points': '额外奖励分 {{bonus}} 分',
+ 'out of a total of {{maximum}} points': '说明:本测试满分为 {{maximum}} 分',
+
+ 'You are using': '你的浏览器是',
+ 'Correct?': '正确吗?',
+ 'Thanks!': '谢谢!',
+
+ 'bonus points': '额外奖励分',
+ 'Yes': '',
+ 'No': '',
+ 'Partial': '部分的',
+ 'Unknown': '不明',
+
+ 'Related specifications': '',
+ 'Experimental': '',
+
+
+ 'Parsing rules': '解析规则',
+ '<code>&lt;!DOCTYPE html&gt;</code> triggers standards mode': '触发标准模式',
+ 'HTML5 tokenizer': 'HTML5 标记生成器',
+ 'HTML5 tree building': 'HTML5构建树',
+ '<em>HTML5 defines rules for embedding SVG and MathML inside a regular HTML document. Support for SVG and MathML is not required though, so bonus points are awarded if your browser supports embedding these two technologies.</em>': '<em>HTML5为在一个普通的HTML文件中嵌入SVG和MathML定义规则。但不要求浏览器支持SVG和MathML,所以如果您的浏览器支持嵌入这两种技术被授予奖励分数。</em>',
+ 'SVG in <code>text/html</code>': '支持SVG',
+ 'MathML in <code>text/html</code>': '支持MathML',
+
+ 'Canvas': '画布',
+ '<code>canvas</code> element': '画布元素',
+ '2D context': '2D 背景下',
+ 'Text': '文本',
+
+ 'Video': '视频',
+ '<code>video</code> element': '视频元素',
+ 'Subtitle support': '字幕支持',
+ 'Poster image support': '海报图像支持',
+ '<em>The following tests go beyond the requirements of the HTML5 specification and are not counted towards the total score. If browser support for one or more video codecs is detected, two bonus points are awarded for each codec.</em>': '<em>下面的测试超出了HTML5规范的要求,并没有计算在总成绩以内。如果浏览器支持一个或多个视频编解码器,将会给每个解码器两分的额外奖励。</em>',
+ 'MPEG-4 support': '支持 MPEG-4',
+ 'H.264 support': '支持 H.264',
+ 'Ogg Theora support': '支持 Ogg Theora',
+ 'WebM support': '支持 WebM',
+
+ 'Audio': '音频',
+ '<code>audio</code> element': '音频元素',
+ '<em>The following tests go beyond the requirements of the HTML5 specification and are not counted towards the total score. If browser support for one or more audio codecs is detected, one bonus point is awarded for each codec.</em>': '<em>下面的测试超出HTML5规范的要求,并没有计算入总成绩中。如果浏览器支持一个或多个音频编解码器,将额外给每个编解码器1分的额外奖励。</em>',
+ 'PCM audio support': '支持 PCM 音频',
+ 'AAC support': '支持 AAC',
+ 'MP3 support': '支持 MP3',
+ 'Ogg Vorbis support': '支持 Ogg Vorbis',
+ 'WebM support': '支持 WebM',
+
+ 'Elements': '元素',
+ 'Embedding custom non-visible data': '嵌入不可见的自定义数据',
+ '<strong>New or modified elements</strong>': '<strong>新的或修改过的元素</strong>',
+ 'Section elements': '节元素',
+ '<code>section</code> element': '',
+ '<code>nav</code> element': '',
+ '<code>article</code> element': '',
+ '<code>aside</code> element': '',
+ '<code>hgroup</code> element': '',
+ '<code>header</code> element': '',
+ '<code>footer</code> element': '',
+ 'Grouping content elements': '内容元素分组',
+ '<code>figure</code> element': '',
+ '<code>figcaption</code> element': '',
+ '<code>reversed</code> attribute on the <code>ol</code> element': '',
+ 'Text-level semantic elements': '文本层面的语义元素',
+ '<code>mark</code> element': '',
+ '<code>ruby</code>, <code>rt</code> and <code>rp</code> elements': '',
+ '<code>time</code> element': '',
+ '<code>wbr</code> element': '',
+ 'Interactive elements': '交互元素',
+ '<code>details</code> element': '',
+ '<code>summary</code> element': '',
+ '<code>command</code> element': '',
+ '<code>menu</code> element of type <code>list</code>': '',
+ '<code>menu</code> element of type <code>toolbar</code>': '',
+ '<code>menu</code> element of type <code>context</code>': '',
+ '<strong>Global attributes or methods</strong>': '<strong>全局属性或方法</strong>',
+ '<code>hidden</code> attribute': '隐藏属性',
+ 'Dynamic markup insertion': '动态标记插入',
+ '<code>outerHTML</code> property': '',
+ '<code>insertAdjacentHTML</code> function': '',
+
+ 'Forms': '表单',
+ '<strong>Field types</strong>': '<strong></strong>',
+ '<strong>Fields</strong>': '<strong></strong>',
+ '<strong>Forms</strong>': '<strong></strong>',
+ '<code>input type=text</code>': '',
+ '<code>input type=search</code>': '',
+ '<code>input type=tel</code>': '',
+ '<code>input type=url</code>': '',
+ '<code>input type=email</code>': '',
+ '<code>input type=datetime</code>': '',
+ '<code>input type=date</code>': '',
+ '<code>input type=month</code>': '',
+ '<code>input type=week</code>': '',
+ '<code>input type=time</code>': '',
+ '<code>input type=datetime-local</code>': '',
+ '<code>input type=number</code>': '',
+ '<code>input type=range</code>': '',
+ '<code>input type=color</code>': '',
+ '<code>input type=checkbox</code>': '',
+ '<code>input type=file</code>': '',
+ '<code>textarea</code>': '',
+ '<code>select</code>': '',
+ '<code>fieldset</code>': '',
+ '<code>datalist</code>': '',
+ '<code>keygen</code>': '',
+ '<code>output</code>': '',
+ '<code>progress</code>': '',
+ '<code>meter</code>': '',
+ '<code>min</code> attribute': '',
+ '<code>max</code> attribute': '',
+ '<code>step</code> attribute': '',
+ '<code>maxlength</code> attribute': '',
+ '<code>wrap</code> attribute': '',
+ '<code>required</code> attribute': '',
+ '<code>elements</code> attribute': '',
+ '<code>disabled</code> attribute': '',
+ '<code>list</code> attribute for fields': '',
+ '<code>challenge</code> attribute': '',
+ '<code>keytype</code> attribute': '',
+ '<code>pattern</code> attribute': '',
+ '<code>autofocus</code> attribute': '',
+ '<code>autocomplete</code> attribute': '',
+ '<code>placeholder</code> attribute': '',
+ '<code>multiple</code> attribute': '',
+ '<code>dirName</code> attribute': '',
+ '<code>stepDown()</code> method': '',
+ '<code>stepUp()</code> method': '',
+ '<code>checkValidity</code> method': '',
+ '<code>noValidate</code> attribute': '',
+ '<code>indeterminate</code> property': '',
+ '<code>width</code> property': '',
+ '<code>height</code> property': '',
+ '<code>files</code> property': '',
+ '<code>control</code> property on labels': '',
+ '<code>form</code> property on fields': '',
+ '<code>formAction</code> property on fields': '',
+ '<code>formEnctype</code> property on fields': '',
+ '<code>formMethod</code> property on fields': '',
+ '<code>formNoValidate</code> property on fields': '',
+ '<code>formTarget</code> property on fields': '',
+ '<code>labels</code> property on fields': '',
+ '<code>:valid</code> selector': '',
+ '<code>:invalid</code> selector': '',
+ '<code>:optional</code> selector': '',
+ '<code>:required</code> selector': '',
+ '<code>:in-range</code> selector': '',
+ '<code>:out-of-range</code> selector': '',
+ '<code>:read-write</code> selector': '',
+ '<code>:read-only</code> selector': '',
+ '<code>oninput</code> event': '',
+ '<code>onchange</code> event': '',
+ '<code>oninvalid</code> event': '',
+ 'Minimal element support': '',
+ 'Custom user-interface': '',
+ 'Selection Direction': '',
+ 'Field validation': '',
+ 'Value sanitization': '',
+ 'Association of controls and forms': '',
+ 'Other attributes': '',
+ 'CSS selectors': '',
+ 'Events': '',
+ 'Form validation': '',
+
+ 'User interaction': '',
+ '<strong>Drag and drop</strong>': '<strong></strong>',
+ 'Attributes': '',
+ '<code>draggable</code> attribute': '',
+ '<code>dropzone</code> attribute': '',
+ 'Events': '',
+ '<code>ondrag</code> event': '',
+ '<code>ondragstart</code> event': '',
+ '<code>ondragenter</code> event': '',
+ '<code>ondragover</code> event': '',
+ '<code>ondragleave</code> event': '',
+ '<code>ondragend</code> event': '',
+ '<code>ondrop</code> event': '',
+ '<strong>HTML editing</strong>': '<strong></strong>',
+ 'Editing elements': '',
+ '<code>contentEditable</code> attribute': '',
+ '<code>isContentEditable</code> property': '',
+ 'Editing documents': '',
+ '<code>designMode</code> attribute': '',
+ 'APIs': '',
+ '<code>execCommand</code> method': '',
+ '<code>queryCommandEnabled</code> method': '',
+ '<code>queryCommandIndeterm</code> method': '',
+ '<code>queryCommandState</code> method': '',
+ '<code>queryCommandSupported</code> method': '',
+ '<code>queryCommandValue</code> method': '',
+ '<strong>Spellcheck</strong>': '<strong></strong>',
+ '<code>spellcheck</code> attribute': '',
+
+ 'History and navigation': '',
+ 'Session history': '',
+
+ 'Microdata': '',
+
+ 'Web applications': '',
+ 'Application Cache': '',
+ 'Custom scheme handlers': '',
+ 'Custom content handlers': '',
+ 'Custom search providers': '',
+
+ 'Security': '',
+ 'Sandboxed <code>iframe</code>': '',
+ 'Seamless <code>iframe</code>': '',
+ '<code>iframe</code> with inline contents': '',
+
+ 'Various': '',
+ 'Scoped <code>style</code> element': '',
+ 'Asyncronous script execution': '',
+ 'Runtime script error reporting': '',
+ 'Base64 encoding and decoding': '',
+
+ 'Location and Orientation': '',
+ 'Geolocation': '',
+ 'Device Orientation': '',
+
+ 'WebGL': '',
+ '3D context': '',
+ 'Native binary data': '',
+ '<code>ArrayBuffer</code>': '',
+ '<code>Int8Array</code>': '',
+ '<code>Uint8Array</code>': '',
+ '<code>Int16Array</code>': '',
+ '<code>Uint16Array</code>': '',
+ '<code>Int32Array</code>': '',
+ '<code>Uint32Array</code>': '',
+ '<code>Float32Array</code>': '',
+ '<code>Float64Array</code>': '',
+ '<code>DataView</code>': '',
+
+ 'Communication': '',
+ 'Cross-document messaging': '',
+ 'Server-Sent Events': '',
+ 'XMLHttpRequest Level 2': '',
+ 'Upload files': '',
+ 'Text response type': '',
+ 'Document response type': '',
+ 'Array buffer response type': '',
+ 'Blob response type': '',
+ 'WebSocket': '',
+
+ 'Files': '',
+ 'FileReader API': '',
+ 'FileSystem API': '',
+
+ 'Storage': '',
+ 'Session Storage': '',
+ 'Local Storage': '',
+ 'IndexedDB': '',
+ '<em>The Web SQL Database specification is no longer being updated and has been replaced by IndexedDB. Because at least 3 vendors have shipped implementations of this specification we still include it in this test.</em>': '<em></em>',
+ 'Web SQL Database': '',
+
+ 'Workers': '',
+ 'Web Workers': '',
+ 'Shared Workers': '',
+
+ 'Local multimedia': '',
+ 'Access the webcam': '',
+
+ 'Notifications': '',
+ 'Web Notifications': '',
+
+ 'Other': '',
+ 'Page Visibility': '',
+ 'Text selection': '',
+ 'Scroll into view': '',
+
+ 'Web Audio API': '',
+ 'Video and Animation': '',
+ 'Full screen support': '',
+ '<code>window.requestAnimationFrame</code>': '',
+
+
+ 'Desktop<span> browsers</span>': '电脑上的浏览器',
+ 'Tablets': '平板上的浏览器',
+ 'Mobiles': '手机上的浏览器',
+ 'Gaming': '',
+ 'Television': '',
+
+ 'first place': '冠军',
+ 'runner up': '亚军',
+ 'upcoming': '即将推出',
+
+ 'Current': '当前版本',
+ 'Development or beta': 'dev版或beta版',
+ 'Older': '旧版本',
+
+ 'Score': '',
+ 'Score (points)': '',
+ 'Bonus': '',
+ 'Timeline': '',
+ 'HTML5test.com score over the years': '',
+ 'Unreleased': '',
+ 'score-explaination': '',
+
+ 'index-intro-1': 'HTML5的测试成绩,代表了您的浏览器对即将推出的HTML5标准规范的支持程度。尽管规范尚未最终敲定,但是所有浏览器制造商都已经为浏览器的未来做好了准备。通过这个测试,可以知道您的浏览器有哪部分已经支持了HTML5。同时您还可以对比其他浏览的测试结果。',
+ 'index-intro-2': 'HTML5测试,并不试图去测试所有HTML5提供的新功能,也没有试图测试其检测每个特征的的功能。尽管有这些不足,我们仍希望通过量化的方式,提供给用户和Web开发人员一个平台,让他们知道哪款浏览器的性能是最好的。',
+ 'index-intro-3': '这个分数是通过测试HTML5的众多新的功能计算出来的,每个功能都是很宝贵的。除了使用HTML5规范和其他规范创建W3C HTML工作组,这个测试同时可以为配套的相关草案和规范要点进行打分。这些规范最初是HTML5的一部分,但是现在通过W3C HTML工作组得到了进一步的发展。由于WebGL扩展了HTML5画布元素的一个3D背景,所以没有被W3C开发,但是也是本次测试的一部分。',
+ 'index-intro-4': '对于支持音频和视频编解码器的浏览器,和支持SVG或MathML嵌入在一个普通的HTML文件的浏览器,测试还会给予奖励分数。这些测试并不计入总成绩,因为HTML5不针对任何音频或视频编解码器作硬性要求。同样,SVG和MathML也不是HTML5所必需的,规范只用于指定如何将这样的内容嵌入一个普通的HTML文件中。',
+ 'index-intro-5': '请知晓,HTML5规范仍属于开发测试阶段,在官方正式定位前可能会出现更改,未来将会增加新的测试点。虽然在现在你的成绩可以达到<span id=\'total\'>0</span>,但是这个成绩随时会改变。因为面对未来的挑战,我们仍会增加规范的内容。',
+ 'index-intro-6': 'HTML5测试,由Niels Leenheer开发。 可以在<a href="http:rakaz.nl/">rakaz.nl</a>访问我们的网站,或者在twitter上关注我。',
+
+ 'About these scores': '关于这些分数',
+
+ 'Browsers': '',
+ 'Select up to three browsers and compare their test results in detail': '',
+ 'Features': '',
+ 'Select up to three features and immediately see how well it is supported by each browser': '',
+ 'Sponsors': '',
+
+ 'Frequently asked questions': '',
+ 'Donate': '',
+
+ 'footer': 'HTML5的测试程序在<a href="http:github.com/NielsLeenheer/html5test">Github</a>上开发, 如果您发现了任何bug或者对改善HTML5有任何观点,都可以在上面进行反馈。请注意,HTML5测试与W3C或HTML5工作组并无任何关系。'
+};
View
2 translations/en/index.js
@@ -0,0 +1,2 @@
+var translation = {
+};

0 comments on commit 4f501a3

Please sign in to comment.
Something went wrong with that request. Please try again.