mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	improve locale selection options
This commit is contained in:
		@@ -482,35 +482,35 @@
 | 
			
		||||
        <source>Saved view "<x id="PH" equiv-text="savedView.name"/>" deleted.</source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">62</context>
 | 
			
		||||
          <context context-type="linenumber">63</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="5647210819299459618" datatype="html">
 | 
			
		||||
        <source>Settings saved successfully.</source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">78</context>
 | 
			
		||||
          <context context-type="linenumber">79</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="6839066544204061364" datatype="html">
 | 
			
		||||
        <source>Use system language</source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">82</context>
 | 
			
		||||
          <context context-type="linenumber">83</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="7729897675462249787" datatype="html">
 | 
			
		||||
        <source>Use date format of display language</source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">86</context>
 | 
			
		||||
          <context context-type="linenumber">87</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="8488620293789898901" datatype="html">
 | 
			
		||||
        <source>Error while storing settings on server: <x id="PH" equiv-text="JSON.stringify(error.error)"/></source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">102</context>
 | 
			
		||||
          <context context-type="linenumber">103</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="121cc5391cd2a5115bc2b3160379ee5b36cd7716" datatype="html">
 | 
			
		||||
@@ -1463,8 +1463,8 @@
 | 
			
		||||
          <context context-type="linenumber">12</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="5866254605255506989" datatype="html">
 | 
			
		||||
        <source>English</source>
 | 
			
		||||
      <trans-unit id="1206520795340730278" datatype="html">
 | 
			
		||||
        <source>English (US)</source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/services/settings.service.ts</context>
 | 
			
		||||
          <context context-type="linenumber">74</context>
 | 
			
		||||
 
 | 
			
		||||
@@ -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