-<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>
import { Component, Input } from '@angular/core'
+import { I18n } from '@ngx-translate/i18n-polyfill'
@Component({
selector: 'my-delete-button',
export class DeleteButtonComponent {
@Input() label: string
+
+ constructor (private i18n: I18n) { }
+
+ getTitle () {
+ return this.label || this.i18n('Delete')
+ }
}
-<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>