fix(translations): 🌐 Added localization for missing areas

Localization
pull/4365/head
Jamie 3 years ago committed by GitHub
commit b23668b84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,6 +2,7 @@ import { Component, OnInit, Input } from "@angular/core";
import { IDiscoverCardResult } from "../../interfaces";
import { RequestType } from "../../../interfaces";
import { MessageService, RequestService, SearchV2Service } from "../../../services";
import { TranslateService } from "@ngx-translate/core";
import { MatDialog } from "@angular/material/dialog";
import { ISearchTvResultV2 } from "../../../interfaces/ISearchTvResultV2";
import { ISearchMovieResultV2 } from "../../../interfaces/ISearchMovieResultV2";
@ -30,7 +31,7 @@ export class DiscoverCardComponent implements OnInit {
private tvSearchResult: ISearchTvResultV2;
constructor(private searchService: SearchV2Service, private dialog: MatDialog, private requestService: RequestService,
public messageService: MessageService) { }
public messageService: MessageService, private translate: TranslateService) { }
public ngOnInit() {
if (this.result.type == RequestType.tvShow) {
@ -98,13 +99,13 @@ export class DiscoverCardComponent implements OnInit {
public getAvailbilityStatus(): string {
if (this.result.available) {
return "Available";
return this.translate.instant("Common.Available");
}
if (this.result.approved) {
return "Approved";
return this.translate.instant("Common.Approved");
}
if (this.result.requested) {
return "Pending";
return this.translate.instant("Common.Pending");
}
return "";
}
@ -129,7 +130,7 @@ export class DiscoverCardComponent implements OnInit {
rootFolderOverride: result.radarrFolderId, }).subscribe(x => {
if (x.result) {
this.result.requested = true;
this.messageService.send(x.message, "Ok");
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.result.title }), "Ok");
} else {
this.messageService.send(x.errorMessage, "Ok");
}
@ -140,7 +141,7 @@ export class DiscoverCardComponent implements OnInit {
this.requestService.requestMovie({ theMovieDbId: +this.result.id, languageCode: null, requestOnBehalf: null, qualityPathOverride: null, rootFolderOverride: null }).subscribe(x => {
if (x.result) {
this.result.requested = true;
this.messageService.send(x.message, "Ok");
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.result.title }), "Ok");
} else {
this.messageService.send(x.errorMessage, "Ok");
}

@ -7,8 +7,7 @@
<p class="col-12 text-center">{{collection.overview}}</p>
</div>
<div class="row justify-content-md-center">
<button class="col-2" mat-raised-button color="accent" (click)="requestCollection();">Request
Collection</button>
<button class="col-2" mat-raised-button color="accent" (click)="requestCollection();">{{'Requests.RequestCollection' | translate }}</button>
</div>
<div *ngIf="loadingFlag" class="lightbox row justify-content-md-center">
<div class="row justify-content-md-center top-spacing loading-spinner">

@ -1,6 +1,7 @@
import { Component, OnInit } from "@angular/core";
import { MessageService, SearchV2Service } from "../../../services";
import { TranslateService } from "@ngx-translate/core";
import { ActivatedRoute } from "@angular/router";
import { AuthService } from "../../../auth/auth.service";
import { IDiscoverCardResult } from "../../interfaces";
@ -25,7 +26,8 @@ export class DiscoverCollectionsComponent implements OnInit {
private route: ActivatedRoute,
private requestServiceV2: RequestServiceV2,
private messageService: MessageService,
private auth: AuthService) {
private auth: AuthService,
private translate: TranslateService) {
this.route.params.subscribe((params: any) => {
this.collectionId = params.collectionId;
});
@ -42,7 +44,7 @@ export class DiscoverCollectionsComponent implements OnInit {
this.loading();
this.requestServiceV2.requestMovieCollection(this.collectionId).subscribe(result => {
if (result.result) {
this.messageService.send(result.message);
this.messageService.send(this.translate.instant("Requests.CollectionSuccesfullyAdded", { name: this.collection.name }));
} else {
this.messageService.send(result.errorMessage);
}

@ -1,7 +1,7 @@
<mat-card class="issue-card" *ngIf="!deleted">
<mat-card-header>
<mat-card-title>{{issue.subject}}</mat-card-title>
<mat-card-subtitle>{{issue.userReported?.userName}} on {{issue.createdDate | date:short}}</mat-card-subtitle>
<mat-card-subtitle>{{'Issues.UserOnDate' | translate: { user: issue.userReported?.userName, date: issue.createdDate | amLocal | amUserLocale | amDateFormat: 'LL' } }}</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<p>

@ -9,6 +9,7 @@ import { AuthService } from "../../../auth/auth.service";
import { IMovieRequests, RequestType, IAdvancedData } from "../../../interfaces";
import { DenyDialogComponent } from "../shared/deny-dialog/deny-dialog.component";
import { NewIssueComponent } from "../shared/new-issue/new-issue.component";
import { TranslateService } from "@ngx-translate/core";
import { MovieAdvancedOptionsComponent } from "./panels/movie-advanced-options/movie-advanced-options.component";
import { RequestServiceV2 } from "../../../services/requestV2.service";
import { RequestBehalfComponent } from "../shared/request-behalf/request-behalf.component";
@ -39,7 +40,8 @@ export class MovieDetailsComponent {
private sanitizer: DomSanitizer, private imageService: ImageService,
public dialog: MatDialog, private requestService: RequestService,
private requestService2: RequestServiceV2, private radarrService: RadarrService,
public messageService: MessageService, private auth: AuthService, private settingsState: SettingsStateService) {
public messageService: MessageService, private auth: AuthService, private settingsState: SettingsStateService,
private translate: TranslateService) {
this.route.params.subscribe(async (params: any) => {
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
if (params.movieDbId.startsWith("tt")) {
@ -97,7 +99,7 @@ export class MovieDetailsComponent {
if (requestResult.result) {
this.movie.requested = true;
this.movie.requestId = requestResult.requestId;
this.messageService.send(requestResult.message, "Ok");
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.movie.title }), "Ok");
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
} else {
this.messageService.send(requestResult.errorMessage, "Ok");
@ -110,7 +112,7 @@ export class MovieDetailsComponent {
this.movie.requested = true;
this.movie.requestId = result.requestId;
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
this.messageService.send(result.message, "Ok");
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", { title: this.movie.title }), "Ok");
} else {
this.messageService.send(result.errorMessage, "Ok");
}
@ -151,7 +153,7 @@ export class MovieDetailsComponent {
this.movie.approved = true;
const result = await this.requestService.approveMovie({ id: this.movieRequest.id }).toPromise();
if (result.result) {
this.messageService.send("Successfully Approved", "Ok");
this.messageService.send(this.translate.instant("Requests.SuccessfullyApproved"), "Ok");
} else {
this.movie.approved = false;
this.messageService.send(result.errorMessage, "Ok");
@ -162,7 +164,7 @@ export class MovieDetailsComponent {
const result = await this.requestService.markMovieAvailable({ id: this.movieRequest.id }).toPromise();
if (result.result) {
this.movie.available = true;
this.messageService.send(result.message, "Ok");
this.messageService.send(this.translate.instant("Requests.NowAvailable"), "Ok");
} else {
this.messageService.send(result.errorMessage, "Ok");
}
@ -173,7 +175,7 @@ export class MovieDetailsComponent {
const result = await this.requestService.markMovieUnavailable({ id: this.movieRequest.id }).toPromise();
if (result.result) {
this.movie.available = false;
this.messageService.send(result.message, "Ok");
this.messageService.send(this.translate.instant("Requests.NowUnavailable"), "Ok");
} else {
this.messageService.send(result.errorMessage, "Ok");
}
@ -204,7 +206,7 @@ export class MovieDetailsComponent {
public reProcessRequest() {
this.requestService2.reprocessRequest(this.movieRequest.id, RequestType.movie).subscribe(result => {
if (result.result) {
this.messageService.send(result.message ? result.message : "Successfully Re-processed the request", "Ok");
this.messageService.send(result.message ? result.message : this.translate.instant("Requests.SuccessfullyReprocessed"), "Ok");
} else {
this.messageService.send(result.errorMessage, "Ok");
}

@ -17,7 +17,7 @@
</div>
<div *ngIf="streams?.length > 0" class="streaming-on">
<hr>
<span class="label">{{'MediaDetails.StreamingOn' | translate }}:</span>
<span class="label">{{'MediaDetails.StreamingOn' | translate }}</span>
<div>
<span *ngFor="let stream of streams">
<img class="stream-small" [matTooltip]="stream.streamingProvider" src="https://image.tmdb.org/t/p/original{{stream.logo}}">
@ -26,11 +26,11 @@
</div>
<hr>
<div>
<span class="label">{{'MediaDetails.Status' | translate }}:</span>
{{movie.status}}
<span class="label">{{'MediaDetails.Status' | translate }}</span>
<span id="status"> {{ this.movie.status | translateStatus }}</span>
</div>
<div>
<span class="label">{{'MediaDetails.Availability' | translate }}:</span>
<span class="label">{{'MediaDetails.Availability' | translate }}</span>
<span *ngIf="movie.available"> {{'Common.Available' | translate}}</span>
<span *ngIf="!movie.available"> {{'Common.NotAvailable' | translate}}</span>
</div>
@ -44,23 +44,23 @@
</div>
<div *ngIf="request">
<span class="label">{{'Requests.RequestedBy' | translate }}: </span>
<span id="requestedByInfo">{{request.requestedUser.userAlias}}</span>
<span class="label">{{'MediaDetails.RequestedBy' | translate }}</span>
<span id="requestedByInfo"> {{request.requestedUser.userAlias}}</span>
</div>
<div *ngIf="request">
<span class="label">{{'Requests.RequestDate' | translate }}:</span>
{{request.requestedDate | date}}
<span class="label">{{'MediaDetails.RequestDate' | translate }}</span>
{{request.requestedDate | amUserLocale | amDateFormat: 'LL'}}
</div>
<div *ngIf="request && request.denied">
<span class="label">{{'Requests.DeniedReason' | translate }}: </span>
<span class="label">{{'MediaDetails.DeniedReason' | translate }}</span>
<span id="deniedReasonInfo">{{request.deniedReason}}</span>
</div>
<div *ngIf="movie.quality">
<span class="label">{{'MediaDetails.Quality' | translate }}:</span>
<span class="label">{{'MediaDetails.Quality' | translate }}</span>
<div>{{movie.quality | quality}}</div>
</div>
@ -77,34 +77,34 @@
<hr>
<span class="label">{{'MediaDetails.TheatricalRelease' | translate }}:</span>
{{movie.releaseDate | date: 'mediumDate'}}
<span class="label">{{'MediaDetails.TheatricalRelease' | translate }}</span>
{{movie.releaseDate | amUserLocale | amDateFormat: 'LL': 'mediumDate'}}
<div *ngIf="movie.digitalReleaseDate">
<span class="label">{{'MediaDetails.DigitalRelease' | translate }}:</span>
{{movie.digitalReleaseDate | date: 'mediumDate'}}
<span class="label">{{'MediaDetails.DigitalRelease' | translate }}</span>
{{movie.digitalReleaseDate | amUserLocale | amDateFormat: 'LL': 'mediumDate'}}
</div>
<div *ngIf="movie.voteCount">
<span class="label">{{'MediaDetails.Votes' | translate }}:</span>
<span class="label">{{'MediaDetails.Votes' | translate }}</span>
{{movie.voteCount | thousandShort: 1}}
</div>
<div>
<span class="label">{{'MediaDetails.Runtime' | translate }}:</span>
<span class="label">{{'MediaDetails.Runtime' | translate }}</span>
{{'MediaDetails.Minutes' | translate:{runtime: movie.runtime} }}
</div>
<div *ngIf="movie.revenue">
<span class="label">{{'MediaDetails.Revenue' | translate }}:</span>
<span class="label">{{'MediaDetails.Revenue' | translate }}</span>
{{movie.revenue | currency: 'USD'}}
</div>
<div *ngIf="movie.budget">
<span class="label">{{'MediaDetails.Budget' | translate }}:</span>
<span class="label">{{'MediaDetails.Budget' | translate }}</span>
{{movie.budget | currency: 'USD'}}
</div>
<hr />
<div class="genre-button-container" *ngIf="movie.genres">
<span class="label">{{'MediaDetails.Genres' | translate }}:</span>
<span class="label">{{'MediaDetails.Genres' | translate }}</span>
<div>
<mat-chip-list>
<mat-chip selected *ngFor="let genre of movie.genres">
@ -116,7 +116,7 @@
<hr />
<div class="keyword-button-container" *ngIf="movie?.keywords?.keywordsValue?.length > 0">
<span class="label">{{'MediaDetails.Keywords' | translate }}:</span>
<span class="label">{{'MediaDetails.Keywords' | translate }}</span>
<mat-chip-list>
<mat-chip selected *ngFor="let keyword of movie.keywords.keywordsValue">
{{keyword.name}}

@ -2,6 +2,7 @@ import { Component, Inject } from "@angular/core";
import { IDenyDialogData } from "../interfaces/interfaces";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import { RequestService, MessageService } from "../../../../services";
import { TranslateService } from "@ngx-translate/core";
import { RequestType, IRequestEngineResult } from "../../../../interfaces";
@Component({
@ -13,7 +14,8 @@ export class DenyDialogComponent {
public dialogRef: MatDialogRef<DenyDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: IDenyDialogData,
private requestService: RequestService,
public messageService: MessageService) {}
public messageService: MessageService,
private translate: TranslateService) {}
public denyReason: string;
@ -30,7 +32,7 @@ export class DenyDialogComponent {
}
if (result.result) {
this.messageService.send("Denied Request", "Ok");
this.messageService.send(this.translate.instant("Requests.DeniedRequest"), "Ok");
this.data.denied = true;
} else {
this.messageService.send(result.errorMessage, "Ok");

@ -11,7 +11,7 @@
<div *ngIf="streams?.length > 0" id="streamingContainer" class="streaming-on-container">
<hr>
<div class="streaming-on-content">
<span class="label">{{'MediaDetails.StreamingOn' | translate }}:</span>
<span class="label">{{'MediaDetails.StreamingOn' | translate }}</span>
<div>
<span *ngFor="let stream of sortBy('order')">
<img class="stream-small" id="stream{{stream.streamingProvider}}" [matTooltip]="stream.streamingProvider" src="https://image.tmdb.org/t/p/original{{stream.logo}}">
@ -21,44 +21,44 @@
</div>
<hr>
<div *ngIf="tv.status">
<span class="label">{{'MediaDetails.Status' | translate }}:</span>
<span id="status"> {{tv.status}}</span>
<span class="label">{{'MediaDetails.Status' | translate }}</span>
<span id="status"> {{ tv.status | translateStatus }}</span>
</div>
<span class="label">First Aired:</span>
{{tv.firstAired | date: 'mediumDate'}}
<span class="label">{{'MediaDetails.FirstAired' | translate }}</span>
{{tv.firstAired | amLocal | amUserLocale | amDateFormat: 'LL' }}
</div>
<div *ngIf="seasonCount">
<span class="label">Seasons:</span>
<span class="label">{{'MediaDetails.Seasons' | translate }}</span>
{{seasonCount}}
</div>
<div *ngIf="totalEpisodes">
<span class="label">Episodes:</span>
<span class="label">{{'MediaDetails.Episodes' | translate }}</span>
{{totalEpisodes}}
</div>
<div *ngIf="advancedOptions && request?.rootPathOverrideTitle">
<span class="label">{{'MediaDetails.RootFolderOverride' | translate }}:</span>
<span class="label">{{'MediaDetails.RootFolderOverride' | translate }}</span>
<div>{{request.rootPathOverrideTitle}}</div>
</div>
<div *ngIf="advancedOptions && request?.qualityOverrideTitle">
<span class="label">{{'MediaDetails.QualityOverride' | translate }}:</span>
<span class="label">{{'MediaDetails.QualityOverride' | translate }}</span>
<div>{{request.qualityOverrideTitle}}</div>
</div>
<div>
<span class="label">{{'MediaDetails.Runtime' | translate }}:</span>
<span class="label">{{'MediaDetails.Runtime' | translate }}</span>
{{'MediaDetails.Minutes' | translate:{ runtime: tv.runtime} }}
</div>
<div *ngIf="tv.network">
<span class="label">Network:</span>
<span class="label">{{'MediaDetails.Network' | translate }}</span>
{{tv.network.name}}
</div>
<div class="genre-button-container" *ngIf="tv.genres">
<span class="label">{{'MediaDetails.Genres' | translate }}:</span>
<span class="label">{{'MediaDetails.Genres' | translate }}</span>
<div>
<mat-chip-list>
<mat-chip selected *ngFor="let genre of tv.genres">

@ -6,7 +6,7 @@
</mat-panel-title>
<mat-panel-description>
{{'Requests.RequestedBy' | translate}} '{{request.requestedUser.userAlias}}' on
{{request.requestedDate | amLocal | amDateFormat: 'LL' }}
{{request.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL' }}
<span *ngIf="request.denied"> - {{request.deniedReason}}</span>
</mat-panel-description>
</mat-expansion-panel-header>

@ -0,0 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
@Pipe({
name: 'translateStatus'
})
export class TranslateStatusPipe implements PipeTransform {
constructor(private translateService: TranslateService) {}
transform(value: string): string {
const textKey = 'MediaDetails.StatusValues.' + value;
const text = this.translateService.instant(textKey);
if (text !== textKey) {
return text;
} else {
return value;
}
}
}

@ -1,5 +1,6 @@
import { ModuleWithProviders, NgModule } from "@angular/core";
import { HumanizePipe } from "./HumanizePipe";
import { TranslateStatusPipe } from "./TranslateStatus";
import { ThousandShortPipe } from "./ThousandShortPipe";
import { SafePipe } from "./SafePipe";
import { QualityPipe } from "./QualityPipe";
@ -7,8 +8,8 @@ import { UserLocalePipe } from "./UserLocalePipe";
@NgModule({
imports: [],
declarations: [HumanizePipe, ThousandShortPipe, SafePipe, QualityPipe, UserLocalePipe],
exports: [HumanizePipe, ThousandShortPipe, SafePipe, QualityPipe, UserLocalePipe],
declarations: [HumanizePipe, ThousandShortPipe, SafePipe, QualityPipe, UserLocalePipe, TranslateStatusPipe ],
exports: [HumanizePipe, ThousandShortPipe, SafePipe, QualityPipe, UserLocalePipe, TranslateStatusPipe ],
})
export class PipeModule {

@ -48,7 +48,7 @@
<ng-container matColumnDef="requestedDate">
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestDate' | translate}} </th>
<td mat-cell *matCellDef="let element"> {{element.requestedDate | amLocal | amDateFormat: 'LL'}} </td>
<td mat-cell *matCellDef="let element"> {{element.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL'}} </td>
</ng-container>
<ng-container matColumnDef="requestStatus">

@ -58,12 +58,12 @@
<ng-container matColumnDef="requestedDate">
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.RequestDate' | translate}} </th>
<td mat-cell id="requestedDate{{element.id}}" *matCellDef="let element"> {{element.requestedDate | amLocal | amDateFormat: 'LL'}} </td>
<td mat-cell id="requestedDate{{element.id}}" *matCellDef="let element"> {{element.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL'}} </td>
</ng-container>
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{ 'Requests.Status' | translate}} </th>
<td mat-cell id="status{{element.id}}" *matCellDef="let element"> {{element.status}} </td>
<td mat-cell id="status{{element.id}}" *matCellDef="let element"> {{element.status |translateStatus }} </td>
</ng-container>

@ -44,7 +44,7 @@
<ng-container matColumnDef="requestedDate">
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> {{'Requests.RequestDate' | translate}} </th>
<td id="requestedDate{{element.id}}" mat-cell *matCellDef="let element">
{{element.requestedDate | amLocal | amDateFormat: 'LL'}}
{{element.requestedDate | amLocal | amUserLocale | amDateFormat: 'LL'}}
</td>
</ng-container>
@ -56,7 +56,7 @@
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef> {{'Requests.Status' | translate}} </th>
<td mat-cell id="status{{element.id}}" *matCellDef="let element">
{{element.parentRequest.status}}
{{element.parentRequest.status | translateStatus }}
</td>
</ng-container>

@ -99,11 +99,11 @@
<div id="releaseDate">{{ 'Requests.TheatricalRelease' | translate: {date: request.releaseDate |
amLocal | amDateFormat: 'LL'} }}</div>
amLocal | amUserLocale | amDateFormat: 'LL'} }}</div>
<div *ngIf="request.digitalReleaseDate" id="digitalReleaseDate">{{ 'Requests.DigitalRelease' |
translate: {date: request.digitalReleaseDate | amLocal | amDateFormat: 'LL'} }}</div>
translate: {date: request.digitalReleaseDate | amLocal | amUserLocale | amDateFormat: 'LL'} }}</div>
<div id="requestedDate">{{ 'Requests.RequestDate' | translate }} {{request.requestedDate | amLocal
| amDateFormat: 'LL'}}</div>
| amUserLocale | amDateFormat: 'LL'}}</div>
<br />
</div>
<div *ngIf="isAdmin">

@ -22,7 +22,7 @@
<div class="col-sm-5 small-padding">
<div>
<a href="http://www.imdb.com/title/{{node.imdbId}}/" target="_blank">
<h4 class="request-title">{{node.title}} ({{node.releaseDate | amLocal | amDateFormat: 'YYYY'}})</h4>
<h4 class="request-title">{{node.title}} ({{node.releaseDate | amLocal| amUserLocale | amDateFormat: 'YYYY'}})</h4>
</a>
</div>
<br />
@ -32,7 +32,7 @@
</div>
<div>Release Date: {{node.releaseDate | amLocal | amDateFormat: 'LL'}}</div>
<div>Release Date: {{node.releaseDate | amLocal | amUserLocale | amDateFormat: 'LL'}}</div>
<div *ngIf="isAdmin">
<div *ngIf="node.qualityOverrideTitle" class="quality-override">{{ 'Requests.QualityOverride' | translate }}
<span>{{node.qualityOverrideTitle}} </span>

@ -103,7 +103,7 @@
amDateFormat: 'LL'} }}</span>
<span *ngIf="result.digitalReleaseDate" class="label label-info" id="releaseDateLabel"
target="_blank">{{ 'Search.DigitalDate' | translate: {date: result.digitalReleaseDate |
amLocal | amDateFormat: 'LL'} }}</span>
amLocal | amUserLocale | amDateFormat: 'LL'} }}</span>
<a *ngIf="result.homepage" href="{{result.homepage}}" id="homePageLabel" target="_blank"><span
class="label label-info" [translate]="'Search.Movies.HomePage'"></span></a>

@ -18,7 +18,7 @@
</div>
<small>Updated at {{data.updateDate | date}}</small>
<small>Updated at {{data.updateDate | amUserLocale | amDateFormat: 'LL' }}</small>
</mat-dialog-content>

@ -20,8 +20,8 @@
<mat-expansion-panel-header>
<mat-panel-title>
<mat-checkbox *ngIf="!season.seasonAvailable && isSeasonCheckable(season)" (click)="$event.stopPropagation();" (change)="seasonChanged($event, season)">
Season {{season.seasonNumber}}</mat-checkbox>
<span *ngIf="season.seasonAvailable || !isSeasonCheckable(season)">Season {{season.seasonNumber}}</span>
{{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }}</mat-checkbox>
<span *ngIf="season.seasonAvailable || !isSeasonCheckable(season)">{{ 'MediaDetails.EpisodeSelector.SeasonNumber' | translate: { number: season.seasonNumber } }}</span>
</mat-panel-title>
<mat-panel-description>
<!-- Description -->

@ -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<EpisodeRequestComponent>, @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) => {

@ -38,6 +38,7 @@ import { MatTreeModule } from '@angular/material/tree';
import { MomentModule } from "ngx-moment";
import { NgModule } from "@angular/core";
import { SidebarModule } from "primeng/sidebar";
import { PipeModule } from "../pipes/pipe.module";
import { TheMovieDbService } from "../services";
import { TranslateModule } from "@ngx-translate/core";
import { TruncateModule } from "@yellowspot/ng-truncate";
@ -87,6 +88,7 @@ import { WatchProvidersSelectComponent } from "./components/watch-providers-sele
MatTreeModule,
MatStepperModule,
MatSnackBarModule,
PipeModule,
],
exports: [
TranslateModule,

@ -7,15 +7,15 @@
</div>
<mat-tab-group>
<mat-tab label="Profile">
<mat-tab label="{{'UserPreferences.Profile' | translate}}">
<div class="tab-content">
<div class="row user-type-row">
<div class="col-5 col-sm-3 col-md-2">
User Type:
{{'UserPreferences.UserType' | translate}}
</div>
<div class="col-7 col-sm-9 col-md-10">
{{UserType[user?.userType]}}
{{'UserTypeLabel.' + user?.userType | translate }}
</div>
</div>
@ -58,7 +58,7 @@
<div class="col-12">
<a href="https://play.google.com/store/apps/details?id=com.tidusjar.Ombi&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1"
target="_blank"><img width="200" alt="Get it on Google Play"
src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" /></a>
src="https://play.google.com/intl/{{ selectedLang }}/badges/static/images/badges/{{ selectedLang }}_badge_web_generic.png" /></a>
</div>
<div class="col-12">
<a href="https://apps.apple.com/us/app/ombi/id1335260043" target="_blank"><img
@ -66,7 +66,9 @@
src="{{baseUrl}}/images/appstore.svg" /></a>
</div>
<div class="col-12">
<button style="margin-left:13px; margin-top: 20px;" mat-raised-button color="accent" type="button" (click)="openMobileApp($event)">Open Mobile App</button>
<button style="margin-left:13px; margin-top: 20px;" mat-raised-button color="accent" type="button" (click)="openMobileApp($event)">
{{'NavigationBar.OpenMobileApp' | translate}}
</button>
</div>
</div>
</div>
@ -75,15 +77,15 @@
</div>
</mat-tab>
<mat-tab *ngIf="user?.userType === UserType.LocalUser" label="Security">
<mat-tab *ngIf="user?.userType === UserType.LocalUser" label="{{'UserPreferences.Security' | translate}}">
<div class="tab-content">
<h2>Change Details</h2>
<h2>{{'UserPreferences.ChangeDetails' | translate}}</h2>
<form novalidate [formGroup]="passwordForm" (ngSubmit)="updatePassword()">
<div class="row">
<div class="col-md-6 col-12">
<span>You need your current password to make any changes here</span>
<span>{{'UserPreferences.NeedCurrentPassword' | translate}}</span>
<mat-form-field appearance="outline" floatLabel=always>
<mat-label>Current Password</mat-label>
<mat-label>{{'UserPreferences.CurrentPassword' | translate}}</mat-label>
<input id="currentPassword" matInput type="password" formControlName="currentPassword">
</mat-form-field>
</div>
@ -91,7 +93,7 @@
<div class="row">
<div class="col-md-6 col-12">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label>Email Address</mat-label>
<mat-label>{{'UserPreferences.EmailAddress' | translate}}</mat-label>
<input id="email" matInput formControlName="emailAddress">
</mat-form-field>
</div>
@ -100,7 +102,7 @@
<div class="row">
<div class="col-md-6 col-12">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label>New Password</mat-label>
<mat-label>{{'UserPreferences.NewPassword' | translate}}</mat-label>
<input id="newPassword" matInput type="password" formControlName="password">
</mat-form-field>
</div>
@ -108,12 +110,14 @@
<div class="row">
<div class="col-md-6 col-12">
<mat-form-field appearance="outline" floatLabel=always>
<mat-label>New Password Confirm</mat-label>
<mat-label>{{'UserPreferences.NewPasswordConfirm' | translate}}</mat-label>
<input id="confirmPassword" matInput type="password" formControlName="confirmPassword">
</mat-form-field>
</div>
</div>
<button id="submitSecurity" mat-raised-button color="accent" type="submit">Update</button>
<button id="submitSecurity" mat-raised-button color="accent" type="submit">
{{'Common.Update' | translate}}
</button>
</form>
</div>

@ -133,7 +133,7 @@ export class UserPreferenceComponent implements OnInit {
currentPassword: values.currentPassword
}).subscribe(x => {
if (x.successful) {
this.notification.success("Updated your information");
this.notification.success(this.translate.instant("UserPreferences.UpdatedYourInformation"));
this.user.emailAddress = values.emailAddress;
} else {
this.notification.error(x.errors[0]);

@ -14,6 +14,8 @@
"Common": {
"ContinueButton": "Continue",
"Available": "Available",
"Approved": "Approved",
"Pending": "Pending",
"PartiallyAvailable": "Partially Available",
"Monitored": "Monitored",
"NotAvailable": "Not Available",
@ -33,6 +35,7 @@
},
"Cancel": "Cancel",
"Submit": "Submit",
"Update": "Update",
"tvShow": "TV Show",
"movie": "Movie"
},
@ -192,7 +195,16 @@
"ChangeAvailability":"Mark Available",
"Deleted": "Successfully deleted selected items",
"Approved": "Successfully approved selected items"
}
},
"SuccessfullyApproved": "Successfully Approved",
"NowAvailable": "Request is now available",
"NowUnavailable": "Request is now unavailable",
"SuccessfullyReprocessed": "Successfully Re-processed the request",
"DeniedRequest": "Denied Request",
"RequestCollection": "Request Collection",
"CollectionSuccesfullyAdded": "The collection {{name}} has been successfully added!",
"NeedToSelectEpisodes": "You need to select some episodes!",
"RequestAddedSuccessfully": "Request for {{title}} has been added successfully"
},
"Issues": {
"Title": "Issues",
@ -228,7 +240,8 @@
"Delete": "Delete issue",
"DeletedIssue": "Issue has been deleted",
"Chat":"Chat",
"Requested":"Requested"
"Requested":"Requested",
"UserOnDate": "{{user}} on {{date}}"
},
"Filter": {
"ClearFilter": "Clear Filter",
@ -269,21 +282,33 @@
"QualityProfilesSelect":"Select A Quality Profile",
"RootFolderSelect":"Select A Root Folder",
"LanguageProfileSelect":"Select A Language Profile",
"Status":"Status",
"Availability":"Availability",
"Status":"Status:",
"StatusValues" : {
"Planned": "Planned",
"In Production": "In Production",
"Released": "Released",
"Returning Series": "Returning Series",
"Ended": "Ended",
"Canceled": "Canceled"
},
"Seasons": "Seasons:",
"Episodes": "Episodes:",
"Availability":"Availability:",
"RequestStatus":"Request Status",
"Quality":"Quality",
"RootFolderOverride":"Root Folder Override",
"QualityOverride":"Quality Override",
"Genres":"Genres",
"TheatricalRelease":"Release",
"DigitalRelease":"Digital Release",
"Votes":"Votes",
"Runtime":"Runtime",
"Quality":"Quality:",
"RootFolderOverride":"Root Folder Override:",
"QualityOverride":"Quality Override:",
"Network":"Network:",
"Genres":"Genres:",
"FirstAired":"First Aired:",
"TheatricalRelease":"Release:",
"DigitalRelease":"Digital Release:",
"Votes":"Votes:",
"Runtime":"Runtime:",
"Minutes": "{{runtime}} Minutes",
"Revenue":"Revenue",
"Budget":"Budget",
"Keywords":"Keywords/Tags",
"Revenue":"Revenue:",
"Budget":"Budget:",
"Keywords":"Keywords/Tags:",
"Casts": {
"CastTitle": "Cast"
},
@ -291,13 +316,17 @@
"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",
"RequestOnBehalf": "Request on behalf of",
"PleaseSelectUser": "Please select a user",
"StreamingOn": "Streaming On",
"StreamingOn": "Streaming On:",
"RequestedBy": "Requested By:",
"RequestDate": "Request Date:",
"DeniedReason": "Denied Reason:",
"ReProcessRequest": "Re-Process Request"
},
"Discovery": {
@ -333,6 +362,24 @@
"LanguageDescription": "This is the language you would like the Ombi interface to be displayed in.",
"MobileQRCode":"Mobile QR Code",
"LegacyApp":"Launch Legacy App",
"NoQrCode":"Please contact your administrator to enable QR codes"
"NoQrCode":"Please contact your administrator to enable QR codes",
"UserType": "User Type:",
"ChangeDetails": "Change Details",
"NeedCurrentPassword": "You need your current password to make any changes here",
"CurrentPassword": "Current Password",
"EmailAddress": "Email Address",
"NewPassword": "New Password",
"NewPasswordConfirm": "New Password Confirm",
"Security": "Security",
"Profile": "Profile",
"UpdatedYourInformation": "Updated your information"
},
"UserTypeLabel": {
"1": "Local User",
"2": "Plex User",
"3": "Emby User",
"4": "Emby Connect User",
"5": "Jellyfin User"
}
}

Loading…
Cancel
Save