Try to improve notification i18n translations

pull/2283/head
Chocobozzz 2019-11-18 17:38:01 +01:00
parent afbe30e147
commit ee2b7df045
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 28 additions and 28 deletions

View File

@ -4,90 +4,90 @@
<div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }" (click)="markAsRead(notification)"> <div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }" (click)="markAsRead(notification)">
<ng-container [ngSwitch]="notification.type"> <ng-container [ngSwitch]="notification.type">
<ng-container i18n *ngSwitchCase="UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION"> <ng-container *ngSwitchCase="UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION">
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.video.channel.avatarUrl" /> <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.video.channel.avatarUrl" />
<div class="message"> <div class="message" i18n>
{{ notification.video.channel.displayName }} published a new video: <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> {{ notification.video.channel.displayName }} published a new video: <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a>
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO"> <ng-container *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO">
<my-global-icon iconName="undo"></my-global-icon> <my-global-icon iconName="undo"></my-global-icon>
<div class="message"> <div class="message" i18n>
Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been unblacklisted Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been unblacklisted
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO"> <ng-container *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO">
<my-global-icon iconName="no"></my-global-icon> <my-global-icon iconName="no"></my-global-icon>
<div class="message"> <div class="message" i18n>
Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been blacklisted Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been blacklisted
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS"> <ng-container *ngSwitchCase="UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS">
<my-global-icon iconName="alert"></my-global-icon> <my-global-icon iconName="alert"></my-global-icon>
<div class="message"> <div class="message" i18n>
<a (click)="markAsRead(notification)" [routerLink]="notification.videoAbuseUrl">A new video abuse</a> has been created on video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoAbuse.video.name }}</a> <a (click)="markAsRead(notification)" [routerLink]="notification.videoAbuseUrl">A new video abuse</a> has been created on video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoAbuse.video.name }}</a>
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS"> <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS">
<my-global-icon iconName="no"></my-global-icon> <my-global-icon iconName="no"></my-global-icon>
<div class="message"> <div class="message" i18n>
The recently added video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been <a (click)="markAsRead(notification)" [routerLink]="notification.videoAutoBlacklistUrl">auto-blacklisted</a> The recently added video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been <a (click)="markAsRead(notification)" [routerLink]="notification.videoAutoBlacklistUrl">auto-blacklisted</a>
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO"> <ng-container *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO">
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
<div class="message"> <div class="message" i18n>
<a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.comment.account.displayName }}</a> commented your video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.comment.video.name }}</a> <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.comment.account.displayName }}</a> commented your video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.comment.video.name }}</a>
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED"> <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED">
<my-global-icon iconName="sparkle"></my-global-icon> <my-global-icon iconName="sparkle"></my-global-icon>
<div class="message"> <div class="message" i18n>
Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_SUCCESS"> <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_SUCCESS">
<my-global-icon iconName="cloud-download"></my-global-icon> <my-global-icon iconName="cloud-download"></my-global-icon>
<div class="message"> <div class="message" i18n>
<a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_ERROR"> <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_ERROR">
<my-global-icon iconName="cloud-error"></my-global-icon> <my-global-icon iconName="cloud-error"></my-global-icon>
<div class="message"> <div class="message" i18n>
<a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed <a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.NEW_USER_REGISTRATION"> <ng-container *ngSwitchCase="UserNotificationType.NEW_USER_REGISTRATION">
<my-global-icon iconName="user-add"></my-global-icon> <my-global-icon iconName="user-add"></my-global-icon>
<div class="message"> <div class="message" i18n>
User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }} registered</a> on your instance User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }} registered</a> on your instance
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.NEW_FOLLOW"> <ng-container *ngSwitchCase="UserNotificationType.NEW_FOLLOW">
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.actorFollow.follower.avatarUrl" /> <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.actorFollow.follower.avatarUrl" />
<div class="message"> <div class="message" i18n>
<a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following
<ng-container *ngIf="notification.actorFollow.following.type === 'channel'">your channel {{ notification.actorFollow.following.displayName }}</ng-container> <ng-container *ngIf="notification.actorFollow.following.type === 'channel'">your channel {{ notification.actorFollow.following.displayName }}</ng-container>
@ -95,27 +95,27 @@
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.COMMENT_MENTION"> <ng-container *ngSwitchCase="UserNotificationType.COMMENT_MENTION">
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
<div class="message"> <div class="message" i18n>
<a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.comment.account.displayName }}</a> mentioned you on <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">video {{ notification.comment.video.name }}</a> <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.comment.account.displayName }}</a> mentioned you on <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">video {{ notification.comment.video.name }}</a>
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.NEW_INSTANCE_FOLLOWER"> <ng-container *ngSwitchCase="UserNotificationType.NEW_INSTANCE_FOLLOWER">
<my-global-icon iconName="users"></my-global-icon> <my-global-icon iconName="users"></my-global-icon>
<div class="message"> <div class="message" i18n>
Your instance has <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">a new follower</a> ({{ notification.actorFollow?.follower.host }}) Your instance has <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">a new follower</a> ({{ notification.actorFollow?.follower.host }})
<ng-container *ngIf="notification.actorFollow?.state === 'pending'"> awaiting your approval</ng-container> <ng-container *ngIf="notification.actorFollow?.state === 'pending'"> awaiting your approval</ng-container>
</div> </div>
</ng-container> </ng-container>
<ng-container i18n *ngSwitchCase="UserNotificationType.AUTO_INSTANCE_FOLLOWING"> <ng-container *ngSwitchCase="UserNotificationType.AUTO_INSTANCE_FOLLOWING">
<my-global-icon iconName="users"></my-global-icon> <my-global-icon iconName="users"></my-global-icon>
<div class="message"> <div class="message" i18n>
Your instance automatically followed <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}</a> Your instance automatically followed <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}</a>
</div> </div>
</ng-container> </ng-container>