Skip to content

Commit cec2d36

Browse files
Properly localize playlist view and video counts (#4620)
1 parent 6a877fd commit cec2d36

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/renderer/components/playlist-info/playlist-info.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
66
import FtInput from '../ft-input/ft-input.vue'
77
import FtPrompt from '../ft-prompt/ft-prompt.vue'
88
import {
9+
formatNumber,
910
showToast,
1011
} from '../../helpers/utils'
1112

@@ -145,6 +146,14 @@ export default defineComponent({
145146
return this.firstVideoId !== ''
146147
},
147148

149+
parsedViewCount() {
150+
return formatNumber(this.viewCount)
151+
},
152+
153+
parsedVideoCount() {
154+
return formatNumber(this.videoCount)
155+
},
156+
148157
thumbnail: function () {
149158
if (this.thumbnailPreference === 'hidden' || !this.firstVideoIdExists) {
150159
return require('../../assets/img/thumbnail_placeholder.svg')

src/renderer/components/playlist-info/playlist-info.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
{{ title }}
4848
</h2>
4949
<p>
50-
{{ videoCount }} {{ $t("Playlist.Videos") }}
50+
{{ $tc('Global.Counts.Video Count', videoCount, {count: parsedVideoCount}) }}
5151
<span v-if="!hideViews && !isUserPlaylist">
52-
- {{ viewCount }} {{ $t("Playlist.Views") }}
52+
- {{ $tc('Global.Counts.View Count', viewCount, {count: parsedViewCount}) }}
5353
</span>
5454
<span>- </span>
5555
<span v-if="infoSource !== 'local'">

0 commit comments

Comments
 (0)