Improved snackbar translations support

This commit is contained in:
Isaac Abadi
2022-06-20 16:25:55 -04:00
parent 4c6c15d3a3
commit cbdd1a6253
11 changed files with 60 additions and 57 deletions

View File

@@ -147,7 +147,7 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
this.postsService.getFile(this.uid, this.uuid).subscribe(res => {
this.db_file = res['file'];
if (!this.db_file) {
this.postsService.openSnackBar('Failed to get file information from the server.', 'Dismiss');
this.postsService.openSnackBar($localize`Failed to get file information from the server.', 'Dismiss`);
return;
}
this.postsService.incrementViewCount(this.db_file['uid'], null, this.uuid).subscribe(() => undefined, err => {
@@ -183,10 +183,10 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
this.show_player = true;
this.parseFileNames();
} else {
this.postsService.openSnackBar('Failed to load playlist!', '');
this.postsService.openSnackBar($localize`Failed to load playlist!', '`);
}
}, () => {
this.postsService.openSnackBar('Failed to load playlist!', '');
this.postsService.openSnackBar($localize`Failed to load playlist!', '`);
});
}