mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Uses now proper toLocaleString function
This commit is contained in:
parent
66f33b368b
commit
df39a9a1ff
9 changed files with 22 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
import globalize from './globalize';
|
||||
import globalize, { getCurrentDateTimeLocale } from './globalize';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -84,7 +84,7 @@ import globalize from './globalize';
|
|||
hours = Math.floor(hours);
|
||||
|
||||
if (hours) {
|
||||
parts.push(hours.toLocaleString());
|
||||
parts.push(toLocaleString(hours));
|
||||
}
|
||||
|
||||
ticks -= (hours * ticksPerHour);
|
||||
|
@ -95,9 +95,9 @@ import globalize from './globalize';
|
|||
ticks -= (minutes * ticksPerMinute);
|
||||
|
||||
if (minutes < 10 && hours) {
|
||||
minutes = (0).toLocaleString() + minutes.toLocaleString();
|
||||
minutes = toLocaleString(0) + toLocaleString(minutes);
|
||||
} else {
|
||||
minutes = minutes.toLocaleString();
|
||||
minutes = toLocaleString(minutes);
|
||||
}
|
||||
parts.push(minutes);
|
||||
|
||||
|
@ -105,9 +105,9 @@ import globalize from './globalize';
|
|||
seconds = Math.floor(seconds);
|
||||
|
||||
if (seconds < 10) {
|
||||
seconds = (0).toLocaleString() + seconds.toLocaleString();
|
||||
seconds = toLocaleString(0) + toLocaleString(seconds);
|
||||
} else {
|
||||
seconds = seconds.toLocaleString();
|
||||
seconds = toLocaleString(seconds);
|
||||
}
|
||||
parts.push(seconds);
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ import { currentSettings as userSettings } from './settings/userSettings';
|
|||
export function translate(key) {
|
||||
let val = translateKey(key);
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
val = replaceAll(val, '{' + (i - 1) + '}', arguments[i]);
|
||||
val = replaceAll(val, '{' + (i - 1) + '}', arguments[i].toLocaleString(currentCulture));
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ export function getQueryPagingHtml (options) {
|
|||
|
||||
if (showControls) {
|
||||
html += '<span style="vertical-align:middle;">';
|
||||
html += globalize.translate('ListPaging', (totalRecordCount ? startIndex + 1 : 0).toLocaleString(), recordsEnd.toLocaleString(), totalRecordCount.toLocaleString());
|
||||
html += globalize.translate('ListPaging', totalRecordCount ? startIndex + 1 : 0, recordsEnd, totalRecordCount);
|
||||
html += '</span>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue