refactor: separate error translations into separate file
This commit is contained in:
6 files changed
+30
-25
No files matched your search
@@ -1,6 +1,10 @@
|
||||
<Rose::Message @title={{t (concat "errors." this.messageCode ".title")}} @subtitle={{concat (t "errors.titles.error") " " this.status}} @icon={{this.icon}} as |message|>
|
||||
<Rose::Message
|
||||
@title={{t (concat "errors." this.messageCode ".title")}}
|
||||
@subtitle={{concat (t "errors.generic.title") " " this.status}}
|
||||
@icon={{this.icon}}
|
||||
as |message|>
|
||||
<message.description>{{t (concat "errors." this.messageCode ".description")}}</message.description>
|
||||
{{#if this.helpRoute}}
|
||||
<message.link @route={{this.helpRoute}}>{{t "actions.help"}}</message.link>
|
||||
{{/if}}
|
||||
</Rose::Message>
|
||||
</Rose::Message>
|
||||
@@ -57,7 +57,7 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route {
|
||||
this.transitionTo('scopes.scope.projects');
|
||||
}
|
||||
} catch (e) {
|
||||
const errorMessage = this.intl.t('errors.titles.authentication-failed');
|
||||
const errorMessage = this.intl.t('errors.authentication-failed.title');
|
||||
this.notify.error(errorMessage, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{{title (t "errors.titles.error") }}
|
||||
{{title (t "errors.generic.title") }}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
{{#each @model.errors as |error|}}
|
||||
<Error::Message @status={{error.status}}/>
|
||||
{{/each}}
|
||||
</Rose::Layout::Centered>
|
||||
</Rose::Layout::Centered>
|
||||
@@ -47,7 +47,7 @@ module.exports = function (/* environment */) {
|
||||
* @type {Boolean}
|
||||
* @default "false"
|
||||
*/
|
||||
wrapTranslationsWithNamespace: false,
|
||||
wrapTranslationsWithNamespace: true,
|
||||
|
||||
/**
|
||||
* Cause a build error if ICU argument mismatches are detected.
|
||||
|
||||
@@ -191,25 +191,6 @@ form:
|
||||
new_password: New Password
|
||||
started: Started
|
||||
status: Status
|
||||
errors:
|
||||
401:
|
||||
title: You are not signed in
|
||||
description: You are not authenticated. Please authenticate and try again later.
|
||||
403:
|
||||
title: You are not authorized
|
||||
description: You must be granted permissions to view this data. Ask your administrator if you think you should have access.
|
||||
404:
|
||||
title: Resource not found
|
||||
description: We could not find the requested resource. You can ask your administrator or try again later.
|
||||
500:
|
||||
title: Server error
|
||||
description: We ran into a problem and could not continue. You can ask your administrator or try again later.
|
||||
unknown:
|
||||
title: Something went wrong
|
||||
description: Please contact your administrator or try again later.
|
||||
titles:
|
||||
authentication-failed: Authentication Failed
|
||||
error: Error
|
||||
notify:
|
||||
create-success: Created succesfully.
|
||||
save-success: Saved succesfully.
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
401:
|
||||
title: You are not signed in
|
||||
description: You are not authenticated. Please authenticate and try again later.
|
||||
403:
|
||||
title: You are not authorized
|
||||
description: You must be granted permissions to view this data. Ask your administrator if you think you should have access.
|
||||
404:
|
||||
title: Resource not found
|
||||
description: We could not find the requested resource. You can ask your administrator or try again later.
|
||||
500:
|
||||
title: Server error
|
||||
description: We ran into a problem and could not continue. You can ask your administrator or try again later.
|
||||
unknown:
|
||||
title: Something went wrong
|
||||
description: Please contact your administrator or try again later.
|
||||
generic:
|
||||
title: Error
|
||||
authentication-failed:
|
||||
title: Authentication Failed
|
||||
Reference in new issue
Block a user