aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/modal
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-04 16:21:17 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 08:43:01 +0200
commitb1d40cff89f7cff565a98cdbcea9a624196a169a (patch)
treed24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/videos/+video-watch/modal
parent989e526abf0c0dd7958deb630df009608561bb67 (diff)
downloadPeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip
Add i18n attributes
Diffstat (limited to 'client/src/app/videos/+video-watch/modal')
-rw-r--r--client/src/app/videos/+video-watch/modal/video-download.component.html10
-rw-r--r--client/src/app/videos/+video-watch/modal/video-report.component.html8
-rw-r--r--client/src/app/videos/+video-watch/modal/video-report.component.ts10
-rw-r--r--client/src/app/videos/+video-watch/modal/video-share.component.html10
-rw-r--r--client/src/app/videos/+video-watch/modal/video-share.component.ts8
-rw-r--r--client/src/app/videos/+video-watch/modal/video-support.component.html4
6 files changed, 28 insertions, 22 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-download.component.html b/client/src/app/videos/+video-watch/modal/video-download.component.html
index 617892b11..d30a49345 100644
--- a/client/src/app/videos/+video-watch/modal/video-download.component.html
+++ b/client/src/app/videos/+video-watch/modal/video-download.component.html
@@ -4,7 +4,7 @@
4 4
5 <div class="modal-header"> 5 <div class="modal-header">
6 <span class="close" aria-hidden="true" (click)="hide()"></span> 6 <span class="close" aria-hidden="true" (click)="hide()"></span>
7 <h4 class="modal-title">Download video</h4> 7 <h4 i18n class="modal-title">Download video</h4>
8 </div> 8 </div>
9 9
10 <div class="modal-body"> 10 <div class="modal-body">
@@ -17,22 +17,22 @@
17 <div class="download-type"> 17 <div class="download-type">
18 <div class="peertube-radio-container"> 18 <div class="peertube-radio-container">
19 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent"> 19 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent">
20 <label for="download-torrent">Torrent</label> 20 <label i18n for="download-torrent">Torrent</label>
21 </div> 21 </div>
22 22
23 <div class="peertube-radio-container"> 23 <div class="peertube-radio-container">
24 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct"> 24 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct">
25 <label for="download-direct">Direct download</label> 25 <label i18n for="download-direct">Direct download</label>
26 </div> 26 </div>
27 </div> 27 </div>
28 28
29 <div class="form-group inputs"> 29 <div class="form-group inputs">
30 <span class="action-button action-button-cancel" (click)="hide()"> 30 <span i18n class="action-button action-button-cancel" (click)="hide()">
31 Cancel 31 Cancel
32 </span> 32 </span>
33 33
34 <input 34 <input
35 type="submit" value="Download" class="action-button-submit" 35 type="submit" i18n-value value="Download" class="action-button-submit"
36 (click)="download()" 36 (click)="download()"
37 > 37 >
38 </div> 38 </div>
diff --git a/client/src/app/videos/+video-watch/modal/video-report.component.html b/client/src/app/videos/+video-watch/modal/video-report.component.html
index a9a7beb48..4ee3721fb 100644
--- a/client/src/app/videos/+video-watch/modal/video-report.component.html
+++ b/client/src/app/videos/+video-watch/modal/video-report.component.html
@@ -4,14 +4,14 @@
4 4
5 <div class="modal-header"> 5 <div class="modal-header">
6 <span class="close" aria-hidden="true" (click)="hide()"></span> 6 <span class="close" aria-hidden="true" (click)="hide()"></span>
7 <h4 class="modal-title">Report video</h4> 7 <h4 i18n class="modal-title">Report video</h4>
8 </div> 8 </div>
9 9
10 <div class="modal-body"> 10 <div class="modal-body">
11 11
12 <form novalidate [formGroup]="form" (ngSubmit)="report()"> 12 <form novalidate [formGroup]="form" (ngSubmit)="report()">
13 <div class="form-group"> 13 <div class="form-group">
14 <textarea placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }"> 14 <textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }">
15 </textarea> 15 </textarea>
16 <div *ngIf="formErrors.reason" class="form-error"> 16 <div *ngIf="formErrors.reason" class="form-error">
17 {{ formErrors.reason }} 17 {{ formErrors.reason }}
@@ -19,12 +19,12 @@
19 </div> 19 </div>
20 20
21 <div class="form-group inputs"> 21 <div class="form-group inputs">
22 <span class="action-button action-button-cancel" (click)="hide()"> 22 <span i18n class="action-button action-button-cancel" (click)="hide()">
23 Cancel 23 Cancel
24 </span> 24 </span>
25 25
26 <input 26 <input
27 type="submit" value="Submit" class="action-button-submit" 27 type="submit" i18n-value value="Submit" class="action-button-submit"
28 [disabled]="!form.valid" 28 [disabled]="!form.valid"
29 > 29 >
30 </div> 30 </div>
diff --git a/client/src/app/videos/+video-watch/modal/video-report.component.ts b/client/src/app/videos/+video-watch/modal/video-report.component.ts
index 050e827e7..1bbd30226 100644
--- a/client/src/app/videos/+video-watch/modal/video-report.component.ts
+++ b/client/src/app/videos/+video-watch/modal/video-report.component.ts
@@ -4,6 +4,7 @@ import { NotificationsService } from 'angular2-notifications'
4import { ModalDirective } from 'ngx-bootstrap/modal' 4import { ModalDirective } from 'ngx-bootstrap/modal'
5import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' 5import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index'
6import { VideoDetails } from '../../../shared/video/video-details.model' 6import { VideoDetails } from '../../../shared/video/video-details.model'
7import { I18n } from '@ngx-translate/i18n-polyfill'
7 8
8@Component({ 9@Component({
9 selector: 'my-video-report', 10 selector: 'my-video-report',
@@ -27,8 +28,9 @@ export class VideoReportComponent extends FormReactive implements OnInit {
27 constructor ( 28 constructor (
28 private formBuilder: FormBuilder, 29 private formBuilder: FormBuilder,
29 private videoAbuseService: VideoAbuseService, 30 private videoAbuseService: VideoAbuseService,
30 private notificationsService: NotificationsService 31 private notificationsService: NotificationsService,
31 ) { 32 private i18n: I18n
33 ) {
32 super() 34 super()
33 } 35 }
34 36
@@ -58,11 +60,11 @@ export class VideoReportComponent extends FormReactive implements OnInit {
58 this.videoAbuseService.reportVideo(this.video.id, reason) 60 this.videoAbuseService.reportVideo(this.video.id, reason)
59 .subscribe( 61 .subscribe(
60 () => { 62 () => {
61 this.notificationsService.success('Success', 'Video reported.') 63 this.notificationsService.success(this.i18n('Success'), this.i18n('Video reported.'))
62 this.hide() 64 this.hide()
63 }, 65 },
64 66
65 err => this.notificationsService.error('Error', err.message) 67 err => this.notificationsService.error(this.i18n('Error'), err.message)
66 ) 68 )
67 } 69 }
68} 70}
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.html b/client/src/app/videos/+video-watch/modal/video-share.component.html
index 85cf10a6c..26ab5144a 100644
--- a/client/src/app/videos/+video-watch/modal/video-share.component.html
+++ b/client/src/app/videos/+video-watch/modal/video-share.component.html
@@ -4,12 +4,12 @@
4 4
5 <div class="modal-header"> 5 <div class="modal-header">
6 <span class="close" aria-hidden="true" (click)="hide()"></span> 6 <span class="close" aria-hidden="true" (click)="hide()"></span>
7 <h4 class="modal-title">Share</h4> 7 <h4 i18n class="modal-title">Share</h4>
8 </div> 8 </div>
9 9
10 <div class="modal-body"> 10 <div class="modal-body">
11 <div class="form-group"> 11 <div class="form-group">
12 <label>URL</label> 12 <label i18n>URL</label>
13 <div class="input-group input-group-sm"> 13 <div class="input-group input-group-sm">
14 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoUrl()" /> 14 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoUrl()" />
15 <div class="input-group-btn" placement="bottom right"> 15 <div class="input-group-btn" placement="bottom right">
@@ -21,7 +21,7 @@
21 </div> 21 </div>
22 22
23 <div class="form-group"> 23 <div class="form-group">
24 <label>Embed</label> 24 <label i18n>Embed</label>
25 <div class="input-group input-group-sm"> 25 <div class="input-group input-group-sm">
26 <input #shareInput (click)="shareInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoIframeCode()" /> 26 <input #shareInput (click)="shareInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoIframeCode()" />
27 <div class="input-group-btn" placement="bottom right"> 27 <div class="input-group-btn" placement="bottom right">
@@ -32,12 +32,12 @@
32 </div> 32 </div>
33 </div> 33 </div>
34 34
35 <div *ngIf="notSecure()" class="alert alert-warning"> 35 <div i18n *ngIf="notSecure()" class="alert alert-warning">
36 The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites). 36 The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites).
37 </div> 37 </div>
38 38
39 <div class="form-group inputs"> 39 <div class="form-group inputs">
40 <span class="action-button action-button-cancel" (click)="hide()"> 40 <span i18n class="action-button action-button-cancel" (click)="hide()">
41 Cancel 41 Cancel
42 </span> 42 </span>
43 </div> 43 </div>
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.ts b/client/src/app/videos/+video-watch/modal/video-share.component.ts
index 33998c5d8..5c988a43b 100644
--- a/client/src/app/videos/+video-watch/modal/video-share.component.ts
+++ b/client/src/app/videos/+video-watch/modal/video-share.component.ts
@@ -5,6 +5,7 @@ import { NotificationsService } from 'angular2-notifications'
5import { ModalDirective } from 'ngx-bootstrap/modal' 5import { ModalDirective } from 'ngx-bootstrap/modal'
6import { VideoDetails } from '../../../shared/video/video-details.model' 6import { VideoDetails } from '../../../shared/video/video-details.model'
7import { buildVideoEmbed } from '../../../../assets/player/utils' 7import { buildVideoEmbed } from '../../../../assets/player/utils'
8import { I18n } from '@ngx-translate/i18n-polyfill'
8 9
9@Component({ 10@Component({
10 selector: 'my-video-share', 11 selector: 'my-video-share',
@@ -16,7 +17,10 @@ export class VideoShareComponent {
16 17
17 @ViewChild('modal') modal: ModalDirective 18 @ViewChild('modal') modal: ModalDirective
18 19
19 constructor (private notificationsService: NotificationsService) { 20 constructor (
21 private notificationsService: NotificationsService,
22 private i18n: I18n
23 ) {
20 // empty 24 // empty
21 } 25 }
22 26
@@ -41,6 +45,6 @@ export class VideoShareComponent {
41 } 45 }
42 46
43 activateCopiedMessage () { 47 activateCopiedMessage () {
44 this.notificationsService.success('Success', 'Copied') 48 this.notificationsService.success(this.i18n('Success'), this.i18n('Copied'))
45 } 49 }
46} 50}
diff --git a/client/src/app/videos/+video-watch/modal/video-support.component.html b/client/src/app/videos/+video-watch/modal/video-support.component.html
index 16ad9502a..9bcfcea47 100644
--- a/client/src/app/videos/+video-watch/modal/video-support.component.html
+++ b/client/src/app/videos/+video-watch/modal/video-support.component.html
@@ -4,7 +4,7 @@
4 4
5 <div class="modal-header"> 5 <div class="modal-header">
6 <span class="close" aria-hidden="true" (click)="hide()"></span> 6 <span class="close" aria-hidden="true" (click)="hide()"></span>
7 <h4 class="modal-title">Support</h4> 7 <h4 i18n class="modal-title">Support</h4>
8 </div> 8 </div>
9 9
10 <div class="modal-body"> 10 <div class="modal-body">
@@ -12,7 +12,7 @@
12 <div [innerHTML]="videoHTMLSupport"></div> 12 <div [innerHTML]="videoHTMLSupport"></div>
13 13
14 <div class="form-group inputs"> 14 <div class="form-group inputs">
15 <span class="action-button action-button-cancel" (click)="hide()"> 15 <span i18n class="action-button action-button-cancel" (click)="hide()">
16 Cancel 16 Cancel
17 </span> 17 </span>
18 </div> 18 </div>