diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-04 16:21:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 08:43:01 +0200 |
commit | b1d40cff89f7cff565a98cdbcea9a624196a169a (patch) | |
tree | d24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/core/confirm | |
parent | 989e526abf0c0dd7958deb630df009608561bb67 (diff) | |
download | PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip |
Add i18n attributes
Diffstat (limited to 'client/src/app/core/confirm')
-rw-r--r-- | client/src/app/core/confirm/confirm.component.html | 2 | ||||
-rw-r--r-- | client/src/app/core/confirm/confirm.component.ts | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/core/confirm/confirm.component.html b/client/src/app/core/confirm/confirm.component.html index 01a4e0ac4..3253de4a0 100644 --- a/client/src/app/core/confirm/confirm.component.html +++ b/client/src/app/core/confirm/confirm.component.html | |||
@@ -16,7 +16,7 @@ | |||
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | <div class="form-group inputs"> | 18 | <div class="form-group inputs"> |
19 | <span class="action-button action-button-cancel" (click)="cancel()"> | 19 | <span i18n class="action-button action-button-cancel" (click)="cancel()"> |
20 | Cancel | 20 | Cancel |
21 | </span> | 21 | </span> |
22 | 22 | ||
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' | |||
3 | import { ModalDirective } from 'ngx-bootstrap/modal' | 3 | import { ModalDirective } from 'ngx-bootstrap/modal' |
4 | 4 | ||
5 | import { ConfirmService } from './confirm.service' | 5 | import { ConfirmService } from './confirm.service' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | 7 | ||
7 | @Component({ | 8 | @Component({ |
8 | selector: 'my-confirm', | 9 | selector: 'my-confirm', |
@@ -20,7 +21,10 @@ export class ConfirmComponent implements OnInit { | |||
20 | inputValue = '' | 21 | inputValue = '' |
21 | confirmButtonText = '' | 22 | confirmButtonText = '' |
22 | 23 | ||
23 | constructor (private confirmService: ConfirmService) { | 24 | constructor ( |
25 | private confirmService: ConfirmService, | ||
26 | private i18n: I18n | ||
27 | ) { | ||
24 | // Empty | 28 | // Empty |
25 | } | 29 | } |
26 | 30 | ||
@@ -38,7 +42,7 @@ export class ConfirmComponent implements OnInit { | |||
38 | this.inputLabel = inputLabel | 42 | this.inputLabel = inputLabel |
39 | this.expectedInputValue = expectedInputValue | 43 | this.expectedInputValue = expectedInputValue |
40 | 44 | ||
41 | this.confirmButtonText = confirmButtonText || 'Confirm' | 45 | this.confirmButtonText = confirmButtonText || this.i18n('Confirm') |
42 | 46 | ||
43 | this.showModal() | 47 | this.showModal() |
44 | } | 48 | } |