vidply 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -24
- package/dist/vidply.esm.js +235 -182
- package/dist/vidply.esm.js.map +3 -3
- package/dist/vidply.esm.min.js +3 -3
- package/dist/vidply.esm.min.meta.json +27 -21
- package/dist/vidply.js +235 -182
- package/dist/vidply.js.map +3 -3
- package/dist/vidply.min.js +3 -3
- package/dist/vidply.min.meta.json +27 -21
- package/package.json +57 -57
- package/src/controls/ControlBar.js +2026 -2026
- package/src/i18n/translations.js +50 -0
- package/src/utils/TimeUtils.js +9 -4
package/src/i18n/translations.js
CHANGED
|
@@ -101,6 +101,16 @@ export const translations = {
|
|
|
101
101
|
},
|
|
102
102
|
speeds: {
|
|
103
103
|
normal: 'Normal'
|
|
104
|
+
},
|
|
105
|
+
time: {
|
|
106
|
+
display: 'Time display',
|
|
107
|
+
durationPrefix: 'Duration: ',
|
|
108
|
+
hour: '{count} hour',
|
|
109
|
+
hours: '{count} hours',
|
|
110
|
+
minute: '{count} minute',
|
|
111
|
+
minutes: '{count} minutes',
|
|
112
|
+
second: '{count} second',
|
|
113
|
+
seconds: '{count} seconds'
|
|
104
114
|
}
|
|
105
115
|
},
|
|
106
116
|
|
|
@@ -202,6 +212,16 @@ export const translations = {
|
|
|
202
212
|
},
|
|
203
213
|
speeds: {
|
|
204
214
|
normal: 'Normal'
|
|
215
|
+
},
|
|
216
|
+
time: {
|
|
217
|
+
display: 'Zeitanzeige',
|
|
218
|
+
durationPrefix: 'Dauer: ',
|
|
219
|
+
hour: '{count} Stunde',
|
|
220
|
+
hours: '{count} Stunden',
|
|
221
|
+
minute: '{count} Minute',
|
|
222
|
+
minutes: '{count} Minuten',
|
|
223
|
+
second: '{count} Sekunde',
|
|
224
|
+
seconds: '{count} Sekunden'
|
|
205
225
|
}
|
|
206
226
|
},
|
|
207
227
|
|
|
@@ -303,6 +323,16 @@ export const translations = {
|
|
|
303
323
|
},
|
|
304
324
|
speeds: {
|
|
305
325
|
normal: 'Normal'
|
|
326
|
+
},
|
|
327
|
+
time: {
|
|
328
|
+
display: 'Visualización de tiempo',
|
|
329
|
+
durationPrefix: 'Duración: ',
|
|
330
|
+
hour: '{count} hora',
|
|
331
|
+
hours: '{count} horas',
|
|
332
|
+
minute: '{count} minuto',
|
|
333
|
+
minutes: '{count} minutos',
|
|
334
|
+
second: '{count} segundo',
|
|
335
|
+
seconds: '{count} segundos'
|
|
306
336
|
}
|
|
307
337
|
},
|
|
308
338
|
|
|
@@ -404,6 +434,16 @@ export const translations = {
|
|
|
404
434
|
},
|
|
405
435
|
speeds: {
|
|
406
436
|
normal: 'Normal'
|
|
437
|
+
},
|
|
438
|
+
time: {
|
|
439
|
+
display: 'Affichage du temps',
|
|
440
|
+
durationPrefix: 'Durée : ',
|
|
441
|
+
hour: '{count} heure',
|
|
442
|
+
hours: '{count} heures',
|
|
443
|
+
minute: '{count} minute',
|
|
444
|
+
minutes: '{count} minutes',
|
|
445
|
+
second: '{count} seconde',
|
|
446
|
+
seconds: '{count} secondes'
|
|
407
447
|
}
|
|
408
448
|
},
|
|
409
449
|
|
|
@@ -505,6 +545,16 @@ export const translations = {
|
|
|
505
545
|
},
|
|
506
546
|
speeds: {
|
|
507
547
|
normal: '通常'
|
|
548
|
+
},
|
|
549
|
+
time: {
|
|
550
|
+
display: '時間表示',
|
|
551
|
+
durationPrefix: '再生時間: ',
|
|
552
|
+
hour: '{count}時間',
|
|
553
|
+
hours: '{count}時間',
|
|
554
|
+
minute: '{count}分',
|
|
555
|
+
minutes: '{count}分',
|
|
556
|
+
second: '{count}秒',
|
|
557
|
+
seconds: '{count}秒'
|
|
508
558
|
}
|
|
509
559
|
}
|
|
510
560
|
};
|
package/src/utils/TimeUtils.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Time formatting and conversion utilities
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import {i18n} from '../i18n/i18n.js';
|
|
6
|
+
|
|
5
7
|
export const TimeUtils = {
|
|
6
8
|
/**
|
|
7
9
|
* Format seconds to time string (HH:MM:SS or MM:SS)
|
|
@@ -49,7 +51,7 @@ export const TimeUtils = {
|
|
|
49
51
|
*/
|
|
50
52
|
formatDuration(seconds) {
|
|
51
53
|
if (!isFinite(seconds) || seconds < 0) {
|
|
52
|
-
return '0
|
|
54
|
+
return i18n.t('time.seconds', { count: 0 });
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
const hours = Math.floor(seconds / 3600);
|
|
@@ -59,13 +61,16 @@ export const TimeUtils = {
|
|
|
59
61
|
const parts = [];
|
|
60
62
|
|
|
61
63
|
if (hours > 0) {
|
|
62
|
-
|
|
64
|
+
const key = hours === 1 ? 'time.hour' : 'time.hours';
|
|
65
|
+
parts.push(i18n.t(key, { count: hours }));
|
|
63
66
|
}
|
|
64
67
|
if (minutes > 0) {
|
|
65
|
-
|
|
68
|
+
const key = minutes === 1 ? 'time.minute' : 'time.minutes';
|
|
69
|
+
parts.push(i18n.t(key, { count: minutes }));
|
|
66
70
|
}
|
|
67
71
|
if (secs > 0 || parts.length === 0) {
|
|
68
|
-
|
|
72
|
+
const key = secs === 1 ? 'time.second' : 'time.seconds';
|
|
73
|
+
parts.push(i18n.t(key, { count: secs }));
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
return parts.join(', ');
|