mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	improve locale selection options
This commit is contained in:
		| @@ -19,7 +19,7 @@ | ||||
|           <div class="col"> | ||||
|  | ||||
|             <select class="form-control" formControlName="displayLanguage"> | ||||
|               <option *ngFor="let lang of displayLanguageOptions" [ngValue]="lang.code">{{lang.name}}<span *ngIf="lang.code"> ({{lang.englishName}})</span></option> | ||||
|               <option *ngFor="let lang of displayLanguageOptions" [ngValue]="lang.code">{{lang.name}}<span *ngIf="lang.code && currentLocale != 'en-US'"> - {{lang.englishName}}</span></option> | ||||
|             </select> | ||||
|  | ||||
|             <small class="form-text text-muted" i18n>You need to reload the page after applying a new language.</small> | ||||
| @@ -34,7 +34,7 @@ | ||||
|           <div class="col"> | ||||
|  | ||||
|             <select class="form-control" formControlName="dateLocale"> | ||||
|               <option *ngFor="let lang of dateLocaleOptions" [ngValue]="lang.code">{{lang.name}}<span *ngIf="lang.code"> ({{today | date:'shortDate':null:lang.code}})</span></option> | ||||
|               <option *ngFor="let lang of dateLocaleOptions" [ngValue]="lang.code">{{lang.name}}<span *ngIf="lang.code"> - {{today | date:'shortDate':null:lang.code}}</span></option> | ||||
|             </select> | ||||
|  | ||||
|           </div> | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| import { Component, OnInit, Renderer2  } from '@angular/core'; | ||||
| import { Component, Inject, LOCALE_ID, OnInit, Renderer2  } from '@angular/core'; | ||||
| import { FormControl, FormGroup } from '@angular/forms'; | ||||
| import { PaperlessSavedView } from 'src/app/data/paperless-saved-view'; | ||||
| import { DocumentListViewService } from 'src/app/services/document-list-view.service'; | ||||
| @@ -38,7 +38,8 @@ export class SettingsComponent implements OnInit { | ||||
|     public savedViewService: SavedViewService, | ||||
|     private documentListViewService: DocumentListViewService, | ||||
|     private toastService: ToastService, | ||||
|     private settings: SettingsService | ||||
|     private settings: SettingsService, | ||||
|     @Inject(LOCALE_ID) public currentLocale: string | ||||
|   ) { } | ||||
|  | ||||
|   ngOnInit() { | ||||
|   | ||||
| @@ -71,7 +71,7 @@ export class SettingsService { | ||||
|  | ||||
|   getLanguageOptions(): LanguageOption[] { | ||||
|     return [ | ||||
|       {code: "en-us", name: $localize`English`, englishName: "English"}, | ||||
|       {code: "en-US", name: $localize`English (US)`, englishName: "English (US)"}, | ||||
|       {code: "de", name: $localize`German`, englishName: "German"}, | ||||
|       {code: "nl", name: $localize`Dutch`, englishName: "Dutch"}, | ||||
|       {code: "fr", name: $localize`French`, englishName: "French"} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler