From 06b1c0fc80190e0729b44ee4c5690f62f550fab2 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 18 Jun 2020 16:39:11 -0400 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Update=20401=20error?= =?UTF-8?q?=20message=20in=20ui/core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/templates/orgs/org/error.hbs | 20 ++++++++++---------- ui/core/translations/en-us.yaml | 18 +++++++++++++----- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/ui/core/app/templates/orgs/org/error.hbs b/ui/core/app/templates/orgs/org/error.hbs index ac2abe9e9..b903c31ad 100644 --- a/ui/core/app/templates/orgs/org/error.hbs +++ b/ui/core/app/templates/orgs/org/error.hbs @@ -17,40 +17,40 @@ {{#each @model.errors as |error|}} {{!-- error.status === 401 --}} {{#if error.isUnauthenticated}} - - {{error.message}} {{t 'descriptions.unauthenticated-error'}} + + {{t 'errors.descriptions.unauthenticated-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 403 --}} {{#if error.isForbidden}} - - {{error.message}} {{t 'descriptions.forbidden-error'}} + + {{t 'errors.descriptions.forbidden-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 404 --}} {{#if error.isNotFound}} - - {{error.message}} {{t 'descriptions.notfound-error'}} + + {{t 'errors.descriptions.notfound-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 500 --}} {{#if error.isServer}} - - {{error.message}} {{t 'descriptions.server-error'}} + + {{t 'errors.descriptions.server-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 🤷 everything else --}} {{#if error.isUnknown}} - - {{error.message}} {{t 'descriptions.unknown-error'}} + + {{t 'errors.descriptions.unknown-error'}} {{t 'actions.help'}} {{/if}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 817fc90c9..43c4e0b41 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -16,11 +16,6 @@ titles: empty-set: No Items Yet projects-welcome: Welcome to Projects host-catalogs-welcome: Welcome to Host Catalogs - unauthenticated-error: You are not authorized - forbidden-error: You are not authorized - notfound-error: Resource not found - server-error: Server error - unknown-error: Something went wrong descriptions: host-catalogs: Overview of collections of hosts and host sets. empty-set: There are no items to display yet. You may be able to add items or try back later. @@ -41,6 +36,19 @@ form: name: Name description: Description type: Type +errors: + titles: + unauthenticated-error: You are not signed in + forbidden-error: You are not authorized + notfound-error: Resource not found + server-error: Server error + unknown-error: Something went wrong + descriptions: + unauthenticated-error: You are not authenticated. Please authenticate and try again later. + forbidden-error: You must be granted permissions to view this data. Ask your administrator if you think you should have access. + notfound-error: We could not find the requested resource. You can ask your administrator or try again later. + server-error: We ran into a problem and could not continue. You can ask your administrator or try again later. + unknown-error: Please contact your administrator or try again later. dev: default-org: Default Org menu-item: Menu item