mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	better matching algorithm descriptions
This commit is contained in:
		| @@ -9,7 +9,7 @@ | ||||
|      | ||||
|     <app-input-text i18n-title title="Name" formControlName="name"></app-input-text> | ||||
|     <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select> | ||||
|     <app-input-text i18n-title title="Match" formControlName="match" i18n-hint hint="Auto matching does not require you to fill in this field."></app-input-text> | ||||
|     <app-input-text i18n-title title="Matching pattern" formControlName="match" i18n-hint hint="Auto matching does not require you to fill in this field."></app-input-text> | ||||
|     <app-input-check i18n-title title="Case insensitive" formControlName="is_insensitive" i18n-hint hint="Auto matching ignores this option."></app-input-check> | ||||
|   </div> | ||||
|   <div class="modal-footer"> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|        | ||||
|       <app-input-text i18n-title title="Name" formControlName="name"></app-input-text> | ||||
|       <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select> | ||||
|       <app-input-text i18n-title title="Match" formControlName="match" i18n-hint hint="Auto matching does not require you to fill in this field."></app-input-text> | ||||
|       <app-input-text i18n-title title="Matching pattern" formControlName="match" i18n-hint hint="Auto matching does not require you to fill in this field."></app-input-text> | ||||
|       <app-input-check i18n-title title="Case insensitive" formControlName="is_insensitive" i18n-hint hint="Auto matching ignores this option."></app-input-check> | ||||
|  | ||||
|     </div> | ||||
|   | ||||
| @@ -30,7 +30,7 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On | ||||
|     if (o.matching_algorithm == MATCH_AUTO) { | ||||
|       return $localize`Automatic` | ||||
|     } else if (o.match && o.match.length > 0) { | ||||
|       return `${o.match} (${MATCHING_ALGORITHMS.find(a => a.id == o.matching_algorithm).name})` | ||||
|       return `${MATCHING_ALGORITHMS.find(a => a.id == o.matching_algorithm).shortName}: ${o.match}` | ||||
|     } else { | ||||
|       return "-" | ||||
|     } | ||||
|   | ||||
| @@ -20,7 +20,7 @@ | ||||
|       | ||||
|       <app-input-check i18n-title title="Inbox tag" formControlName="is_inbox_tag" i18n-hint hint="Inbox tags are automatically assigned to all consumed documents."></app-input-check> | ||||
|       <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select> | ||||
|       <app-input-text i18n-title title="Match" formControlName="match" i18n-hint hint="Auto matching does not require you to fill in this field."></app-input-text> | ||||
|       <app-input-text i18n-title title="Matching pattern" formControlName="match" i18n-hint hint="Auto matching does not require you to fill in this field."></app-input-text> | ||||
|       <app-input-check i18n-title title="Case insensitive" formControlName="is_insensitive" i18n-hint hint="Auto matching ignores this option."></app-input-check> | ||||
|     </div> | ||||
|     <div class="modal-footer"> | ||||
|   | ||||
| @@ -9,12 +9,12 @@ export const MATCH_FUZZY = 5 | ||||
| export const MATCH_AUTO = 6 | ||||
|  | ||||
| export const MATCHING_ALGORITHMS = [ | ||||
|     {id: MATCH_ANY, name: $localize`Any`}, | ||||
|     {id: MATCH_ALL, name: $localize`All`}, | ||||
|     {id: MATCH_LITERAL, name: $localize`Literal`}, | ||||
|     {id: MATCH_REGEX, name: $localize`Regular expression`}, | ||||
|     {id: MATCH_FUZZY, name: $localize`Fuzzy match`}, | ||||
|     {id: MATCH_AUTO, name: $localize`Auto`}, | ||||
|     {id: MATCH_ANY, shortName: $localize`Any word`, name: $localize`Any: Document contains any of these words (space separated)`}, | ||||
|     {id: MATCH_ALL, shortName: $localize`All words`, name: $localize`All: Document contains all of these words (space separated)`}, | ||||
|     {id: MATCH_LITERAL, shortName: $localize`Exact match`, name: $localize`Exact: Document contains this string`}, | ||||
|     {id: MATCH_REGEX, shortName: $localize`Regular expression`, name: $localize`Regular expression: Document matches this regular expression`}, | ||||
|     {id: MATCH_FUZZY, shortName: $localize`Fuzzy word`, name: $localize`Fuzzy: Document contains a word similar to this word`}, | ||||
|     {id: MATCH_AUTO, shortName: $localize`Automatic`, name: $localize`Auto: Learn matching automatically.`}, | ||||
| ] | ||||
|  | ||||
| export interface MatchingModel extends ObjectWithId { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler