]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix Delete title button
authorChocobozzz <me@florianbigard.com>
Wed, 3 Oct 2018 08:02:55 +0000 (10:02 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 3 Oct 2018 08:02:55 +0000 (10:02 +0200)
client/src/app/shared/buttons/delete-button.component.html
client/src/app/shared/buttons/delete-button.component.ts
client/src/app/shared/buttons/edit-button.component.html

index 7924902193857184e330be37b27589ff9103a6dc..6c55d810493538c46fc9578f4e40469ddd13e2bf 100644 (file)
@@ -1,4 +1,4 @@
-<span class="action-button action-button-delete" [title]="label" role="button">
+<span class="action-button action-button-delete" [title]="getTitle()" role="button">
   <span class="icon icon-delete-grey"></span>
 
   <span class="button-label" *ngIf="label">{{ label }}</span>
index cd2bcccdf9e31163b1b2d4d6a34cff854573db41..8e285d98282616e398504245c6e63bacc71338f5 100644 (file)
@@ -1,4 +1,5 @@
 import { Component, Input } from '@angular/core'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 
 @Component({
   selector: 'my-delete-button',
@@ -8,4 +9,10 @@ import { Component, Input } from '@angular/core'
 
 export class DeleteButtonComponent {
   @Input() label: string
+
+  constructor (private i18n: I18n) { }
+
+  getTitle () {
+    return this.label || this.i18n('Delete')
+  }
 }
index 7efc54ce72a9bd6a6e375bb44363c575fdadebbb..cecb780f384e1292de1f6f5e5a74ad70397b0228 100644 (file)
@@ -1,4 +1,4 @@
-<a class="action-button action-button-edit" [routerLink]="routerLink" title="Edit">
+<a class="action-button action-button-edit" [routerLink]="routerLink" i18n-title title="Edit">
   <span class="icon icon-edit"></span>
 
   <span class="button-label" *ngIf="label">{{ label }}</span>