From 60709df53602def422e8c32509c27c65b52cb1bd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Oct 2018 10:02:55 +0200 Subject: Fix Delete title button --- client/src/app/shared/buttons/delete-button.component.html | 2 +- client/src/app/shared/buttons/delete-button.component.ts | 7 +++++++ client/src/app/shared/buttons/edit-button.component.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/src/app/shared/buttons/delete-button.component.html b/client/src/app/shared/buttons/delete-button.component.html index 792490219..6c55d8104 100644 --- a/client/src/app/shared/buttons/delete-button.component.html +++ b/client/src/app/shared/buttons/delete-button.component.html @@ -1,4 +1,4 @@ - + {{ label }} diff --git a/client/src/app/shared/buttons/delete-button.component.ts b/client/src/app/shared/buttons/delete-button.component.ts index cd2bcccdf..8e285d982 100644 --- a/client/src/app/shared/buttons/delete-button.component.ts +++ b/client/src/app/shared/buttons/delete-button.component.ts @@ -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') + } } diff --git a/client/src/app/shared/buttons/edit-button.component.html b/client/src/app/shared/buttons/edit-button.component.html index 7efc54ce7..cecb780f3 100644 --- a/client/src/app/shared/buttons/edit-button.component.html +++ b/client/src/app/shared/buttons/edit-button.component.html @@ -1,4 +1,4 @@ - + {{ label }} -- cgit v1.2.3