aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-05 09:13:26 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 09:13:26 +0200
commit25acef90a85c1584880dec96aa402f896af8364a (patch)
tree5e62e68c2e32a94a289ebd77f0610ed5a085a142 /client/src/app/shared/misc
parent632f9815c6ab87fce3f3f7399cef9f7679fde908 (diff)
downloadPeerTube-25acef90a85c1584880dec96aa402f896af8364a.tar.gz
PeerTube-25acef90a85c1584880dec96aa402f896af8364a.tar.zst
PeerTube-25acef90a85c1584880dec96aa402f896af8364a.zip
Fix i18n in components
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r--client/src/app/shared/misc/from-now.pipe.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/client/src/app/shared/misc/from-now.pipe.ts b/client/src/app/shared/misc/from-now.pipe.ts
index 3a64a4077..33e6d25fe 100644
--- a/client/src/app/shared/misc/from-now.pipe.ts
+++ b/client/src/app/shared/misc/from-now.pipe.ts
@@ -12,28 +12,28 @@ export class FromNowPipe implements PipeTransform {
12 12
13 let interval = Math.floor(seconds / 31536000) 13 let interval = Math.floor(seconds / 31536000)
14 if (interval > 1) { 14 if (interval > 1) {
15 return this.i18n('{{ interval }} years ago', { interval }) 15 return this.i18n('{{interval}} years ago', { interval })
16 } 16 }
17 17
18 interval = Math.floor(seconds / 2592000) 18 interval = Math.floor(seconds / 2592000)
19 if (interval > 1) return this.i18n('{{ interval }} months ago', { interval }) 19 if (interval > 1) return this.i18n('{{interval}} months ago', { interval })
20 if (interval === 1) return this.i18n('{{ interval }} month ago', { interval }) 20 if (interval === 1) return this.i18n('{{interval}} month ago', { interval })
21 21
22 interval = Math.floor(seconds / 604800) 22 interval = Math.floor(seconds / 604800)
23 if (interval > 1) return this.i18n('{{ interval }} weeks ago', { interval }) 23 if (interval > 1) return this.i18n('{{interval}} weeks ago', { interval })
24 if (interval === 1) return this.i18n('{{ interval }} week ago', { interval }) 24 if (interval === 1) return this.i18n('{{interval}} week ago', { interval })
25 25
26 interval = Math.floor(seconds / 86400) 26 interval = Math.floor(seconds / 86400)
27 if (interval > 1) return this.i18n('{{ interval }} days ago', { interval }) 27 if (interval > 1) return this.i18n('{{interval}} days ago', { interval })
28 if (interval === 1) return this.i18n('{{ interval }} day ago', { interval }) 28 if (interval === 1) return this.i18n('{{interval}} day ago', { interval })
29 29
30 interval = Math.floor(seconds / 3600) 30 interval = Math.floor(seconds / 3600)
31 if (interval > 1) return this.i18n('{{ interval }} hours ago', { interval }) 31 if (interval > 1) return this.i18n('{{interval}} hours ago', { interval })
32 if (interval === 1) return this.i18n('{{ interval }} hour ago', { interval }) 32 if (interval === 1) return this.i18n('{{interval}} hour ago', { interval })
33 33
34 interval = Math.floor(seconds / 60) 34 interval = Math.floor(seconds / 60)
35 if (interval >= 1) return this.i18n('{{ interval }} min ago', { interval }) 35 if (interval >= 1) return this.i18n('{{interval}} min ago', { interval })
36 36
37 return this.i18n('{{ interval }} sec ago', { interval: Math.floor(seconds) }) 37 return this.i18n('{{interval}} sec ago', { interval: Math.floor(seconds) })
38 } 38 }
39} 39}