diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-01-29 14:36:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 14:36:21 +0100 |
commit | 68018040f2ec0a7c89ca5c8490b4b74d11cc07f7 (patch) | |
tree | d148c789e84319279134775062931b194fe4dd13 /client/src/app/shared/shared-video-miniature | |
parent | d0dd9813d563ecd3f7ec6342d922a1534e182bd8 (diff) | |
download | PeerTube-68018040f2ec0a7c89ca5c8490b4b74d11cc07f7.tar.gz PeerTube-68018040f2ec0a7c89ca5c8490b4b74d11cc07f7.tar.zst PeerTube-68018040f2ec0a7c89ca5c8490b4b74d11cc07f7.zip |
localize decimal separator in video miniatures (#3643)
* fix(client): localize decimal separator
* fix(client/numpipe): handle Intl failure gently
* Revert "fix(client/numpipe): handle Intl failure gently"
This reverts commit e275049f1fabb0a7af5a274ebfc33f9c3fb279ed.
* client: switch from Intl to ng formatNumber
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-download.component.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts index 99838f712..70b27b105 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { mapValues, pick } from 'lodash-es' | 1 | import { mapValues, pick } from 'lodash-es' |
2 | import { Component, ElementRef, ViewChild } from '@angular/core' | 2 | import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { VideoCaption, VideoFile, VideoPrivacy } from '@shared/models' | 5 | import { VideoCaption, VideoFile, VideoPrivacy } from '@shared/models' |
@@ -34,13 +34,14 @@ export class VideoDownloadComponent { | |||
34 | private numbersPipe: NumberFormatterPipe | 34 | private numbersPipe: NumberFormatterPipe |
35 | 35 | ||
36 | constructor ( | 36 | constructor ( |
37 | @Inject(LOCALE_ID) private localeId: string, | ||
37 | private notifier: Notifier, | 38 | private notifier: Notifier, |
38 | private modalService: NgbModal, | 39 | private modalService: NgbModal, |
39 | private videoService: VideoService, | 40 | private videoService: VideoService, |
40 | private auth: AuthService | 41 | private auth: AuthService |
41 | ) { | 42 | ) { |
42 | this.bytesPipe = new BytesPipe() | 43 | this.bytesPipe = new BytesPipe() |
43 | this.numbersPipe = new NumberFormatterPipe() | 44 | this.numbersPipe = new NumberFormatterPipe(this.localeId) |
44 | } | 45 | } |
45 | 46 | ||
46 | get typeText () { | 47 | get typeText () { |