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

@@ -39,7 +39,7 @@ export class CookiesUploaderDialogComponent implements OnInit {
this.uploading = false;
if (res['success']) {
this.uploaded = true;
this.postsService.openSnackBar('Cookies successfully uploaded!');
this.postsService.openSnackBar($localize`Cookies successfully uploaded!`);
}
}, err => {
this.uploading = false;

View File

@@ -36,14 +36,14 @@ export class RestoreDbDialogComponent implements OnInit {
this.postsService.restoreDBBackup(this.selected_backup[0]).subscribe(res => {
this.restoring = false;
if (res['success']) {
this.postsService.openSnackBar('Database successfully restored!');
this.postsService.openSnackBar($localize`Database successfully restored!`);
this.dialogRef.close();
} else {
this.postsService.openSnackBar('Failed to restore database! See logs for more info.');
this.postsService.openSnackBar($localize`Failed to restore database! See logs for more info.`);
}
}, err => {
this.restoring = false;
this.postsService.openSnackBar('Failed to restore database! See browser console for more info.');
this.postsService.openSnackBar($localize`Failed to restore database! See browser console for more info.`);
console.error(err);
});
}