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) {
+ +
+
@@ -34,15 +38,19 @@ {{ serial.age }}
-
IMDB Rating:
+
{{ 'XTREAM.IMDB_RATING' | translate }}:
{{ serial.rating_imdb }}
-
Kinopoisk Rating:
+
+ {{ 'XTREAM.KINOPOISK_RATING' | translate }}: +
{{ serial.rating_kinopoisk }}
-
Added:
+
+ {{ 'HOME.PLAYLISTS.ADDED' | translate }}: +
{{ serial.added }}
@@ -69,7 +77,7 @@ playEpisode.emit({ series: episode, cmd: item.cmd }) " > - Episode {{ episode }} + {{ 'XTREAM.EPISODE' | translate }} {{ episode }} }
diff --git a/src/app/stalker/stalker-series-view/stalker-series-view.component.ts b/src/app/stalker/stalker-series-view/stalker-series-view.component.ts index 67a29181b..b0ff88793 100644 --- a/src/app/stalker/stalker-series-view/stalker-series-view.component.ts +++ b/src/app/stalker/stalker-series-view/stalker-series-view.component.ts @@ -1,4 +1,4 @@ -import { NgFor, NgOptimizedImage } from '@angular/common'; +import { NgFor, NgIf, NgOptimizedImage } from '@angular/common'; import { Component, Signal, input, output } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatDividerModule } from '@angular/material/divider'; @@ -33,6 +33,7 @@ function extractNumericValue(str: string) { FavoritesButtonComponent, MatButtonModule, MatDividerModule, + NgIf, NgFor, NgOptimizedImage, TranslateModule,