mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-08 20:22:45 +01:00
updated availableLanguages and localized progress percentage. fixes #747
This commit is contained in:
parent
1c5e47b4c4
commit
deb177c6bb
@ -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>
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user