]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/buttons/delete-button.component.ts
Fix pagination in my videos page
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / buttons / delete-button.component.ts
index cd2bcccdf9e31163b1b2d4d6a34cff854573db41..39e31900fa3998423dba23683688bfc3b554575b 100644 (file)
@@ -1,4 +1,5 @@
-import { Component, Input } from '@angular/core'
+import { Component, Input, OnInit } from '@angular/core'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 
 @Component({
   selector: 'my-delete-button',
@@ -6,6 +7,14 @@ import { Component, Input } from '@angular/core'
   templateUrl: './delete-button.component.html'
 })
 
-export class DeleteButtonComponent {
+export class DeleteButtonComponent implements OnInit {
   @Input() label: string
+
+  title: string
+
+  constructor (private i18n: I18n) { }
+
+  ngOnInit () {
+    this.title = this.label || this.i18n('Delete')
+  }
 }