i18n of publication page.
This commit is contained in:
@@ -50,8 +50,9 @@ export class PublicationComponent implements OnInit, OnDestroy {
|
||||
setTimeout(() => Prism.highlightAll(), 100);
|
||||
})
|
||||
.catch(error => {
|
||||
this.snackBar.open('An error occurred while loading publication...', 'Close', { duration: 5000 });
|
||||
console.error('An error occurred while loading publication...', error);
|
||||
const errorMessage = $localize`An error occurred while loading publication...`;
|
||||
this.snackBar.open(errorMessage, $localize`Close`, { duration: 5000 });
|
||||
console.error(errorMessage, error);
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false;
|
||||
@@ -70,8 +71,8 @@ export class PublicationComponent implements OnInit, OnDestroy {
|
||||
ConfirmationDialog,
|
||||
{
|
||||
data: {
|
||||
title: 'Publication deletion',
|
||||
description: 'Are you sure you want to delete this publication?'
|
||||
title: $localize`Publication deletion`,
|
||||
description: $localize`Are you sure you want to delete this publication?`
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -80,7 +81,7 @@ export class PublicationComponent implements OnInit, OnDestroy {
|
||||
.subscribe(response => {
|
||||
if (response && this.publication?.id) {
|
||||
this.publicationRestService.delete(this.publication.id);
|
||||
this.snackBar.open('Publication deleted', 'Close', { duration: 5000 });
|
||||
this.snackBar.open($localize`Publication deleted`, $localize`Close`, { duration: 5000 });
|
||||
this.location.back();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user