aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-instance
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-06 14:32:47 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 09:49:06 +0200
commit866c5f667da9fc09f3b093ff0a6f89d4af0ce5af (patch)
tree7a42f7974cec400f9cf09e86de00e69e36b2136d /client/src/app/shared/shared-instance
parent40346ead2b0b7afa475aef057d3673b6c7574b7a (diff)
downloadPeerTube-866c5f667da9fc09f3b093ff0a6f89d4af0ce5af.tar.gz
PeerTube-866c5f667da9fc09f3b093ff0a6f89d4af0ce5af.tar.zst
PeerTube-866c5f667da9fc09f3b093ff0a6f89d4af0ce5af.zip
Simplify ICU in components
Diffstat (limited to 'client/src/app/shared/shared-instance')
-rw-r--r--client/src/app/shared/shared-instance/instance-features-table.component.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts
index 2e63f6c17..ab1b1458a 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.ts
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts
@@ -1,6 +1,6 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ServerService } from '@app/core' 2import { ServerService } from '@app/core'
3import { prepareIcu } from '@app/helpers' 3import { formatICU } from '@app/helpers'
4import { ServerConfig } from '@shared/models' 4import { ServerConfig } from '@shared/models'
5 5
6@Component({ 6@Component({
@@ -71,17 +71,17 @@ export class InstanceFeaturesTableComponent implements OnInit {
71 const hours = Math.floor(seconds / 3600) 71 const hours = Math.floor(seconds / 3600)
72 72
73 if (hours !== 0) { 73 if (hours !== 0) {
74 return prepareIcu($localize`~ {hours, plural, =1 {1 hour} other {{hours} hours}}`)( 74 return formatICU(
75 { hours }, 75 $localize`~ {hours, plural, =1 {1 hour} other {{hours} hours}}`,
76 $localize`~ ${hours} hours` 76 { hours }
77 ) 77 )
78 } 78 }
79 79
80 const minutes = Math.floor(seconds % 3600 / 60) 80 const minutes = Math.floor(seconds % 3600 / 60)
81 81
82 return prepareIcu($localize`~ {minutes, plural, =1 {1 minute} other {{minutes} minutes}}`)( 82 return formatICU(
83 { minutes }, 83 $localize`~ {minutes, plural, =1 {1 minute} other {{minutes} minutes}}`,
84 $localize`~ ${minutes} minutes` 84 { minutes }
85 ) 85 )
86 } 86 }
87 87