mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Localize user preferences
This commit is contained in:
parent
496b399d67
commit
9191e55892
3 changed files with 38 additions and 15 deletions
|
@ -7,15 +7,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="Profile">
|
<mat-tab label="{{'UserPreferences.Profile' | translate}}">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
<div class="row user-type-row">
|
<div class="row user-type-row">
|
||||||
<div class="col-5 col-sm-3 col-md-2">
|
<div class="col-5 col-sm-3 col-md-2">
|
||||||
User Type:
|
{{'UserPreferences.UserType' | translate}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7 col-sm-9 col-md-10">
|
<div class="col-7 col-sm-9 col-md-10">
|
||||||
{{UserType[user?.userType]}}
|
{{'UserTypeLabel.' + user?.userType | translate }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<div class="col-12">
|
<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"
|
<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"
|
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>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<a href="https://apps.apple.com/us/app/ombi/id1335260043" target="_blank"><img
|
<a href="https://apps.apple.com/us/app/ombi/id1335260043" target="_blank"><img
|
||||||
|
@ -66,7 +66,9 @@
|
||||||
src="{{baseUrl}}/images/appstore.svg" /></a>
|
src="{{baseUrl}}/images/appstore.svg" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,15 +77,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-tab>
|
</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">
|
<div class="tab-content">
|
||||||
<h2>Change Details</h2>
|
<h2>{{'UserPreferences.ChangeDetails' | translate}}</h2>
|
||||||
<form novalidate [formGroup]="passwordForm" (ngSubmit)="updatePassword()">
|
<form novalidate [formGroup]="passwordForm" (ngSubmit)="updatePassword()">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-12">
|
<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-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">
|
<input id="currentPassword" matInput type="password" formControlName="currentPassword">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
@ -91,7 +93,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-12">
|
<div class="col-md-6 col-12">
|
||||||
<mat-form-field appearance="outline" floatLabel=always>
|
<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">
|
<input id="email" matInput formControlName="emailAddress">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +102,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-12">
|
<div class="col-md-6 col-12">
|
||||||
<mat-form-field appearance="outline" floatLabel=always>
|
<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">
|
<input id="newPassword" matInput type="password" formControlName="password">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
@ -108,12 +110,14 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-12">
|
<div class="col-md-6 col-12">
|
||||||
<mat-form-field appearance="outline" floatLabel=always>
|
<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">
|
<input id="confirmPassword" matInput type="password" formControlName="confirmPassword">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -133,7 +133,7 @@ export class UserPreferenceComponent implements OnInit {
|
||||||
currentPassword: values.currentPassword
|
currentPassword: values.currentPassword
|
||||||
}).subscribe(x => {
|
}).subscribe(x => {
|
||||||
if (x.successful) {
|
if (x.successful) {
|
||||||
this.notification.success("Updated your information");
|
this.notification.success(this.translate.instant("UserPreferences.UpdatedYourInformation"));
|
||||||
this.user.emailAddress = values.emailAddress;
|
this.user.emailAddress = values.emailAddress;
|
||||||
} else {
|
} else {
|
||||||
this.notification.error(x.errors[0]);
|
this.notification.error(x.errors[0]);
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
},
|
},
|
||||||
"Cancel": "Cancel",
|
"Cancel": "Cancel",
|
||||||
"Submit": "Submit",
|
"Submit": "Submit",
|
||||||
|
"Update": "Update",
|
||||||
"tvShow": "TV Show",
|
"tvShow": "TV Show",
|
||||||
"movie": "Movie"
|
"movie": "Movie"
|
||||||
},
|
},
|
||||||
|
@ -361,6 +362,24 @@
|
||||||
"LanguageDescription": "This is the language you would like the Ombi interface to be displayed in.",
|
"LanguageDescription": "This is the language you would like the Ombi interface to be displayed in.",
|
||||||
"MobileQRCode":"Mobile QR Code",
|
"MobileQRCode":"Mobile QR Code",
|
||||||
"LegacyApp":"Launch Legacy App",
|
"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…
Add table
Add a link
Reference in a new issue