mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
adding i18n to loading and errror messages (wip)
This commit is contained in:
@@ -78,5 +78,25 @@
|
|||||||
"results": {
|
"results": {
|
||||||
"title": "Search Results"
|
"title": "Search Results"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"loader": {
|
||||||
|
"default": "Loading...",
|
||||||
|
"top-level-communities": "Loading top level communities...",
|
||||||
|
"community": "Loading community...",
|
||||||
|
"collection": "Loading collection...",
|
||||||
|
"sub-collection": "Loading sub-collections...",
|
||||||
|
"items": "Loading items...",
|
||||||
|
"item": "Loading item...",
|
||||||
|
"object-list": "Loading..."
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"default": "Error...",
|
||||||
|
"top-level-communities": "Error fetching top level communities",
|
||||||
|
"community": "Error fetching community",
|
||||||
|
"collection": "Error fetching collection",
|
||||||
|
"sub-collection": "Error fetching sub-collections",
|
||||||
|
"items": "Error fetching items",
|
||||||
|
"item": "Error fetching item",
|
||||||
|
"object-list": "Error fetching"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,5 +9,5 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ds-error *ngIf="subCollections.hasFailed | async" message="Error fetching sub collections"></ds-error>
|
<ds-error *ngIf="subCollections.hasFailed | async" message="Error fetching sub-collections"></ds-error>
|
||||||
<ds-loading *ngIf="subCollections.isLoading | async" message="Loading sub collections..."></ds-loading>
|
<ds-loading *ngIf="subCollections.isLoading | async" message="Loading sub-collections..."></ds-loading>
|
||||||
|
@@ -1,21 +1,23 @@
|
|||||||
<div class="item-page" *ngIf="item.hasSucceeded | async" @fadeInOut>
|
<div class="item-page" *ngIf="item.hasSucceeded | async" @fadeInOut>
|
||||||
<ds-item-page-title-field [item]="item.payload | async"></ds-item-page-title-field>
|
<div *ngIf="item.payload | async; let itemPayload">
|
||||||
<div class="simple-view-link">
|
<ds-item-page-title-field [item]="itemPayload | async"></ds-item-page-title-field>
|
||||||
<a class="btn btn-outline-primary col-4" [routerLink]="['/items/' + (item.payload | async)?.id]">
|
<div class="simple-view-link">
|
||||||
{{"item.page.link.simple" | translate}}
|
<a class="btn btn-outline-primary col-4" [routerLink]="['/items/' + itemPayload.id]">
|
||||||
</a>
|
{{"item.page.link.simple" | translate}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<table class="table table-responsive table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr *ngFor="let metadatum of (metadata | async)">
|
||||||
|
<td>{{metadatum.key}}</td>
|
||||||
|
<td>{{metadatum.value}}</td>
|
||||||
|
<td>{{metadatum.language}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<ds-item-page-full-file-section [item]="itemPayload"></ds-item-page-full-file-section>
|
||||||
|
<ds-item-page-collections [item]="itemPayload"></ds-item-page-collections>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-responsive table-striped">
|
|
||||||
<tbody>
|
|
||||||
<tr *ngFor="let metadatum of (metadata | async)">
|
|
||||||
<td>{{metadatum.key}}</td>
|
|
||||||
<td>{{metadatum.value}}</td>
|
|
||||||
<td>{{metadatum.language}}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<ds-item-page-full-file-section [item]="item.payload | async"></ds-item-page-full-file-section>
|
|
||||||
<ds-item-page-collections [item]="item.payload | async"></ds-item-page-collections>
|
|
||||||
</div>
|
</div>
|
||||||
<ds-error *ngIf="item.hasFailed | async" message="Error fetching item"></ds-error>
|
<ds-error *ngIf="item.hasFailed | async" message="Error fetching item"></ds-error>
|
||||||
<ds-loading *ngIf="item.isLoading | async" message="Loading item..."></ds-loading>
|
<ds-loading *ngIf="item.isLoading | async" message="Loading item..."></ds-loading>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<div>
|
<div>
|
||||||
<span>{{ message }}</span>
|
<label>{{ message }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -22,8 +22,8 @@ describe('ErrorComponent (inline template)', () => {
|
|||||||
|
|
||||||
comp = fixture.componentInstance; // ErrorComponent test instance
|
comp = fixture.componentInstance; // ErrorComponent test instance
|
||||||
|
|
||||||
// query for the message <span> by CSS element selector
|
// query for the message <label> by CSS element selector
|
||||||
de = fixture.debugElement.query(By.css('span'));
|
de = fixture.debugElement.query(By.css('label'));
|
||||||
el = de.nativeElement;
|
el = de.nativeElement;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<span>{{ message }}</span>
|
<label>{{ message }}</label>
|
||||||
<div class="loader">
|
<div class="loader">
|
||||||
<span class="l-1"></span>
|
<span class="l-1"></span>
|
||||||
<span class="l-2"></span>
|
<span class="l-2"></span>
|
||||||
|
@@ -22,8 +22,8 @@ describe('LoadingComponent (inline template)', () => {
|
|||||||
|
|
||||||
comp = fixture.componentInstance; // LoadingComponent test instance
|
comp = fixture.componentInstance; // LoadingComponent test instance
|
||||||
|
|
||||||
// query for the message <span> by CSS element selector
|
// query for the message <label> by CSS element selector
|
||||||
de = fixture.debugElement.query(By.css('span'));
|
de = fixture.debugElement.query(By.css('label'));
|
||||||
el = de.nativeElement;
|
el = de.nativeElement;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user