From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- client/src/app/core/confirm/confirm.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'client/src/app/core/confirm/confirm.component.ts') diff --git a/client/src/app/core/confirm/confirm.component.ts b/client/src/app/core/confirm/confirm.component.ts index 147bc9d65..02b38489a 100644 --- a/client/src/app/core/confirm/confirm.component.ts +++ b/client/src/app/core/confirm/confirm.component.ts @@ -3,6 +3,7 @@ import { Component, HostListener, OnInit, ViewChild } from '@angular/core' import { ModalDirective } from 'ngx-bootstrap/modal' import { ConfirmService } from './confirm.service' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-confirm', @@ -20,7 +21,10 @@ export class ConfirmComponent implements OnInit { inputValue = '' confirmButtonText = '' - constructor (private confirmService: ConfirmService) { + constructor ( + private confirmService: ConfirmService, + private i18n: I18n + ) { // Empty } @@ -38,7 +42,7 @@ export class ConfirmComponent implements OnInit { this.inputLabel = inputLabel this.expectedInputValue = expectedInputValue - this.confirmButtonText = confirmButtonText || 'Confirm' + this.confirmButtonText = confirmButtonText || this.i18n('Confirm') this.showModal() } -- cgit v1.2.3