From dc43e2330149faffb52356f258d7d4fac95ce828 Mon Sep 17 00:00:00 2001 From: Michael W Spalti Date: Fri, 1 Nov 2019 13:40:19 -0700 Subject: [PATCH] Added not found for identifier message to i18n. --- resources/i18n/en.json5 | 1 + .../objectnotfound/objectnotfound.component.html | 2 +- .../objectnotfound/objectnotfound.component.ts | 6 ++---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/i18n/en.json5 b/resources/i18n/en.json5 index 0ad08652b5..583b88b662 100644 --- a/resources/i18n/en.json5 +++ b/resources/i18n/en.json5 @@ -204,6 +204,7 @@ "error.collection": "Error fetching collection", "error.collections": "Error fetching collections", "error.community": "Error fetching community", + "error.identifier": "No item found for the identifier", "error.default": "Error", "error.item": "Error fetching item", "error.items": "Error fetching items", diff --git a/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.html b/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.html index 662d3cde52..e1cf58b5b2 100644 --- a/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.html +++ b/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.html @@ -1,5 +1,5 @@
-

{{"error.item" | translate}}

+

{{"error.identifier" | translate}}

{{missingItem}}


diff --git a/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts b/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts index 0116575154..813b56920a 100644 --- a/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts +++ b/src/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts @@ -33,10 +33,8 @@ export class ObjectNotFoundComponent implements OnInit { } ngOnInit(): void { - if (this.idType.startsWith('handle')) { - this.missingItem = 'handle: ' + this.id; - } else if (this.idType.startsWith('uuid')) { - this.missingItem = 'uuid: ' + this.id; + if (this.idType.startsWith('handle') || this.idType.startsWith('uuid')) { + this.missingItem = this.idType + ': ' + this.id; } else { this.missingItem = 'handle: ' + this.idType + '/' + this.id; }