1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fixed emby-progressring Localization

This commit is contained in:
Hadi Charara 2022-07-03 13:40:58 -04:00
parent 10432a038a
commit d7e25bab12

View file

@ -1,6 +1,7 @@
import './emby-progressring.scss';
import 'webcomponents.js/webcomponents-lite';
import template from './emby-progressring.template.html';
import { getCurrentDateTimeLocale } from '../../scripts/globalize';
/* eslint-disable indent */
@ -8,6 +9,7 @@ import template from './emby-progressring.template.html';
EmbyProgressRing.createdCallback = function () {
this.classList.add('progressring');
this.setAttribute('dir', 'ltr');
const instance = this;
instance.innerHTML = template;
@ -70,7 +72,10 @@ import template from './emby-progressring.template.html';
this.querySelector('.animate-75-100-b').style.transform = 'rotate(' + angle + 'deg)';
}
this.querySelector('.progressring-text').innerHTML = progress + '%';
this.querySelector('.progressring-text').innerHTML = new Intl.NumberFormat(getCurrentDateTimeLocale(), {
style: 'percent',
maximumFractionDigits: 0
}).format(progress / 100);
};
EmbyProgressRing.attachedCallback = function () {