1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<script>
import { s__, n__, sprintf, formatNumber } from '~/locale';
export default {
props: {
stageCount: {
type: Number,
required: false,
default: null,
},
},
computed: {
formattedStageCount() {
if (!this.stageCount) {
return '-';
} else if (this.stageCount > 1000) {
return sprintf(s__('ValueStreamAnalytics|%{stageCount}+ items'), {
stageCount: formatNumber(1000),
});
}
return sprintf(n__('%{count} item', '%{count} items', this.stageCount), {
count: formatNumber(this.stageCount),
});
},
},
};
</script>
<template>
<span>{{ formattedStageCount }}</span>
</template>
|