updated availableLanguages and localized progress percentage. fixes #747

This commit is contained in:
Danny Coates 2018-02-07 12:09:23 -08:00
parent 1c5e47b4c4
commit deb177c6bb
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
const html = require('choo/html');
const percent = require('../utils').percent;
const radius = 73;
const oRadius = radius + 10;
@ -7,7 +8,7 @@ const circumference = 2 * Math.PI * radius;
module.exports = function(progressRatio) {
const dashOffset = (1 - progressRatio) * circumference;
const percent = Math.floor(progressRatio * 100);
const percentComplete = percent(progressRatio);
const div = html`
<div class="progress-bar">
<svg
@ -31,8 +32,7 @@ module.exports = function(progressRatio) {
stroke-dasharray="${circumference}"
stroke-dashoffset="${dashOffset}"/>
<text class="percentage" text-anchor="middle" x="50%" y="98">
<tspan class="percent-number">${percent}</tspan>
<tspan class="percent-sign">%</tspan>
<tspan class="percent-number">${percentComplete}</tspan>
</text>
</svg>
</div>

View File

@ -111,6 +111,7 @@
},
"availableLanguages": [
"en-US",
"ar",
"ast",
"az",
"bs",
@ -131,6 +132,7 @@
"fy-NL",
"hsb",
"hu",
"ia",
"id",
"it",
"ja",
@ -143,9 +145,11 @@
"nn-NO",
"pt-BR",
"pt-PT",
"ro",
"ru",
"sk",
"sl",
"sq",
"sr",
"sv-SE",
"tl",