refactor: update to recent changes in translator

This commit is contained in:
Rainer Killinger
2021-01-13 16:47:22 +01:00
parent 456560026c
commit 3d4c476549
20 changed files with 706 additions and 330 deletions

View File

@@ -38,34 +38,34 @@
<ion-list class="filter-group"
*ngFor="let facet of !filterOption.compact ?
filterOption.options.slice(0, compactFilterOptionCount) : filterOption.options">
<ion-list-header class="h3">
<ion-label>
{{(facet.onlyOnType ?
getTranslatedPropertyName(facet.field, facet.onlyOnType)
: (getTranslatedPropertyName(facet.field))) | titlecase}}
{{facet.onlyOnType? ' | ' + (getTranslatedType(facet.onlyOnType) | titlecase) : ''}}
</ion-label>
</ion-list-header>
<div *ngIf="facet.buckets.length > 0">
<ion-item
*ngFor="let bucket of !facet.compact ?
facet.buckets.slice(0, compactFilterOptionCount) : facet.buckets">
<ion-label class="filter-item-label">
({{bucket.count}}) {{facet.field === 'type' ? (getTranslatedType(bucket.key) | titlecase) : bucket.key | titlecase}}
<div *ngIf="!facet.field.includes('.')">
<ion-list-header class="h3">
<ion-label>
{{(facet.onlyOnType ? getTranslatedPropertyName(facet.field, facet.onlyOnType) : (getTranslatedPropertyName(facet.field))) | titlecase}}
{{facet.onlyOnType ? ' | ' + (getTranslatedPropertyValue(facet.onlyOnType, 'type') | titlecase) : ''}}
</ion-label>
<ion-checkbox
mode="ios"
[(ngModel)]="bucket.checked"
(ngModelChange)="filterChanged()"
[value]="{field: facet.field, value: bucket.key, onlyOnType: facet.onlyOnType}">
</ion-checkbox>
</ion-item>
<ion-button fill="clear"
*ngIf="!facet.compact && facet.buckets.length > compactFilterOptionCount"
(click)="facet.compact = true">
{{'menu.context.filter.showAll' | translate}}
</ion-button>
</ion-list-header>
<div *ngIf="facet.buckets.length > 0">
<ion-item
*ngFor="let bucket of !facet.compact ?
facet.buckets.slice(0, compactFilterOptionCount) : facet.buckets">
<ion-label class="filter-item-label">
({{bucket.count}}) {{facet.field === 'type' ? (getTranslatedPropertyValue(bucket.key, 'type') | titlecase) :
getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key) | titlecase}}
</ion-label>
<ion-checkbox
mode="ios"
[(ngModel)]="bucket.checked"
(ngModelChange)="filterChanged()"
[value]="{field: facet.field, value: bucket.key, onlyOnType: facet.onlyOnType}">
</ion-checkbox>
</ion-item>
<ion-button fill="clear"
*ngIf="!facet.compact && facet.buckets.length > compactFilterOptionCount"
(click)="facet.compact = true">
{{'menu.context.filter.showAll' | translate}}
</ion-button>
</div>
</div>
</ion-list>
<ion-button fill="clear"