From 967109f4b2623dfd843d0d84c66c313ea2a03c5b Mon Sep 17 00:00:00 2001 From: Kenton Royal Date: Mon, 27 Aug 2018 16:04:46 +0100 Subject: [PATCH] Refactor code --- .../app/requests/remainingrequests.component.html | 8 ++++---- .../ClientApp/app/requests/remainingrequests.component.ts | 4 ---- src/Ombi/wwwroot/translations/en.json | 4 +--- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Ombi/ClientApp/app/requests/remainingrequests.component.html b/src/Ombi/ClientApp/app/requests/remainingrequests.component.html index 565de7473..11cd28b34 100644 --- a/src/Ombi/ClientApp/app/requests/remainingrequests.component.html +++ b/src/Ombi/ClientApp/app/requests/remainingrequests.component.html @@ -3,13 +3,13 @@ {{'Requests.Remaining.Quota' | translate: {remaining: remaining.remaining, total: remaining.limit} }}

- {{daysUntil == 1 ? 'Requests.Remaining.NextDay' : "Requests.Remaining.NextDays" | translate: {time: daysUntil} }} + {{'Requests.Remaining.NextDays' | translate: {time: daysUntil} }}

- {{hoursUntil == 1 ? 'Requests.Remaining.NextHour' : "Requests.Remaining.NextHours" | translate: {time: hoursUntil} }} + {{'Requests.Remaining.NextHours' | translate: {time: hoursUntil} }}

-

- {{minutesUntil == 1 ? 'Requests.Remaining.NextMinute' : "Requests.Remaining.NextMinutes" | translate: {time: minutesUntil} }} +

+ {{(minutesUntil == 1 ? 'Requests.Remaining.NextMinute' : 'Requests.Remaining.NextMinutes') | translate: {time: minutesUntil} }}

diff --git a/src/Ombi/ClientApp/app/requests/remainingrequests.component.ts b/src/Ombi/ClientApp/app/requests/remainingrequests.component.ts index 4f4439c13..980256d69 100644 --- a/src/Ombi/ClientApp/app/requests/remainingrequests.component.ts +++ b/src/Ombi/ClientApp/app/requests/remainingrequests.component.ts @@ -27,10 +27,6 @@ export class RemainingRequestsComponent implements OnInit { this.update(); }); - setInterval(() => { - self.calculateTime(); - }, 10000); - setInterval(() => { self.update(); }, 60000); diff --git a/src/Ombi/wwwroot/translations/en.json b/src/Ombi/wwwroot/translations/en.json index a2c7f20dc..46be04a6b 100644 --- a/src/Ombi/wwwroot/translations/en.json +++ b/src/Ombi/wwwroot/translations/en.json @@ -149,9 +149,7 @@ "Remaining": { "Quota": "{{remaining}}/{{total}} requests remaining", "NextDays": "Another request will be added in {{time}} days", - "NextDay": "Another request will be added in {{time}} day", - "NextHours": "Another request will be added in {{time} hours", - "NextHour": "Another request will be added in {{time} hour", + "NextHours": "Another request will be added in {{time}} hours", "NextMinutes": "Another request will be added in {{time}} minutes", "NextMinute": "Another request will be added in {{time}} minute" }