mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
refactor: use i18n in every data component
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
<ion-card>
|
||||
<ion-card-header>Address</ion-card-header>
|
||||
<ion-card-header>{{'data.detail.address.TITLE' | translate | titlecase}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>Street:</ion-col>
|
||||
<ion-col>{{'data.detail.address.STREET' | translate | titlecase}}:</ion-col>
|
||||
<ion-col width-60 text-right>
|
||||
{{address.streetAddress}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>Postal code:</ion-col>
|
||||
<ion-col>{{'data.detail.address.POSTCODE' | translate | titlecase}}:</ion-col>
|
||||
<ion-col width-60 text-right>
|
||||
{{address.postalCode}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>City:</ion-col>
|
||||
<ion-col>{{'data.detail.address.CITY' | translate | titlecase}}:</ion-col>
|
||||
<ion-col width-60 text-right>
|
||||
{{address.addressLocality}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row *ngIf="address.addressRegion">
|
||||
<ion-col>Region:</ion-col>
|
||||
<ion-col>{{'data.detail.address.REGION' | translate | titlecase}}:</ion-col>
|
||||
<ion-col width-60 text-right>
|
||||
{{address.addressRegion}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>Country:</ion-col>
|
||||
<ion-col>{{'data.detail.address.COUNTRY' | translate | titlecase}}:</ion-col>
|
||||
<ion-col width-60 text-right>
|
||||
{{address.addressCountry}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row *ngIf="address.postOfficeBoxNumber">
|
||||
<ion-col>Post office box:</ion-col>
|
||||
<ion-col>{{'data.detail.address.POST_OFFICE_BOX' | translate | titlecase}}</ion-col>
|
||||
<ion-col width-60 text-right>
|
||||
{{address.postOfficeBoxNumber}}
|
||||
</ion-col>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<ion-card>
|
||||
<ion-card-header>Offers</ion-card-header>
|
||||
<ion-card-header>{{'data.detail.offers.TITLE' | translate | titlecase}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<div *ngFor="let offer of offers">
|
||||
<p *ngIf="offer.inPlace">
|
||||
<ion-icon name="location"></ion-icon>
|
||||
<a [routerLink]="['/data-detail', offer.inPlace.uid]">{{offer.inPlace.name}}</a>,
|
||||
<a [routerLink]="['/data-detail', offer.inPlace.uid]">{{'name' | thingTranslate: item.inPlace}}</a>,
|
||||
<span *ngIf="offer.availabilityStarts">
|
||||
<ion-icon name="calendar"></ion-icon> {{offer.availabilityStarts | amDateFormat:'ll'}}
|
||||
</span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<h2>{{offers[0].prices.default | currency:'EUR':'symbol':undefined:'de'}}</h2>
|
||||
<p *ngIf="offers[0].inPlace">
|
||||
<ion-icon name="location"></ion-icon> {{offers[0].inPlace.name}} <span *ngIf="offers.length > 1">...</span>
|
||||
<ion-icon name="location"></ion-icon>{{offers[0].inPlace.name}}<span *ngIf="offers.length > 1">...</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
<ion-card *ngIf="origin.type === 'user'">
|
||||
<ion-card-header>Origin(user)</ion-card-header>
|
||||
<ion-card-header>{{'data.types.origin.TITLE' | translate | titlecase}}: {{'data.types.origin.USER' | translate | titlecase}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<p>Created: {{origin.created | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.updated">Updated: {{origin.updated | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.modified">Modified: {{origin.modified | amDateFormat:'ll'}}</p>
|
||||
<p>{{'data.types.origin.detail.CREATED' | translate | titlecase}}: {{origin.created | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.updated">{{'data.types.origin.detail.UPDATED' | translate | titlecase}}: {{origin.updated | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.modified">{{'data.types.origin.detail.MODIFIED' | translate | titlecase}}: {{origin.modified | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.name">{{'data.types.origin.detail.MAINTAINER' | translate }}: {{origin.name}}</p>
|
||||
<p *ngIf="origin.maintainer">
|
||||
Maintainer: <a [routerLink]="['/data-detail', origin.maintainer.uid]">{{origin.maintainer.name}}</a>
|
||||
{{'data.types.origin.detail.MAINTAINER' | translate }}: <a [routerLink]="['/data-detail', origin.maintainer.uid]">{{origin.maintainer.name}}</a>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-card *ngIf="origin.type === 'remote'">
|
||||
<ion-card-header>Origin(remote)</ion-card-header>
|
||||
<ion-card-header>{{'data.types.origin.TITLE' | translate | titlecase}}: {{'data.types.origin.REMOTE' | translate | titlecase}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<p>Indexed: {{origin.indexed | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.modified">Modified: {{origin.modified | amDateFormat:'ll'}}</p>
|
||||
<p>{{'data.types.origin.detail.INDEXED' | translate | titlecase}}: {{origin.indexed | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.modified">{{'data.types.origin.detail.MODIFIED' | translate | titlecase}}: {{origin.modified | amDateFormat:'ll'}}</p>
|
||||
<p *ngIf="origin.name">{{'data.types.origin.detail.MAINTAINER' | translate }}: {{origin.name}}</p>
|
||||
<p *ngIf="origin.maintainer">
|
||||
Maintainer: <a [routerLink]="['/data-detail', origin.maintainer.uid]">{{origin.maintainer.name}}</a>
|
||||
{{'data.types.origin.detail.MAINTAINER' | translate | titlecase}}: <a [routerLink]="['/data-detail', origin.maintainer.uid]">{{origin.maintainer.name}}</a>
|
||||
</p>
|
||||
<p *ngIf="origin.responsibleEntity">
|
||||
Responsible: <a [routerLink]="['/data-detail', origin.responsibleEntity.uid]">{{origin.responsibleEntity.name}}</a>
|
||||
{{'data.types.origin.detail.RESPONSIBLE' | translate | titlecase}}: <a [routerLink]="['/data-detail', origin.responsibleEntity.uid]">{{origin.responsibleEntity.name}}</a>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</ng-container>
|
||||
<ng-template #thingList>
|
||||
<a [routerLink]="['/data-detail', thing.uid]" *ngFor="let thing of content">
|
||||
<p>{{thing.name}}</p>
|
||||
<p>{{'name' | thingTranslate: thing}}</p>
|
||||
</a>
|
||||
</ng-template>
|
||||
<ng-template #textList>
|
||||
|
||||
Reference in New Issue
Block a user