mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 16:22:55 -07:00
Add to translations
This commit is contained in:
parent
30c9de818b
commit
c9b6f5f05e
5 changed files with 25 additions and 4 deletions
|
@ -491,6 +491,12 @@ namespace Ombi.Core.Engine
|
|||
if (user == null)
|
||||
{
|
||||
user = await GetUser();
|
||||
|
||||
// If user is still null after attempting to get the logged in user, return null.
|
||||
if (user == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
int limit = user.MovieRequestLimit ?? 0;
|
||||
|
|
|
@ -620,6 +620,12 @@ namespace Ombi.Core.Engine
|
|||
if (user == null)
|
||||
{
|
||||
user = await GetUser();
|
||||
|
||||
// If user is still null after attempting to get the logged in user, return null.
|
||||
if (user == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
int limit = user.EpisodeRequestLimit ?? 0;
|
||||
|
|
|
@ -93,18 +93,18 @@
|
|||
</td>
|
||||
<td class="td-labelled" data-label="Requests Remaining">
|
||||
<div *ngIf="u.movieRequestQuota != null && u.movieRequestQuota.hasLimit">
|
||||
Movies: {{u.movieRequestQuota.remaining}}/{{u.movieRequestLimit}} remaining
|
||||
{{'UserManagment.MovieRemaining' | translate: {remaining: u.movieRequestQuota.remaining, total: u.movieRequestLimit} }}
|
||||
</div>
|
||||
<div *ngIf="u.episodeRequestQuota != null && u.episodeRequestQuota.hasLimit">
|
||||
TV: {{u.episodeRequestQuota.remaining}}/{{u.episodeRequestLimit}} remaining
|
||||
{{'UserManagment.TvRemaining' | translate: {remaining: u.episodeRequestQuota.remaining, total: u.episodeRequestLimit} }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="td-labelled" data-label="Request Due">
|
||||
<div *ngIf="u.movieRequestQuota != null && u.movieRequestQuota.remaining != u.movieRequestLimit">
|
||||
Movie: {{u.movieRequestQuota.nextRequest | date: 'short'}}
|
||||
{{'UserManagment.MovieDue' | translate: {date: (u.movieRequestQuota.nextRequest | date: 'short')} }}
|
||||
</div>
|
||||
<div *ngIf="u.episodeRequestQuota != null && u.episodeRequestQuota.remaining != u.episodeRequestLimit">
|
||||
TV: {{u.episodeRequestQuota.nextRequest | date: 'short'}}
|
||||
{{'UserManagment.TvDue' | translate: {date: (u.episodeRequestQuota.nextRequest | date: 'short')} }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="td-labelled" data-label="Last Logged In:">
|
||||
|
|
|
@ -19,6 +19,8 @@ import { AuthGuard } from "../auth/auth.guard";
|
|||
import { OrderModule } from "ngx-order-pipe";
|
||||
import { AddPlexUserComponent } from "./addplexuser.component";
|
||||
|
||||
import { SharedModule } from "../shared/shared.module";
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: "", component: UserManagementComponent, canActivate: [AuthGuard] },
|
||||
{ path: "add", component: UserManagementAddComponent, canActivate: [AuthGuard] },
|
||||
|
@ -39,6 +41,7 @@ const routes: Routes = [
|
|||
TooltipModule,
|
||||
OrderModule,
|
||||
SidebarModule,
|
||||
SharedModule,
|
||||
],
|
||||
declarations: [
|
||||
UserManagementComponent,
|
||||
|
|
|
@ -184,5 +184,11 @@
|
|||
"FilterHeaderRequestStatus":"Status",
|
||||
"Approved":"Approved",
|
||||
"PendingApproval": "Pending Approval"
|
||||
},
|
||||
"UserManagment": {
|
||||
"TvRemaining": "TV: {{remaining}}/{{total}} remaining",
|
||||
"MovieRemaining": "Movies: {{remaining}}/{{total}} remaining",
|
||||
"TvDue": "TV: {{date}}",
|
||||
"MovieDue": "Movie: {{date}}"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue