diff --git a/src/app/stalker/favorites-button/favorites-button.component.ts b/src/app/stalker/favorites-button/favorites-button.component.ts index 2d0bec420..3869b1348 100644 --- a/src/app/stalker/favorites-button/favorites-button.component.ts +++ b/src/app/stalker/favorites-button/favorites-button.component.ts @@ -4,7 +4,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; -import { TranslateModule } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { PlaylistsService } from '../../services/playlists.service'; @Component({ @@ -17,6 +17,7 @@ export class FavoritesButtonComponent implements OnInit { private playlistService = inject(PlaylistsService); private route = inject(ActivatedRoute); private snackBar = inject(MatSnackBar); + private translateService = inject(TranslateService); portalId = this.route.snapshot.paramMap.get('id'); serialMeta = input.required<{ @@ -53,9 +54,15 @@ export class FavoritesButtonComponent implements OnInit { this.serialMeta().movie_id ) .subscribe(() => { - this.snackBar.open('Removed from favorites', null, { - duration: 1000, - }); + this.snackBar.open( + this.translateService.instant( + 'PORTALS.REMOVED_FROM_FAVORITES' + ), + null, + { + duration: 1000, + } + ); this.checkFavoriteStatus(); }); } @@ -64,9 +71,13 @@ export class FavoritesButtonComponent implements OnInit { this.playlistService .addPortalFavorite(this.portalId, this.serialMeta()) .subscribe(() => { - this.snackBar.open('Added to favorites', null, { - duration: 1000, - }); + this.snackBar.open( + this.translateService.instant('PORTALS.ADDED_TO_FAVORITES'), + null, + { + duration: 1000, + } + ); this.checkFavoriteStatus(); }); } diff --git a/src/app/stalker/stalker-series-view/stalker-series-view.component.html b/src/app/stalker/stalker-series-view/stalker-series-view.component.html index e0d773024..684a808db 100644 --- a/src/app/stalker/stalker-series-view/stalker-series-view.component.html +++ b/src/app/stalker/stalker-series-view/stalker-series-view.component.html @@ -2,10 +2,14 @@ @if (seasons()[0]; as serial) {