diff options
Diffstat (limited to 'client/src/app/videos/+video-watch')
11 files changed, 63 insertions, 48 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/videos/+video-watch/comment/video-comment-add.component.html index 54d7286db..eaf068cfa 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.html | |||
@@ -3,7 +3,7 @@ | |||
3 | <img [src]="user.accountAvatarUrl" alt="Avatar" /> | 3 | <img [src]="user.accountAvatarUrl" alt="Avatar" /> |
4 | 4 | ||
5 | <div class="form-group"> | 5 | <div class="form-group"> |
6 | <textarea placeholder="Add comment..." formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" | 6 | <textarea i18n-placeholder placeholder="Add comment..." formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" |
7 | (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea> | 7 | (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea> |
8 | 8 | ||
9 | </textarea> | 9 | </textarea> |
@@ -14,7 +14,7 @@ | |||
14 | </div> | 14 | </div> |
15 | 15 | ||
16 | <div class="submit-comment"> | 16 | <div class="submit-comment"> |
17 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid }"> | 17 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid }" i18n> |
18 | Post comment | 18 | Post comment |
19 | </button> | 19 | </button> |
20 | </div> | 20 | </div> |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts index b1f446475..2ee5f5ef1 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts | |||
@@ -9,6 +9,7 @@ import { User } from '../../../shared/users' | |||
9 | import { Video } from '../../../shared/video/video.model' | 9 | import { Video } from '../../../shared/video/video.model' |
10 | import { VideoComment } from './video-comment.model' | 10 | import { VideoComment } from './video-comment.model' |
11 | import { VideoCommentService } from './video-comment.service' | 11 | import { VideoCommentService } from './video-comment.service' |
12 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
12 | 13 | ||
13 | @Component({ | 14 | @Component({ |
14 | selector: 'my-video-comment-add', | 15 | selector: 'my-video-comment-add', |
@@ -37,7 +38,8 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { | |||
37 | constructor ( | 38 | constructor ( |
38 | private formBuilder: FormBuilder, | 39 | private formBuilder: FormBuilder, |
39 | private notificationsService: NotificationsService, | 40 | private notificationsService: NotificationsService, |
40 | private videoCommentService: VideoCommentService | 41 | private videoCommentService: VideoCommentService, |
42 | private i18n: I18n | ||
41 | ) { | 43 | ) { |
42 | super() | 44 | super() |
43 | } | 45 | } |
@@ -92,7 +94,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { | |||
92 | this.form.reset() | 94 | this.form.reset() |
93 | }, | 95 | }, |
94 | 96 | ||
95 | err => this.notificationsService.error('Error', err.text) | 97 | err => this.notificationsService.error(this.i18n('Error'), err.text) |
96 | ) | 98 | ) |
97 | } | 99 | } |
98 | 100 | ||
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.html b/client/src/app/videos/+video-watch/comment/video-comment.component.html index 06808ef80..60b803206 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comment.component.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <img [src]="comment.accountAvatarUrl" alt="Avatar" /> | 2 | <img [src]="comment.accountAvatarUrl" alt="Avatar" /> |
3 | 3 | ||
4 | <div class="comment"> | 4 | <div class="comment"> |
5 | <div *ngIf="highlightedComment === true" class="highlighted-comment">Highlighted comment</div> | 5 | <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div> |
6 | 6 | ||
7 | <div class="comment-account-date"> | 7 | <div class="comment-account-date"> |
8 | <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">{{ comment.by }}</a> | 8 | <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">{{ comment.by }}</a> |
@@ -11,8 +11,8 @@ | |||
11 | <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div> | 11 | <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div> |
12 | 12 | ||
13 | <div class="comment-actions"> | 13 | <div class="comment-actions"> |
14 | <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply">Reply</div> | 14 | <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div> |
15 | <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete">Delete</div> | 15 | <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div> |
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | <my-video-comment-add | 18 | <my-video-comment-add |
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.html b/client/src/app/videos/+video-watch/comment/video-comments.component.html index 114a56dc7..ac7c03648 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.html | |||
@@ -3,7 +3,10 @@ | |||
3 | <div class="title-page title-page-single"> | 3 | <div class="title-page title-page-single"> |
4 | Comments | 4 | Comments |
5 | </div> | 5 | </div> |
6 | <my-help *ngIf="video.commentsEnabled === true" helpType="custom" customHtml="You can either comment on the page of your instance where this video is federated with your PeerTube account, or via any ActivityPub-capable fediverse instance. For instance with Mastodon or Pleroma you can type in the search box <strong>@{{video.account.displayName}}@{{video.account.host}}</strong> and find back the video. Direct commenting capabilities are being worked on in <a href='https://github.com/Chocobozzz/PeerTube/issues/224'>#224</a>."></my-help> | 6 | <my-help |
7 | *ngIf="video.commentsEnabled === true" helpType="custom" i18n-customHtml | ||
8 | customHtml="You can either comment on the page of your instance where this video is federated with your PeerTube account, or via any ActivityPub-capable fediverse instance. For instance with Mastodon or Pleroma you can type in the search box <strong>@{{video.account.displayName}}@{{video.account.host}}</strong> and find back the video. Direct commenting capabilities are being worked on in <a href='https://github.com/Chocobozzz/PeerTube/issues/224'>#224</a>." | ||
9 | ></my-help> | ||
7 | </div> | 10 | </div> |
8 | 11 | ||
9 | <ng-template [ngIf]="video.commentsEnabled === true"> | 12 | <ng-template [ngIf]="video.commentsEnabled === true"> |
@@ -14,7 +17,7 @@ | |||
14 | (commentCreated)="onCommentThreadCreated($event)" | 17 | (commentCreated)="onCommentThreadCreated($event)" |
15 | ></my-video-comment-add> | 18 | ></my-video-comment-add> |
16 | 19 | ||
17 | <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0">No comments.</div> | 20 | <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div> |
18 | 21 | ||
19 | <div | 22 | <div |
20 | class="comment-threads" | 23 | class="comment-threads" |
@@ -24,15 +27,15 @@ | |||
24 | > | 27 | > |
25 | <div *ngIf="highlightedThread" id="highlighted-comment"> | 28 | <div *ngIf="highlightedThread" id="highlighted-comment"> |
26 | <my-video-comment | 29 | <my-video-comment |
27 | [comment]="highlightedThread" | 30 | [comment]="highlightedThread" |
28 | [video]="video" | 31 | [video]="video" |
29 | [inReplyToCommentId]="inReplyToCommentId" | 32 | [inReplyToCommentId]="inReplyToCommentId" |
30 | [commentTree]="threadComments[highlightedThread.id]" | 33 | [commentTree]="threadComments[highlightedThread.id]" |
31 | [highlightedComment]="true" | 34 | [highlightedComment]="true" |
32 | (wantedToReply)="onWantedToReply($event)" | 35 | (wantedToReply)="onWantedToReply($event)" |
33 | (wantedToDelete)="onWantedToDelete($event)" | 36 | (wantedToDelete)="onWantedToDelete($event)" |
34 | (threadCreated)="onThreadCreated($event)" | 37 | (threadCreated)="onThreadCreated($event)" |
35 | (resetReply)="onResetReply()" | 38 | (resetReply)="onResetReply()" |
36 | ></my-video-comment> | 39 | ></my-video-comment> |
37 | </div> | 40 | </div> |
38 | 41 | ||
@@ -50,7 +53,7 @@ | |||
50 | ></my-video-comment> | 53 | ></my-video-comment> |
51 | 54 | ||
52 | <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies"> | 55 | <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies"> |
53 | View all {{ comment.totalReplies }} replies | 56 | <ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container> |
54 | 57 | ||
55 | <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span> | 58 | <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span> |
56 | <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader> | 59 | <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader> |
@@ -59,7 +62,7 @@ | |||
59 | </div> | 62 | </div> |
60 | </ng-template> | 63 | </ng-template> |
61 | 64 | ||
62 | <div *ngIf="video.commentsEnabled === false"> | 65 | <div *ngIf="video.commentsEnabled === false" i18n> |
63 | Comments are disabled. | 66 | Comments are disabled. |
64 | </div> | 67 | </div> |
65 | </div> | 68 | </div> |
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index 34f4a0701..8c6ddb89e 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts | |||
@@ -11,6 +11,7 @@ import { VideoSortField } from '../../../shared/video/sort-field.type' | |||
11 | import { VideoDetails } from '../../../shared/video/video-details.model' | 11 | import { VideoDetails } from '../../../shared/video/video-details.model' |
12 | import { VideoComment } from './video-comment.model' | 12 | import { VideoComment } from './video-comment.model' |
13 | import { VideoCommentService } from './video-comment.service' | 13 | import { VideoCommentService } from './video-comment.service' |
14 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
14 | 15 | ||
15 | @Component({ | 16 | @Component({ |
16 | selector: 'my-video-comments', | 17 | selector: 'my-video-comments', |
@@ -40,7 +41,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
40 | private notificationsService: NotificationsService, | 41 | private notificationsService: NotificationsService, |
41 | private confirmService: ConfirmService, | 42 | private confirmService: ConfirmService, |
42 | private videoCommentService: VideoCommentService, | 43 | private videoCommentService: VideoCommentService, |
43 | private activatedRoute: ActivatedRoute | 44 | private activatedRoute: ActivatedRoute, |
45 | private i18n: I18n | ||
44 | ) {} | 46 | ) {} |
45 | 47 | ||
46 | ngOnInit () { | 48 | ngOnInit () { |
@@ -77,7 +79,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
77 | if (highlightThread) this.highlightedThread = new VideoComment(res.comment) | 79 | if (highlightThread) this.highlightedThread = new VideoComment(res.comment) |
78 | }, | 80 | }, |
79 | 81 | ||
80 | err => this.notificationsService.error('Error', err.message) | 82 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
81 | ) | 83 | ) |
82 | } | 84 | } |
83 | 85 | ||
@@ -89,7 +91,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
89 | this.componentPagination.totalItems = res.totalComments | 91 | this.componentPagination.totalItems = res.totalComments |
90 | }, | 92 | }, |
91 | 93 | ||
92 | err => this.notificationsService.error('Error', err.message) | 94 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
93 | ) | 95 | ) |
94 | } | 96 | } |
95 | 97 | ||
@@ -111,9 +113,11 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
111 | 113 | ||
112 | async onWantedToDelete (commentToDelete: VideoComment) { | 114 | async onWantedToDelete (commentToDelete: VideoComment) { |
113 | let message = 'Do you really want to delete this comment?' | 115 | let message = 'Do you really want to delete this comment?' |
114 | if (commentToDelete.totalReplies !== 0) message += `${commentToDelete.totalReplies} would be deleted too.` | 116 | if (commentToDelete.totalReplies !== 0) { |
117 | message += this.i18n(' {{ totalReplies }} replies will be deleted too.', { totalReplies: commentToDelete.totalReplies }) | ||
118 | } | ||
115 | 119 | ||
116 | const res = await this.confirmService.confirm(message, 'Delete') | 120 | const res = await this.confirmService.confirm(message, this.i18n('Delete')) |
117 | if (res === false) return | 121 | if (res === false) return |
118 | 122 | ||
119 | this.videoCommentService.deleteVideoComment(commentToDelete.videoId, commentToDelete.id) | 123 | this.videoCommentService.deleteVideoComment(commentToDelete.videoId, commentToDelete.id) |
@@ -136,7 +140,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
136 | this.componentPagination.totalItems-- | 140 | this.componentPagination.totalItems-- |
137 | }, | 141 | }, |
138 | 142 | ||
139 | err => this.notificationsService.error('Error', err.message) | 143 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
140 | ) | 144 | ) |
141 | } | 145 | } |
142 | 146 | ||
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' | |||
4 | import { ModalDirective } from 'ngx-bootstrap/modal' | 4 | import { ModalDirective } from 'ngx-bootstrap/modal' |
5 | import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' | 5 | import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' |
6 | import { VideoDetails } from '../../../shared/video/video-details.model' | 6 | import { VideoDetails } from '../../../shared/video/video-details.model' |
7 | import { 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' | |||
5 | import { ModalDirective } from 'ngx-bootstrap/modal' | 5 | import { ModalDirective } from 'ngx-bootstrap/modal' |
6 | import { VideoDetails } from '../../../shared/video/video-details.model' | 6 | import { VideoDetails } from '../../../shared/video/video-details.model' |
7 | import { buildVideoEmbed } from '../../../../assets/player/utils' | 7 | import { buildVideoEmbed } from '../../../../assets/player/utils' |
8 | import { 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> |