Added more translations

This commit is contained in:
Jamie 2017-10-31 14:57:53 +00:00
parent ffc392040d
commit 58c1eb57a9
35 changed files with 156 additions and 123 deletions

View file

@ -47,7 +47,7 @@ export class ResetPasswordComponent implements OnInit {
} }
this.identityService.submitResetPassword(form.value.email).subscribe(x => { this.identityService.submitResetPassword(form.value.email).subscribe(x => {
x.errors.forEach((val) => { x.errors.forEach((val) => {
this.notify.success("Password Reset", val); this.notify.success(val);
}); });
}); });
} else { } else {

View file

@ -44,7 +44,7 @@ export class TokenResetPasswordComponent implements OnInit {
const token = form.value as IResetPasswordToken; const token = form.value as IResetPasswordToken;
this.identityService.resetPassword(token).subscribe(x => { this.identityService.resetPassword(token).subscribe(x => {
if (x.successful) { if (x.successful) {
this.notify.success("Success", `Your Password has been reset`); this.notify.success(`Your Password has been reset`);
this.router.navigate(["login"]); this.router.navigate(["login"]);
} else { } else {
x.errors.forEach((val) => { x.errors.forEach((val) => {

View file

@ -74,7 +74,7 @@ export class MovieRequestsComponent implements OnInit {
if(available) { if(available) {
this.requestService.markMovieAvailable({ id: request.id }).subscribe(x => { this.requestService.markMovieAvailable({ id: request.id }).subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Available", this.notificationService.success(
`${request.title} Is now available`); `${request.title} Is now available`);
} else { } else {
this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage);
@ -84,7 +84,7 @@ export class MovieRequestsComponent implements OnInit {
} else { } else {
this.requestService.markMovieUnavailable({ id: request.id }).subscribe(x => { this.requestService.markMovieUnavailable({ id: request.id }).subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Available", this.notificationService.success(
`${request.title} Is now unavailable`); `${request.title} Is now unavailable`);
} else { } else {
this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage);
@ -140,7 +140,7 @@ export class MovieRequestsComponent implements OnInit {
.subscribe(x => { .subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Approved", this.notificationService.success(
`Request for ${request.title} has been approved successfully`); `Request for ${request.title} has been approved successfully`);
} else { } else {
this.notificationService.warning("Request Approved", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Approved", x.message ? x.message : x.errorMessage);

View file

@ -33,7 +33,7 @@ export class TvRequestChildrenComponent {
if(available) { if(available) {
this.requestService.markTvAvailable({ id: request.id }).subscribe(x => { this.requestService.markTvAvailable({ id: request.id }).subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Available", this.notificationService.success(
`This request is now available`); `This request is now available`);
} else { } else {
this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage);
@ -43,7 +43,7 @@ export class TvRequestChildrenComponent {
} else { } else {
this.requestService.markTvUnavailable({ id: request.id }).subscribe(x => { this.requestService.markTvUnavailable({ id: request.id }).subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Available", this.notificationService.success(
`This request is now unavailable`); `This request is now unavailable`);
} else { } else {
this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Available", x.message ? x.message : x.errorMessage);
@ -64,7 +64,7 @@ export class TvRequestChildrenComponent {
this.requestService.denyChild({ id: request.id }) this.requestService.denyChild({ id: request.id })
.subscribe(x => { .subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Denied", this.notificationService.success(
`Request has been denied successfully`); `Request has been denied successfully`);
} else { } else {
this.notificationService.warning("Request Denied", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Denied", x.message ? x.message : x.errorMessage);
@ -84,7 +84,7 @@ export class TvRequestChildrenComponent {
this.requestService.approveChild({ id: request.id }) this.requestService.approveChild({ id: request.id })
.subscribe(x => { .subscribe(x => {
if (x.result) { if (x.result) {
this.notificationService.success("Request Approved", this.notificationService.success(
`Request has been approved successfully`); `Request has been approved successfully`);
} else { } else {
this.notificationService.warning("Request Approved", x.message ? x.message : x.errorMessage); this.notificationService.warning("Request Approved", x.message ? x.message : x.errorMessage);

View file

@ -5,17 +5,17 @@
<div class="input-group-addon right-radius"> <div class="input-group-addon right-radius">
<div class="btn-group"> <div class="btn-group">
<a href="#" class="btn btn-sm btn-primary-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <a href="#" class="btn btn-sm btn-primary-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Suggestions {{ 'Search.Suggestions' | translate }}
<i class="fa fa-chevron-down"></i> <i class="fa fa-chevron-down"></i>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a (click)="popularMovies()">Popular Movies</a></li> <li><a (click)="popularMovies()" [translate]="'Search.Movies.PopularMovies'"></a></li>
<li><a (click)="upcomingMovies()">Upcoming Movies</a></li> <li><a (click)="upcomingMovies()" [translate]="'Search.Movies.UpcomingMovies'"></a></li>
<li><a (click)="topRatedMovies()">Top Rated Movies</a></li> <li><a (click)="topRatedMovies()" [translate]="'Search.Movies.TopRatedMovies'"></a></li>
<li><a (click)="nowPlayingMovies()">Now Playing Movies</a></li> <li><a (click)="nowPlayingMovies()" [translate]="'Search.Movies.NowPlayingMovies'"></a></li>
</ul> </ul>
</div> </div>
<i id="movieSearchButton" class="fa fa-search"></i> <i class="fa fa-search"></i>
</div> </div>
</div> </div>
<br /> <br />
@ -23,14 +23,12 @@
<!-- Movie content --> <!-- Movie content -->
<div id="movieList"> <div id="movieList">
<div *ngIf="searchApplied && movieResults?.length <= 0" class='no-search-results'> <div *ngIf="searchApplied && movieResults?.length <= 0" class='no-search-results'>
<i class='fa fa-film no-search-results-icon'></i><div class='no-search-results-text'>Sorry, we didn't find any results!</div> <i class='fa fa-film no-search-results-icon'></i><div class='no-search-results-text' [translate]="'Search.NoResults'"></div>
</div> </div>
<div *ngFor="let result of movieResults"> <div *ngFor="let result of movieResults">
<div class="row"> <div class="row">
<div id="{{id}}imgDiv" class="col-sm-2"> <div class="col-sm-2">
<img *ngIf="result.posterPath" class="img-responsive poster" src="https://image.tmdb.org/t/p/w150/{{result.posterPath}}" alt="poster"> <img *ngIf="result.posterPath" class="img-responsive poster" src="https://image.tmdb.org/t/p/w150/{{result.posterPath}}" alt="poster">
</div> </div>
@ -40,21 +38,17 @@
<h4>{{result.title}} ({{result.releaseDate | date: 'yyyy'}})</h4> <h4>{{result.title}} ({{result.releaseDate | date: 'yyyy'}})</h4>
</a> </a>
<span *ngIf="result.releaseDate" class="label label-info" target="_blank">{{ 'Search.ReleaseDate' | translate }} {{result.releaseDate | date: 'dd/MM/yyyy'}}</span>
<span *ngIf="result.firstAired" class="label label-info" target="_blank">Air Date: {{result.firstAired | date: 'dd/MM/yyyy'}}</span> <a *ngIf="result.homepage" href="{{result.homepage}}" target="_blank"><span class="label label-info" [translate]="'Search.Movies.HomePage'"></span></a>
<a *ngIf="result.trailer" href="{{result.trailer}}" target="_blank"><span class="label label-info" [translate]="'Search.Movies.Trailer'"></span></a>
<span *ngIf="result.releaseDate" class="label label-info" target="_blank">Release Date: {{result.releaseDate | date: 'dd/MM/yyyy'}}</span>
<a *ngIf="result.homepage" href="{{result.homepage}}" target="_blank"><span class="label label-info">HomePage</span></a>
<a *ngIf="result.trailer" href="{{result.trailer}}" target="_blank"><span class="label label-info">Trailer</span></a>
<span *ngIf="result.quality" class="label label-success">{{result.quality}}p</span> <span *ngIf="result.quality" class="label label-success">{{result.quality}}p</span>
<ng-template [ngIf]="result.available"><span class="label label-success">Available</span></ng-template> <ng-template [ngIf]="result.available"><span class="label label-success" [translate]="'Common.Available'"></span></ng-template>
<ng-template [ngIf]="result.approved && !result.available"><span class="label label-info">Processing Request</span></ng-template> <ng-template [ngIf]="result.approved && !result.available"><span class="label label-info" [translate]="'Common.ProcessingRequest'"></span></ng-template>
<ng-template [ngIf]="result.requested && !result.approved && !result.available"><span class="label label-warning">Pending Approval</span></ng-template> <ng-template [ngIf]="result.requested && !result.approved && !result.available"><span class="label label-warning" [translate]="'Common.PendingApproval'"></span></ng-template>
<ng-template [ngIf]="!result.requested && !result.available && !result.approved"><span class="label label-danger">Not Requested</span></ng-template> <ng-template [ngIf]="!result.requested && !result.available && !result.approved"><span class="label label-danger" [translate]="'Common.NotRequested'"></span></ng-template>
@ -67,34 +61,25 @@
<div class="col-sm-2"> <div class="col-sm-2">
<input name="{{type}}Id" type="text" value="{{result.id}}" hidden="hidden"/>
<div *ngIf="result.available"> <div *ngIf="result.available">
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> Available</button> <button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> {{ 'Common.Available' | translate }}</button>
<div *ngIf="result.url">
<br/>
<br/>
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{result.url}}" target="_blank"><i class="fa fa-eye"></i> View In Plex</a>
</div>
</div> </div>
<div *ngIf="!result.available"> <div *ngIf="!result.available">
<div *ngIf="result.requested || result.approved; then requestedBtn else notRequestedBtn"></div> <div *ngIf="result.requested || result.approved; then requestedBtn else notRequestedBtn"></div>
<ng-template #requestedBtn> <ng-template #requestedBtn>
<button style="text-align: right" class="btn btn-primary-outline disabled" [disabled]><i class="fa fa-check"></i> Requested</button> <button style="text-align: right" class="btn btn-primary-outline disabled" [disabled]><i class="fa fa-check"></i> {{ 'Common.Requested' | translate }}</button>
</ng-template> </ng-template>
<ng-template #notRequestedBtn> <ng-template #notRequestedBtn>
<button id="{{result.id}}" style="text-align: right" class="btn btn-primary-outline" (click)="request(result)"> <button id="{{result.id}}" style="text-align: right" class="btn btn-primary-outline" (click)="request(result)">
<i *ngIf="result.requestProcessing" class="fa fa-circle-o-notch fa-spin fa-fw"></i> <i *ngIf="!result.requestProcessing && !result.processed" class="fa fa-plus"></i> <i *ngIf="result.requestProcessing" class="fa fa-circle-o-notch fa-spin fa-fw"></i> <i *ngIf="!result.requestProcessing && !result.processed" class="fa fa-plus"></i>
<i *ngIf="result.processed && !result.requestProcessing" class="fa fa-check"></i>Request</button> <i *ngIf="result.processed && !result.requestProcessing" class="fa fa-check"></i>{{ 'Common.Request' | translate }}</button>
</ng-template> </ng-template>
</div> </div>
<br/> <br/>
<div *ngIf="result.available"> <div *ngIf="result.available">
<a *ngIf="result.plexUrl" style="text-align: right" class="btn btn-sm btn-success-outline" href="{{result.plexUrl}}" target="_blank"><i class="fa fa-eye"></i> View On Plex</a> <a *ngIf="result.plexUrl" style="text-align: right" class="btn btn-sm btn-success-outline" href="{{result.plexUrl}}" target="_blank"><i class="fa fa-eye"></i> View On Plex</a>
</div> </div>
</div> </div>

View file

@ -1,4 +1,5 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { TranslateService } from "@ngx-translate/core";
import "rxjs/add/operator/debounceTime"; import "rxjs/add/operator/debounceTime";
import "rxjs/add/operator/distinctUntilChanged"; import "rxjs/add/operator/distinctUntilChanged";
import "rxjs/add/operator/map"; import "rxjs/add/operator/map";
@ -20,9 +21,12 @@ export class MovieSearchComponent implements OnInit {
public movieResults: ISearchMovieResult[]; public movieResults: ISearchMovieResult[];
public result: IRequestEngineResult; public result: IRequestEngineResult;
public searchApplied = false; public searchApplied = false;
private requestAddedText: string;
constructor(private searchService: SearchService, private requestService: RequestService, constructor(private searchService: SearchService, private requestService: RequestService,
private notificationService: NotificationService, private authService: AuthService) { private notificationService: NotificationService, private authService: AuthService,
private readonly translate: TranslateService) {
this.searchChanged this.searchChanged
.debounceTime(600) // Wait Xms afterthe last event before emitting last event .debounceTime(600) // Wait Xms afterthe last event before emitting last event
@ -52,6 +56,7 @@ export class MovieSearchComponent implements OnInit {
result: false, result: false,
errorMessage: "", errorMessage: "",
}; };
} }
public search(text: any) { public search(text: any) {
@ -71,9 +76,11 @@ export class MovieSearchComponent implements OnInit {
this.result = x; this.result = x;
if (this.result.result) { if (this.result.result) {
this.notificationService.success("Request Added",
`Request for ${searchResult.title} has been added successfully`); this.translate.get("Search.RequestAdded", searchResult.title).subscribe(x => {
searchResult.processed = true; this.notificationService.success(x);
searchResult.processed = true;
});
} else { } else {
if (this.result.errorMessage && this.result.message) { if (this.result.errorMessage && this.result.message) {
this.notificationService.warning("Request Added", `${this.result.message} - ${this.result.errorMessage}`); this.notificationService.warning("Request Added", `${this.result.message} - ${this.result.errorMessage}`);

View file

@ -72,7 +72,7 @@ export class MovieSearchGridComponent implements OnInit {
this.result = x; this.result = x;
if (this.result.result) { if (this.result.result) {
this.notificationService.success("Request Added", this.notificationService.success(
`Request for ${searchResult.title} has been added successfully`); `Request for ${searchResult.title} has been added successfully`);
searchResult.processed = true; searchResult.processed = true;
} else { } else {

View file

@ -1,5 +1,5 @@
<h1 id="searchTitle">Search</h1> <h1 [translate]="'Search.Title'"></h1>
<h4>Want to watch something that is not currently available? No problem, just search for it below and request it!</h4> <h4 [translate]="'Search.Paragraph'"></h4>
<br /> <br />
<!-- Nav tabs --> <!-- Nav tabs -->
@ -7,11 +7,11 @@
<ul id="nav-tabs" class="nav nav-tabs" role="tablist"> <ul id="nav-tabs" class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"> <li role="presentation" class="active">
<a id="movieTabButton" href="#MoviesTab" aria-controls="home" role="tab" data-toggle="tab" (click)="selectMovieTab()"><i class="fa fa-film"></i> Movies</a> <a id="movieTabButton" href="#MoviesTab" aria-controls="home" role="tab" data-toggle="tab" (click)="selectMovieTab()"><i class="fa fa-film"></i> {{ 'Search.MoviesTab' | translate }}</a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a id="tvTabButton" href="#TvShowTab" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectTvTab()"><i class="fa fa-television"></i> TV Shows</a> <a id="tvTabButton" href="#TvShowTab" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectTvTab()"><i class="fa fa-television"></i> {{ 'Search.TvTab' | translate }}</a>
</li> </li>
</ul> </ul>

View file

@ -18,6 +18,8 @@ import { SearchService } from "../services";
import { AuthGuard } from "../auth/auth.guard"; import { AuthGuard } from "../auth/auth.guard";
import { SharedModule } from "../shared/shared.module";
const routes: Routes = [ const routes: Routes = [
{ path: "search", component: SearchComponent, canActivate: [AuthGuard] }, { path: "search", component: SearchComponent, canActivate: [AuthGuard] },
{ path: "search/show/:id", component: SeriesInformationComponent, canActivate: [AuthGuard] }, { path: "search/show/:id", component: SeriesInformationComponent, canActivate: [AuthGuard] },
@ -30,6 +32,7 @@ const routes: Routes = [
RouterModule.forChild(routes), RouterModule.forChild(routes),
NgbModule.forRoot(), NgbModule.forRoot(),
TreeTableModule, TreeTableModule,
SharedModule,
], ],
declarations: [ declarations: [
SearchComponent, SearchComponent,

View file

@ -44,7 +44,7 @@ export class SeriesInformationComponent implements OnInit, OnDestroy {
.subscribe(x => { .subscribe(x => {
this.result = x as IRequestEngineResult; this.result = x as IRequestEngineResult;
if (this.result.result) { if (this.result.result) {
this.notificationService.success("Request Added", this.notificationService.success(
`Request for ${this.series.title} has been added successfully`); `Request for ${this.series.title} has been added successfully`);
this.series.seasonRequests.forEach((season) => { this.series.seasonRequests.forEach((season) => {

View file

@ -155,7 +155,7 @@ export class TvSearchComponent implements OnInit, OnDestroy {
.subscribe(x => { .subscribe(x => {
this.result = x; this.result = x;
if (this.result.result) { if (this.result.result) {
this.notificationService.success("Request Added", this.notificationService.success(
`Request for ${searchResult.title} has been added successfully`); `Request for ${searchResult.title} has been added successfully`);
} else { } else {
if (this.result.errorMessage && this.result.message) { if (this.result.errorMessage && this.result.message) {

View file

@ -10,8 +10,8 @@ export class NotificationService {
this.messages = JSON.parse(JSON.stringify(this.messages)); // NOTE: THIS IS A HACK AROUND A BUG https://github.com/primefaces/primeng/issues/2943 this.messages = JSON.parse(JSON.stringify(this.messages)); // NOTE: THIS IS A HACK AROUND A BUG https://github.com/primefaces/primeng/issues/2943
} }
public success(title: string, body: string) { public success(body: string) {
this.addMessage({ severity: "success", detail: body, summary: title }); this.addMessage({ severity: "success", detail: body });
} }
public info(title: string, body: string) { public info(title: string, body: string) {

View file

@ -59,9 +59,9 @@ export class CouchPotatoComponent implements OnInit {
this.settingsService.saveCouchPotatoSettings(settings).subscribe(x => { this.settingsService.saveCouchPotatoSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the CouchPotato settings"); this.notificationService.success("Successfully saved the CouchPotato settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the CouchPotato settings"); this.notificationService.success("There was an error when saving the CouchPotato settings");
} }
}); });
} }
@ -74,7 +74,7 @@ export class CouchPotatoComponent implements OnInit {
const settings = form.value; const settings = form.value;
this.testerService.couchPotatoTest(settings).subscribe(x => { this.testerService.couchPotatoTest(settings).subscribe(x => {
if (x === true) { if (x === true) {
this.notificationService.success("Connected", "Successfully connected to CouchPotato!"); this.notificationService.success("Successfully connected to CouchPotato!");
} else { } else {
this.notificationService.error("We could not connect to CouchPotato!"); this.notificationService.error("We could not connect to CouchPotato!");
} }
@ -85,7 +85,7 @@ export class CouchPotatoComponent implements OnInit {
this.couchPotatoService.getApiKey(form.value).subscribe(x => { this.couchPotatoService.getApiKey(form.value).subscribe(x => {
if (x.success === true) { if (x.success === true) {
(<FormControl>this.form.controls.apiKey).setValue(x.api_key); (<FormControl>this.form.controls.apiKey).setValue(x.api_key);
this.notificationService.success("Api Key", "Successfully got the Api Key"); this.notificationService.success("Successfully grabbed the Api Key");
} else { } else {
this.notificationService.error("Could not get the Api Key"); this.notificationService.error("Could not get the Api Key");
} }

View file

@ -21,9 +21,9 @@ export class CustomizationComponent implements OnInit {
public save() { public save() {
this.settingsService.saveCustomization(this.settings).subscribe(x => { this.settingsService.saveCustomization(this.settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Ombi settings"); this.notificationService.success("Successfully saved Ombi settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Ombi settings"); this.notificationService.success("There was an error when saving the Ombi settings");
} }
}); });
} }

View file

@ -37,9 +37,9 @@ export class DogNzbComponent implements OnInit {
this.settingsService.saveDogNzbSettings(settings).subscribe(x => { this.settingsService.saveDogNzbSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the DogNzb settings"); this.notificationService.success("Successfully saved the DogNzb settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the DogNzb settings"); this.notificationService.success("There was an error when saving the DogNzb settings");
} }
}); });
} }

View file

@ -39,7 +39,7 @@ export class EmbyComponent implements OnInit {
public test(server: IEmbyServer) { public test(server: IEmbyServer) {
this.testerService.embyTest(server).subscribe(x => { this.testerService.embyTest(server).subscribe(x => {
if (x === true) { if (x === true) {
this.notificationService.success("Connected", `Successfully connected to the Emby server ${server.name}!`); this.notificationService.success(`Successfully connected to the Emby server ${server.name}!`);
} else { } else {
this.notificationService.error(`We could not connect to the Emby server ${server.name}!`); this.notificationService.error(`We could not connect to the Emby server ${server.name}!`);
} }
@ -56,9 +56,9 @@ export class EmbyComponent implements OnInit {
public save() { public save() {
this.settingsService.saveEmby(this.settings).subscribe(x => { this.settingsService.saveEmby(this.settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Emby settings"); this.notificationService.success("Successfully saved Emby settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Emby settings"); this.notificationService.success("There was an error when saving the Emby settings");
} }
}); });
} }
@ -66,7 +66,7 @@ export class EmbyComponent implements OnInit {
public runCacher(): void { public runCacher(): void {
this.jobService.runEmbyCacher().subscribe(x => { this.jobService.runEmbyCacher().subscribe(x => {
if(x) { if(x) {
this.notificationService.success("Running","Triggered the Emby Content Cacher"); this.notificationService.success("Triggered the Emby Content Cacher");
} }
}); });
} }

View file

@ -22,9 +22,9 @@ export class LandingPageComponent implements OnInit {
public save() { public save() {
this.settingsService.saveLandingPage(this.settings).subscribe(x => { this.settingsService.saveLandingPage(this.settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the Landing Page settings"); this.notificationService.success("Successfully saved the Landing Page settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Landing Page settings"); this.notificationService.success("There was an error when saving the Landing Page settings");
} }
}); });
} }

View file

@ -44,9 +44,9 @@ export class DiscordComponent implements OnInit {
this.settingsService.saveDiscordNotificationSettings(settings).subscribe(x => { this.settingsService.saveDiscordNotificationSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the Discord settings"); this.notificationService.success("Successfully saved the Discord settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Discord settings"); this.notificationService.success("There was an error when saving the Discord settings");
} }
}); });
@ -60,9 +60,9 @@ export class DiscordComponent implements OnInit {
this.testerService.discordTest(form.value).subscribe(x => { this.testerService.discordTest(form.value).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Successful", "Successfully sent a Discord message, please check the discord channel"); this.notificationService.success("Successfully sent a Discord message, please check the discord channel");
} else { } else {
this.notificationService.success("Error", "There was an error when sending the Discord message. Please check your settings"); this.notificationService.error("There was an error when sending the Discord message. Please check your settings");
} }
}); });

View file

@ -59,9 +59,9 @@ export class EmailNotificationComponent implements OnInit {
this.settingsService.saveEmailNotificationSettings(settings).subscribe(x => { this.settingsService.saveEmailNotificationSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Email settings"); this.notificationService.success("Successfully saved Email settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Email settings"); this.notificationService.success("There was an error when saving the Email settings");
} }
}); });
@ -75,9 +75,9 @@ export class EmailNotificationComponent implements OnInit {
this.testerService.emailTest(form.value).subscribe(x => { this.testerService.emailTest(form.value).subscribe(x => {
if (x === true) { if (x === true) {
this.notificationService.success("Sent", "Successfully sent an email message, please check your inbox"); this.notificationService.success("Successfully sent an email message, please check your inbox");
} else { } else {
this.notificationService.success("Error", "There was an error when sending the Email message, please check your settings."); this.notificationService.error("There was an error when sending the Email message, please check your settings.");
} }
}); });
} }

View file

@ -46,9 +46,9 @@ export class MattermostComponent implements OnInit {
this.settingsService.saveMattermostNotificationSettings(settings).subscribe(x => { this.settingsService.saveMattermostNotificationSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the Mattermost settings"); this.notificationService.success("Successfully saved the Mattermost settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Mattermost settings"); this.notificationService.success("There was an error when saving the Mattermost settings");
} }
}); });
@ -62,9 +62,9 @@ export class MattermostComponent implements OnInit {
this.testerService.mattermostTest(form.value).subscribe(x => { this.testerService.mattermostTest(form.value).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Successful", "Successfully sent a Mattermost message, please check the discord channel"); this.notificationService.success( "Successfully sent a Mattermost message, please check the discord channel");
} else { } else {
this.notificationService.success("Error", "There was an error when sending the Mattermost message. Please check your settings"); this.notificationService.error("There was an error when sending the Mattermost message. Please check your settings");
} }
}); });

View file

@ -42,9 +42,9 @@ export class PushbulletComponent implements OnInit {
this.settingsService.savePushbulletNotificationSettings(settings).subscribe(x => { this.settingsService.savePushbulletNotificationSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the Pushbullet settings"); this.notificationService.success("Successfully saved the Pushbullet settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Pushbullet settings"); this.notificationService.success("There was an error when saving the Pushbullet settings");
} }
}); });
@ -58,9 +58,9 @@ export class PushbulletComponent implements OnInit {
this.testerService.pushbulletTest(form.value).subscribe(x => { this.testerService.pushbulletTest(form.value).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Successful", "Successfully sent a Pushbullet message"); this.notificationService.success("Successfully sent a Pushbullet message");
} else { } else {
this.notificationService.success("Error", "There was an error when sending the Pushbullet message. Please check your settings"); this.notificationService.error("There was an error when sending the Pushbullet message. Please check your settings");
} }
}); });

View file

@ -42,9 +42,9 @@ export class PushoverComponent implements OnInit {
this.settingsService.savePushoverNotificationSettings(settings).subscribe(x => { this.settingsService.savePushoverNotificationSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the Pushover settings"); this.notificationService.success( "Successfully saved the Pushover settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Pushover settings"); this.notificationService.success("There was an error when saving the Pushover settings");
} }
}); });
@ -58,9 +58,9 @@ export class PushoverComponent implements OnInit {
this.testerService.pushoverTest(form.value).subscribe(x => { this.testerService.pushoverTest(form.value).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Successful", "Successfully sent a Pushover message"); this.notificationService.success( "Successfully sent a Pushover message");
} else { } else {
this.notificationService.success("Error", "There was an error when sending the Pushover message. Please check your settings"); this.notificationService.error("There was an error when sending the Pushover message. Please check your settings");
} }
}); });
} }

View file

@ -51,9 +51,9 @@ export class SlackComponent implements OnInit {
this.settingsService.saveSlackNotificationSettings(settings).subscribe(x => { this.settingsService.saveSlackNotificationSettings(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved the Slack settings"); this.notificationService.success( "Successfully saved the Slack settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Slack settings"); this.notificationService.success( "There was an error when saving the Slack settings");
} }
}); });
@ -73,9 +73,9 @@ export class SlackComponent implements OnInit {
} }
this.testerService.slackTest(settings).subscribe(x => { this.testerService.slackTest(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Successful", "Successfully sent a Slack message, please check the discord channel"); this.notificationService.success( "Successfully sent a Slack message, please check the discord channel");
} else { } else {
this.notificationService.success("Error", "There was an error when sending the Slack message. Please check your settings"); this.notificationService.error("There was an error when sending the Slack message. Please check your settings");
} }
}); });

View file

@ -40,14 +40,14 @@ export class OmbiComponent implements OnInit {
this.settingsService.saveOmbi(form.value).subscribe(x => { this.settingsService.saveOmbi(form.value).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Ombi settings"); this.notificationService.success("Successfully saved Ombi settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Ombi settings"); this.notificationService.success("There was an error when saving the Ombi settings");
} }
}); });
} }
public successfullyCopied() { public successfullyCopied() {
this.notificationService.success("Copied", "Copied the Api Key to the clipboard!"); this.notificationService.success("Copied the Api Key to the clipboard!");
} }
} }

View file

@ -40,7 +40,7 @@ export class PlexComponent implements OnInit, OnDestroy {
if (x.success) { if (x.success) {
this.loadedServers = x; this.loadedServers = x;
this.serversButton = true; this.serversButton = true;
this.notificationService.success("Loaded", "Found the servers! Please select one!"); this.notificationService.success("Found the servers! Please select one!");
} else { } else {
this.notificationService.warning("Error When Requesting Plex Servers", "Please make sure your username and password are correct"); this.notificationService.warning("Error When Requesting Plex Servers", "Please make sure your username and password are correct");
} }
@ -55,13 +55,13 @@ export class PlexComponent implements OnInit, OnDestroy {
server.port = parseInt(selectedServer.port); server.port = parseInt(selectedServer.port);
server.ssl = selectedServer.scheme === "http" ? false : true; server.ssl = selectedServer.scheme === "http" ? false : true;
this.notificationService.success("Success", `Selected ${server.name}!`); this.notificationService.success(`Selected ${server.name}!`);
} }
public testPlex(server: IPlexServer) { public testPlex(server: IPlexServer) {
this.testerService.plexTest(server).subscribe(x => { this.testerService.plexTest(server).subscribe(x => {
if (x === true) { if (x === true) {
this.notificationService.success("Connected", `Successfully connected to the Plex server ${server.name}!`); this.notificationService.success(`Successfully connected to the Plex server ${server.name}!`);
} else { } else {
this.notificationService.error(`We could not connect to the Plex server ${server.name}!`); this.notificationService.error(`We could not connect to the Plex server ${server.name}!`);
} }
@ -111,9 +111,9 @@ export class PlexComponent implements OnInit, OnDestroy {
this.settings.servers = filtered; this.settings.servers = filtered;
this.settingsService.savePlex(this.settings).subscribe(x => { this.settingsService.savePlex(this.settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Plex settings"); this.notificationService.success("Successfully saved Plex settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Plex settings"); this.notificationService.success("There was an error when saving the Plex settings");
} }
}); });
} }
@ -121,7 +121,7 @@ export class PlexComponent implements OnInit, OnDestroy {
public runCacher(): void { public runCacher(): void {
this.jobService.runPlexCacher().subscribe(x => { this.jobService.runPlexCacher().subscribe(x => {
if(x) { if(x) {
this.notificationService.success("Running","Triggered the Plex Content Cacher"); this.notificationService.success("Triggered the Plex Content Cacher");
} }
}); });
} }

View file

@ -73,7 +73,7 @@ export class RadarrComponent implements OnInit {
this.qualities.unshift({ name: "Please Select", id: -1 }); this.qualities.unshift({ name: "Please Select", id: -1 });
this.profilesRunning = false; this.profilesRunning = false;
this.notificationService.success("Quality Profiles", "Successfully retrieved the Quality Profiles"); this.notificationService.success("Successfully retrieved the Quality Profiles");
}); });
} }
@ -84,7 +84,7 @@ export class RadarrComponent implements OnInit {
this.rootFolders.unshift({ path: "Please Select", id: -1 }); this.rootFolders.unshift({ path: "Please Select", id: -1 });
this.rootFoldersRunning = false; this.rootFoldersRunning = false;
this.notificationService.success("Settings Saved", "Successfully retrieved the Root Folders"); this.notificationService.success("Successfully retrieved the Root Folders");
}); });
} }
@ -96,7 +96,7 @@ export class RadarrComponent implements OnInit {
const settings = <IRadarrSettings>form.value; const settings = <IRadarrSettings>form.value;
this.testerService.radarrTest(settings).subscribe(x => { this.testerService.radarrTest(settings).subscribe(x => {
if (x === true) { if (x === true) {
this.notificationService.success("Connected", "Successfully connected to Radarr!"); this.notificationService.success("Successfully connected to Radarr!");
} else { } else {
this.notificationService.error("We could not connect to Radarr!"); this.notificationService.error("We could not connect to Radarr!");
} }
@ -116,9 +116,9 @@ public onSubmit(form: FormGroup) {
const settings = <IRadarrSettings>form.value; const settings = <IRadarrSettings>form.value;
this.settingsService.saveRadarr(settings).subscribe(x => { this.settingsService.saveRadarr(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Radarr settings"); this.notificationService.success("Successfully saved Radarr settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Radarr settings"); this.notificationService.success("There was an error when saving the Radarr settings");
} }
}); });

View file

@ -66,7 +66,7 @@ export class SonarrComponent implements OnInit {
this.qualities.unshift({ name: "Please Select", id: -1 }); this.qualities.unshift({ name: "Please Select", id: -1 });
this.profilesRunning = false; this.profilesRunning = false;
this.notificationService.success("Quality Profiles", "Successfully retrieved the Quality Profiles"); this.notificationService.success("Successfully retrieved the Quality Profiles");
}); });
} }
@ -78,7 +78,7 @@ export class SonarrComponent implements OnInit {
this.rootFolders.unshift({ path: "Please Select", id: -1 }); this.rootFolders.unshift({ path: "Please Select", id: -1 });
this.rootFoldersRunning = false; this.rootFoldersRunning = false;
this.notificationService.success("Settings Saved", "Successfully retrieved the Root Folders"); this.notificationService.success("Successfully retrieved the Root Folders");
}); });
} }
@ -90,7 +90,7 @@ export class SonarrComponent implements OnInit {
const settings = <ISonarrSettings>form.value; const settings = <ISonarrSettings>form.value;
this.testerService.sonarrTest(settings).subscribe(x => { this.testerService.sonarrTest(settings).subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Connected", "Successfully connected to Sonarr!"); this.notificationService.success("Successfully connected to Sonarr!");
} else { } else {
this.notificationService.error("We could not connect to Sonarr!"); this.notificationService.error("We could not connect to Sonarr!");
} }
@ -116,7 +116,7 @@ export class SonarrComponent implements OnInit {
this.settingsService.saveSonarr(form.value) this.settingsService.saveSonarr(form.value)
.subscribe(x => { .subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Sonarr settings"); this.notificationService.success("Successfully saved Sonarr settings");
} else { } else {
this.notificationService.error("There was an error when saving the Sonarr settings"); this.notificationService.error("There was an error when saving the Sonarr settings");
} }

View file

@ -42,16 +42,16 @@ export class UpdateComponent implements OnInit {
this.updateService.checkForNewUpdate().subscribe(x => { this.updateService.checkForNewUpdate().subscribe(x => {
if (x === true) { if (x === true) {
this.updateAvailable = true; this.updateAvailable = true;
this.notificationService.success("Update", "There is a new update available"); this.notificationService.success("There is a new update available");
} else { } else {
this.notificationService.success("Update", "You are on the latest version!"); this.notificationService.success("You are on the latest version!");
} }
}); });
} }
public update() { public update() {
this.updateService.forceUpdate().subscribe(); this.updateService.forceUpdate().subscribe();
this.notificationService.success("Update", "We triggered the update job"); this.notificationService.success("We triggered the update job");
} }
public onSubmit(form: FormGroup) { public onSubmit(form: FormGroup) {
@ -63,7 +63,7 @@ export class UpdateComponent implements OnInit {
this.settingsService.saveUpdateSettings(form.value) this.settingsService.saveUpdateSettings(form.value)
.subscribe(x => { .subscribe(x => {
if (x) { if (x) {
this.notificationService.success("Settings Saved", "Successfully saved Update settings"); this.notificationService.success("Successfully saved Update settings");
} else { } else {
this.notificationService.error("There was an error when saving the Update settings"); this.notificationService.error("There was an error when saving the Update settings");
} }

View file

@ -95,9 +95,9 @@ export class UserManagementComponent implements OnInit {
this.settingsService.saveUserManagementSettings(this.settings).subscribe(x => { this.settingsService.saveUserManagementSettings(this.settings).subscribe(x => {
if (x === true) { if (x === true) {
this.notificationService.success("Saved", "Successfully saved the User Management Settings"); this.notificationService.success("Successfully saved the User Management Settings");
} else { } else {
this.notificationService.success("Settings Saved", "There was an error when saving the Ombi settings"); this.notificationService.success( "There was an error when saving the Ombi settings");
} }
}); });
} }

View file

@ -0,0 +1,13 @@
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { TranslateModule } from "@ngx-translate/core";
@NgModule({
exports: [
TranslateModule,
CommonModule,
FormsModule,
],
})
export class SharedModule {}

View file

@ -46,7 +46,7 @@ export class UpdateDetailsComponent implements OnInit {
this.identityService.updateLocalUser(this.form.value).subscribe(x => { this.identityService.updateLocalUser(this.form.value).subscribe(x => {
if (x.successful) { if (x.successful) {
this.notificationService.success("Updated", `All of your details have now been updated`); this.notificationService.success(`All of your details have now been updated`);
} else { } else {
x.errors.forEach((val) => { x.errors.forEach((val) => {
this.notificationService.error(val); this.notificationService.error(val);

View file

@ -54,7 +54,7 @@ export class UserManagementAddComponent implements OnInit {
this.identityService.createUser(this.user).subscribe(x => { this.identityService.createUser(this.user).subscribe(x => {
if (x.successful) { if (x.successful) {
this.notificationSerivce.success("Updated", `The user ${this.user.userName} has been created successfully`); this.notificationSerivce.success(`The user ${this.user.userName} has been created successfully`);
this.router.navigate(["usermanagement"]); this.router.navigate(["usermanagement"]);
} else { } else {
x.errors.forEach((val) => { x.errors.forEach((val) => {

View file

@ -38,7 +38,7 @@ export class UserManagementEditComponent {
accept: () => { accept: () => {
this.identityService.deleteUser(this.user).subscribe(x => { this.identityService.deleteUser(this.user).subscribe(x => {
if (x.successful) { if (x.successful) {
this.notificationService.success("Deleted", `The user ${this.user.userName} was deleted`); this.notificationService.success(`The user ${this.user.userName} was deleted`);
this.router.navigate(["usermanagement"]); this.router.navigate(["usermanagement"]);
} else { } else {
x.errors.forEach((val) => { x.errors.forEach((val) => {
@ -57,7 +57,7 @@ export class UserManagementEditComponent {
public resetPassword() { public resetPassword() {
this.identityService.submitResetPassword(this.user.emailAddress).subscribe(x => { this.identityService.submitResetPassword(this.user.emailAddress).subscribe(x => {
if (x.successful) { if (x.successful) {
this.notificationService.success("Reset", `Sent reset password email to ${this.user.emailAddress}`); this.notificationService.success(`Sent reset password email to ${this.user.emailAddress}`);
this.router.navigate(["usermanagement"]); this.router.navigate(["usermanagement"]);
} else { } else {
x.errors.forEach((val) => { x.errors.forEach((val) => {
@ -82,7 +82,7 @@ export class UserManagementEditComponent {
this.identityService.updateUser(this.user).subscribe(x => { this.identityService.updateUser(this.user).subscribe(x => {
if (x.successful) { if (x.successful) {
this.notificationService.success("Updated", `The user ${this.user.userName} has been updated successfully`); this.notificationService.success(`The user ${this.user.userName} has been updated successfully`);
this.router.navigate(["usermanagement"]); this.router.navigate(["usermanagement"]);
} else { } else {
x.errors.forEach((val) => { x.errors.forEach((val) => {

View file

@ -37,7 +37,7 @@ export class UserManagementComponent implements OnInit {
return; return;
} }
this.identityService.sendWelcomeEmail(user).subscribe(); this.identityService.sendWelcomeEmail(user).subscribe();
this.notificationService.success("Email", `Sent a welcome email to ${user.emailAddress}`); this.notificationService.success(`Sent a welcome email to ${user.emailAddress}`);
} }
public checkAllBoxes() { public checkAllBoxes() {

View file

@ -11,6 +11,12 @@
}, },
"Common":{ "Common":{
"ContinueButton":"Continue", "ContinueButton":"Continue",
"Available":"Available",
"ProcessingRequest":"Processing Request",
"PendingApproval":"Pending Approval",
"NotRequested":"Not Requested",
"Requested":"Requested",
"Request":"Request",
"Errors":{ "Errors":{
"Validation":"Please check your entered values" "Validation":"Please check your entered values"
} }
@ -53,5 +59,24 @@
"Danish":"Danish", "Danish":"Danish",
"Dutch":"Dutch" "Dutch":"Dutch"
} }
},
"Search":{
"Title":"Search",
"Paragraph":"Want to watch something that is not currently available? No problem, just search for it below and request it!",
"MoviesTab":"Movies",
"TvTab":"TV Shows",
"Suggestions":"Suggestions",
"NoResults":"Sorry, we didn't find any results!",
"ReleaseDate" : "Release Date",
"ViewOnPlex":"View On Plex",
"RequestAdded":"Request for {{title}} has been added successfully",
"Movies":{
"PopularMovies":"Popular Movies",
"UpcomingMovies":"Upcoming Movies",
"TopRatedMovies":"Top Rated Movies",
"NowPlayingMovies":"Now Playing Movies",
"HomePage":"Home Page",
"Trailer":"Trailer"
}
} }
} }