Localize albums requests

This commit is contained in:
Florian Dupret 2021-10-22 17:21:28 +02:00
commit 359c9f0b82
4 changed files with 19 additions and 10 deletions

View file

@ -9,7 +9,7 @@ namespace Ombi.Core.Engine
public string Message { get; set; }
public bool IsError => !string.IsNullOrEmpty(ErrorMessage);
public string ErrorMessage { get; set; }
public ErrorCode ErrorCode { get; set; }
public ErrorCode? ErrorCode { get; set; }
public int RequestId { get; set; }
}

View file

@ -8,6 +8,7 @@ import { AuthService } from "../../../auth/auth.service";
import { DenyDialogComponent } from "../shared/deny-dialog/deny-dialog.component";
import { NewIssueComponent } from "../shared/new-issue/new-issue.component";
import { IArtistSearchResult, IReleaseGroups } from "../../../interfaces/IMusicSearchResultV2";
import { TranslateService } from "@ngx-translate/core";
@Component({
templateUrl: "./artist-details.component.html",
@ -26,7 +27,8 @@ export class ArtistDetailsComponent {
constructor(private searchService: SearchV2Service, private route: ActivatedRoute,
private sanitizer: DomSanitizer, private imageService: ImageService,
public dialog: MatDialog, private requestService: RequestService,
public messageService: MessageService, private auth: AuthService) {
public messageService: MessageService, private auth: AuthService,
private translate: TranslateService) {
this.route.params.subscribe((params: any) => {
this.artistId = params.artistId;
this.load();
@ -92,7 +94,7 @@ export class ArtistDetailsComponent {
.then(r => {
if (r.result) {
a.monitored = true;
this.messageService.send(r.message);
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", {title: a.title}));
} else {
this.messageService.sendRequestEngineResultError(r);
}
@ -115,7 +117,7 @@ export class ArtistDetailsComponent {
.then(r => {
if (r.result) {
a.monitored = true;
this.messageService.send(r.message);
this.messageService.send(this.translate.instant("Requests.RequestAddedSuccessfully", {title: a.title}));
} else {
this.messageService.sendRequestEngineResultError(r);
}

View file

@ -1,18 +1,18 @@
<div *ngIf="artist">
<div>
<strong>Type:</strong>
<strong>{{ 'MediaDetails.Music.Type' | translate }}</strong>
<div>{{artist.type}}</div>
</div>
<div>
<strong>Country</strong>
<strong>{{ 'MediaDetails.Music.Country' | translate }}</strong>
<div>{{artist.country}}</div>
</div>
<div>
<strong>Start Date</strong>
<strong>{{ 'MediaDetails.Music.StartDate' | translate }}</strong>
<div>{{artist.startYear}}</div>
</div>
<div *ngIf="artist.endYear">
<strong>End Date</strong>
<strong>{{ 'MediaDetails.Music.EndDate' | translate }}</strong>
<div>{{artist.endYear}}</div>
</div>
</div>

View file

@ -37,7 +37,8 @@
"Submit": "Submit",
"Update": "Update",
"tvShow": "TV Show",
"movie": "Movie"
"movie": "Movie",
"album": "Album"
},
"PasswordReset": {
"EmailAddressPlaceholder": "Email Address",
@ -344,7 +345,13 @@
"RequestedBy": "Requested By:",
"RequestDate": "Request Date:",
"DeniedReason": "Denied Reason:",
"ReProcessRequest": "Re-Process Request"
"ReProcessRequest": "Re-Process Request",
"Music": {
"Type": "Type:",
"Country": "Country:",
"StartDate": "Start Date:",
"EndDate": "EndDate:"
}
},
"Discovery": {
"PopularTab": "Popular",