diff --git a/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.html b/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.html index 9c97c73f1..7b31832ea 100644 --- a/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.html +++ b/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.html @@ -20,8 +20,8 @@ - Season {{season.seasonNumber}} - Season {{season.seasonNumber}} + {{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }} + {{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }} diff --git a/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.ts b/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.ts index 146f31269..4f02a74b4 100644 --- a/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.ts +++ b/src/Ombi/ClientApp/src/app/shared/episode-request/episode-request.component.ts @@ -3,6 +3,7 @@ import { MatCheckboxChange } from "@angular/material/checkbox"; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; import { ISearchTvResultV2 } from "../../interfaces/ISearchTvResultV2"; import { MessageService } from "../../services"; +import { TranslateService } from "@ngx-translate/core"; import { ISeasonsViewModel, IEpisodesRequests, INewSeasonRequests, ITvRequestViewModelV2, IRequestEngineResult, RequestType } from "../../interfaces"; import { RequestServiceV2 } from "../../services/requestV2.service"; import { AdminRequestDialogComponent } from "../admin-request-dialog/admin-request-dialog.component"; @@ -23,7 +24,8 @@ export class EpisodeRequestComponent { } constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: EpisodeRequestData, - private requestService: RequestServiceV2, private notificationService: MessageService, private dialog: MatDialog) { } + private requestService: RequestServiceV2, private notificationService: MessageService, private dialog: MatDialog, + private translate: TranslateService) { } public async submitRequests() { @@ -35,7 +37,7 @@ export class EpisodeRequestComponent { }); if (!selected && !this.data.series.requestAll && !this.data.series.firstSeason && !this.data.series.latestSeason) { - this.notificationService.send("You need to select some episodes!", "OK"); + this.notificationService.send(this.translate.instant("Requests.NeedToSelectEpisodes"), "OK"); return; } @@ -123,7 +125,7 @@ export class EpisodeRequestComponent { private postRequest(requestResult: IRequestEngineResult) { if (requestResult.result) { this.notificationService.send( - `Request for ${this.data.series.title} has been added successfully`); + this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.data.series.title })); this.data.series.seasonRequests.forEach((season) => { season.episodes.forEach((ep) => { diff --git a/src/Ombi/wwwroot/translations/en.json b/src/Ombi/wwwroot/translations/en.json index 3eecf5a26..e27d1564d 100644 --- a/src/Ombi/wwwroot/translations/en.json +++ b/src/Ombi/wwwroot/translations/en.json @@ -194,7 +194,9 @@ "ChangeAvailability":"Mark Available", "Deleted": "Successfully deleted selected items", "Approved": "Successfully approved selected items" - } + }, + "NeedToSelectEpisodes": "You need to select some episodes!", + "RequestAddedSuccessfully": "Request for {{title}} has been added successfully" }, "Issues": { "Title": "Issues", @@ -305,7 +307,8 @@ "AllSeasonsTooltip": "This will request every season for this show", "FirstSeasonTooltip": "This will only request the First Season for this show", "LatestSeasonTooltip": "This will only request the Latest Season for this show", - "NoEpisodes": "There unfortunately is no episode data for this show yet!" + "NoEpisodes": "There unfortunately is no episode data for this show yet!", + "SeasonNumber": "Season {{number}}" }, "SonarrConfiguration": "Sonarr Configuration", "RadarrConfiguration": "Radarr Configuration",