From 59870df9151ad9cc2a9ea66a23f66bd9f5e49a69 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 15:19:47 -0400 Subject: [PATCH 01/10] refactor: separate error translations into separate file --- ui/core/app/components/error/message.hbs | 8 ++++++-- .../scopes/scope/authenticate/method.js | 2 +- ui/core/app/templates/scopes/scope/error.hbs | 5 +++-- ui/core/config/ember-intl.js | 2 +- ui/core/translations/en-us.yaml | 19 ------------------- ui/core/translations/errors/en-us.yaml | 19 +++++++++++++++++++ 6 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 ui/core/translations/errors/en-us.yaml diff --git a/ui/core/app/components/error/message.hbs b/ui/core/app/components/error/message.hbs index 90c471554..afcf013d9 100644 --- a/ui/core/app/components/error/message.hbs +++ b/ui/core/app/components/error/message.hbs @@ -1,6 +1,10 @@ - + {{t (concat "errors." this.messageCode ".description")}} {{#if this.helpRoute}} {{t "actions.help"}} {{/if}} - \ No newline at end of file + diff --git a/ui/core/app/routes/scopes/scope/authenticate/method.js b/ui/core/app/routes/scopes/scope/authenticate/method.js index ed1ebc026..7a0ce5580 100644 --- a/ui/core/app/routes/scopes/scope/authenticate/method.js +++ b/ui/core/app/routes/scopes/scope/authenticate/method.js @@ -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 }); } } diff --git a/ui/core/app/templates/scopes/scope/error.hbs b/ui/core/app/templates/scopes/scope/error.hbs index 8d56c81ce..70b0ce6ad 100644 --- a/ui/core/app/templates/scopes/scope/error.hbs +++ b/ui/core/app/templates/scopes/scope/error.hbs @@ -1,6 +1,7 @@ -{{title (t "errors.titles.error") }} +{{title (t "errors.generic.title") }} + {{#each @model.errors as |error|}} {{/each}} - \ No newline at end of file + diff --git a/ui/core/config/ember-intl.js b/ui/core/config/ember-intl.js index 120cf447e..783bb4032 100644 --- a/ui/core/config/ember-intl.js +++ b/ui/core/config/ember-intl.js @@ -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. diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 4c044bb2f..df04fe907 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -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. diff --git a/ui/core/translations/errors/en-us.yaml b/ui/core/translations/errors/en-us.yaml new file mode 100644 index 000000000..0e2239e72 --- /dev/null +++ b/ui/core/translations/errors/en-us.yaml @@ -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 From 63a61234dd843245cfc92ecd478c574a44324f12 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 15:41:02 -0400 Subject: [PATCH 02/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20notific?= =?UTF-8?q?ations=20to=20separate=20translation=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/routes/account/change-password.js | 2 +- ui/core/app/routes/scopes/scope/auth-methods.js | 4 ++-- .../scopes/scope/auth-methods/auth-method/accounts.js | 4 ++-- .../auth-method/accounts/account/set-password.js | 2 +- ui/core/app/routes/scopes/scope/groups.js | 4 ++-- ui/core/app/routes/scopes/scope/groups/group/add-members.js | 2 +- ui/core/app/routes/scopes/scope/groups/group/members.js | 2 +- ui/core/app/routes/scopes/scope/orgs.js | 2 +- ui/core/app/routes/scopes/scope/projects.js | 4 ++-- .../routes/scopes/scope/projects/project/host-catalogs.js | 4 ++-- .../project/host-catalogs/host-catalog/host-sets.js | 4 ++-- .../host-catalog/host-sets/host-set/add-hosts.js | 2 +- .../host-catalogs/host-catalog/host-sets/host-set/hosts.js | 2 +- .../projects/project/host-catalogs/host-catalog/hosts.js | 4 ++-- .../app/routes/scopes/scope/projects/project/sessions.js | 2 +- ui/core/app/routes/scopes/scope/projects/project/targets.js | 4 ++-- .../scope/projects/project/targets/target/add-host-sets.js | 2 +- .../scope/projects/project/targets/target/host-sets.js | 2 +- ui/core/app/routes/scopes/scope/roles.js | 4 ++-- .../app/routes/scopes/scope/roles/role/add-principals.js | 2 +- ui/core/app/routes/scopes/scope/roles/role/grants.js | 2 +- ui/core/app/routes/scopes/scope/roles/role/principals.js | 2 +- ui/core/app/routes/scopes/scope/users.js | 4 ++-- ui/core/translations/en-us.yaml | 5 ----- ui/core/translations/notifications/en-us.yaml | 6 ++++++ 25 files changed, 39 insertions(+), 38 deletions(-) create mode 100644 ui/core/translations/notifications/en-us.yaml diff --git a/ui/core/app/routes/account/change-password.js b/ui/core/app/routes/account/change-password.js index 858230e9c..f17ec6e84 100644 --- a/ui/core/app/routes/account/change-password.js +++ b/ui/core/app/routes/account/change-password.js @@ -42,7 +42,7 @@ export default class AccountChangePasswordRoute extends Route { // redirects may abort this initial transition, resulting in a // TransitionAborted error, which we do not want to show to the user. await this.replaceWith('index').catch(() => {}); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.save-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/auth-methods.js b/ui/core/app/routes/scopes/scope/auth-methods.js index c5190b637..149cec2ef 100644 --- a/ui/core/app/routes/scopes/scope/auth-methods.js +++ b/ui/core/app/routes/scopes/scope/auth-methods.js @@ -54,7 +54,7 @@ export default class ScopesScopeAuthMethodsRoute extends Route { ); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); } catch (error) { //TODO: replace with translated strings @@ -72,7 +72,7 @@ export default class ScopesScopeAuthMethodsRoute extends Route { await authMethod.destroyRecord(); await this.transitionTo('scopes.scope.auth-methods'); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); } catch (error) { //TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js index 0ecd6ebc4..e2846e829 100644 --- a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js +++ b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts.js @@ -54,7 +54,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route ); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); } catch (error) { // TODO: replace with translated strings @@ -72,7 +72,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route await account.destroyRecord(); await this.transitionTo('scopes.scope.auth-methods.auth-method.accounts'); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); } catch (error) { //TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js index a5461eacf..f650a1860 100644 --- a/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js +++ b/ui/core/app/routes/scopes/scope/auth-methods/auth-method/accounts/account/set-password.js @@ -39,7 +39,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRout await this.replaceWith( 'scopes.scope.auth-methods.auth-method.accounts.account.set-password' ); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.save-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/groups.js b/ui/core/app/routes/scopes/scope/groups.js index d51718c20..c221b3277 100644 --- a/ui/core/app/routes/scopes/scope/groups.js +++ b/ui/core/app/routes/scopes/scope/groups.js @@ -50,7 +50,7 @@ export default class ScopesScopeGroupsRoute extends Route { await group.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo('scopes.scope.groups.group', group); } catch (error) { @@ -68,7 +68,7 @@ export default class ScopesScopeGroupsRoute extends Route { try { await group.destroyRecord(); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo('scopes.scope.groups'); } catch (error) { //TODO: replace with translated strings diff --git a/ui/core/app/routes/scopes/scope/groups/group/add-members.js b/ui/core/app/routes/scopes/scope/groups/group/add-members.js index 1a9b8bc07..9cb5fc3e1 100644 --- a/ui/core/app/routes/scopes/scope/groups/group/add-members.js +++ b/ui/core/app/routes/scopes/scope/groups/group/add-members.js @@ -67,7 +67,7 @@ export default class ScopesScopeGroupsGroupAddMembersRoute extends Route { try { await group.addMembers(userIDs); await this.replaceWith('scopes.scope.groups.group.members'); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.add-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/groups/group/members.js b/ui/core/app/routes/scopes/scope/groups/group/members.js index 41b73ba9c..f51d8a0b9 100644 --- a/ui/core/app/routes/scopes/scope/groups/group/members.js +++ b/ui/core/app/routes/scopes/scope/groups/group/members.js @@ -40,7 +40,7 @@ export default class ScopesScopeGroupsGroupMembersRoute extends Route { try { await group.removeMember(member.id); await this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.remove-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/orgs.js b/ui/core/app/routes/scopes/scope/orgs.js index 7056c6f46..1e07d5f65 100644 --- a/ui/core/app/routes/scopes/scope/orgs.js +++ b/ui/core/app/routes/scopes/scope/orgs.js @@ -51,7 +51,7 @@ export default class ScopesScopeOrgsRoute extends Route { await org.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo('scopes.scope', org); } catch (error) { diff --git a/ui/core/app/routes/scopes/scope/projects.js b/ui/core/app/routes/scopes/scope/projects.js index 8d9ef9c00..31a9f4386 100644 --- a/ui/core/app/routes/scopes/scope/projects.js +++ b/ui/core/app/routes/scopes/scope/projects.js @@ -66,7 +66,7 @@ export default class ScopesScopeProjectsRoute extends Route { await project.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo('scopes.scope.projects.project', project); } catch (error) { @@ -84,7 +84,7 @@ export default class ScopesScopeProjectsRoute extends Route { try { await project.destroyRecord(); this.refresh(); - this.notify.success('notify.delete-success'); + this.notify.success('notifications.delete-success'); this.transitionTo('scopes.scope.projects'); } catch (error) { // TODO: replace with translated strings diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js index e4df664ef..9989ec112 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js @@ -44,7 +44,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route { await hostCatalog.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo( 'scopes.scope.projects.project.host-catalogs.host-catalog', @@ -65,7 +65,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route { try { await project.destroyRecord(); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo('scopes.scope.projects.project.host-catalogs'); } catch (error) { // TODO: replace with translated strings diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js index 9f8617677..ddd865912 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js @@ -53,7 +53,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsRo ); await this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); } catch (error) { // TODO: replace with translated strings @@ -69,7 +69,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsRo async delete(hostSet) { try { await hostSet.destroyRecord(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo( 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets' ); diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js index 672c9ab58..33e9af6c2 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js @@ -93,7 +93,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo await this.replaceWith( 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.hosts' ); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.add-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js index a8724fdff..772d07357 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js @@ -45,7 +45,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo adapterOptions: { scopeID, hostCatalogID }, }); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.remove-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js index 8d9951af8..1bab7ab3a 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js @@ -53,7 +53,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsRoute ); await this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); } catch (error) { // TODO: replace with translated strings @@ -70,7 +70,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsRoute try { await host.destroyRecord(); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo( 'scopes.scope.projects.project.host-catalogs.host-catalog.hosts' ); diff --git a/ui/core/app/routes/scopes/scope/projects/project/sessions.js b/ui/core/app/routes/scopes/scope/projects/project/sessions.js index b41d76d7a..63b53d7db 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/sessions.js +++ b/ui/core/app/routes/scopes/scope/projects/project/sessions.js @@ -75,7 +75,7 @@ export default class ScopesScopeProjectsProjectSessionsRoute extends Route { async cancelSession(session) { try { await session.cancelSession(); - this.notify.success(this.intl.t('notify.session-canceled')); + this.notify.success(this.intl.t('notifications.canceled-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets.js b/ui/core/app/routes/scopes/scope/projects/project/targets.js index 8b62762bf..d6f1c0a56 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/targets.js +++ b/ui/core/app/routes/scopes/scope/projects/project/targets.js @@ -44,7 +44,7 @@ export default class ScopesScopeProjectsProjectTargetsRoute extends Route { await target.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo('scopes.scope.projects.project.targets.target', target); } catch (error) { @@ -62,7 +62,7 @@ export default class ScopesScopeProjectsProjectTargetsRoute extends Route { try { await target.destroyRecord(); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo('scopes.scope.projects.project.targets'); } catch (error) { // TODO: replace with translated strings diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js index d5b31a9c2..cedda2034 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js +++ b/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js @@ -76,7 +76,7 @@ export default class ScopesScopeProjectsProjectTargetsTargetAddHostSetsRoute ext this.replaceWith( 'scopes.scope.projects.project.targets.target.host-sets' ); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.add-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js index e6e85ca01..c0678f8da 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js +++ b/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js @@ -57,7 +57,7 @@ export default class ScopesScopeProjectsProjectTargetsTargetHostSetsRoute extend try { await target.removeHostSet(hostSet.id); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.remove-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/roles.js b/ui/core/app/routes/scopes/scope/roles.js index 00c4fc383..a3dd0bd66 100644 --- a/ui/core/app/routes/scopes/scope/roles.js +++ b/ui/core/app/routes/scopes/scope/roles.js @@ -50,7 +50,7 @@ export default class ScopesScopeRolesRoute extends Route { await role.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo('scopes.scope.roles.role', role); } catch (error) { @@ -68,7 +68,7 @@ export default class ScopesScopeRolesRoute extends Route { try { await role.destroyRecord(); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo('scopes.scope.roles'); } catch (error) { // TODO: replace with translated strings diff --git a/ui/core/app/routes/scopes/scope/roles/role/add-principals.js b/ui/core/app/routes/scopes/scope/roles/role/add-principals.js index 0bb2c0e5a..e5ff631ff 100644 --- a/ui/core/app/routes/scopes/scope/roles/role/add-principals.js +++ b/ui/core/app/routes/scopes/scope/roles/role/add-principals.js @@ -61,7 +61,7 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route { try { await role.addPrincipals(principalIDs); this.replaceWith('scopes.scope.roles.role.principals'); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.add-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/roles/role/grants.js b/ui/core/app/routes/scopes/scope/roles/role/grants.js index d53bf4919..ac73cf1ea 100644 --- a/ui/core/app/routes/scopes/scope/roles/role/grants.js +++ b/ui/core/app/routes/scopes/scope/roles/role/grants.js @@ -57,7 +57,7 @@ export default class ScopesScopeRolesRoleGrantsRoute extends Route { async save(role) { try { await role.saveGrants(); - this.notify.success(this.intl.t('notify.save-success')); + this.notify.success(this.intl.t('notifications.save-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/roles/role/principals.js b/ui/core/app/routes/scopes/scope/roles/role/principals.js index 3d5e55055..3337b3437 100644 --- a/ui/core/app/routes/scopes/scope/roles/role/principals.js +++ b/ui/core/app/routes/scopes/scope/roles/role/principals.js @@ -65,7 +65,7 @@ export default class ScopesScopeRolesRolePrincipalsRoute extends Route { const role = this.modelFor('scopes.scope.roles.role'); await role.removePrincipal(principal.id); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.remove-success')); } catch (error) { // TODO: replace with translated strings this.notify.error(error.message, { closeAfter: null }); diff --git a/ui/core/app/routes/scopes/scope/users.js b/ui/core/app/routes/scopes/scope/users.js index 3efffbde1..46847ddc3 100644 --- a/ui/core/app/routes/scopes/scope/users.js +++ b/ui/core/app/routes/scopes/scope/users.js @@ -51,7 +51,7 @@ export default class ScopesScopeUsersRoute extends Route { await user.save(); this.refresh(); this.notify.success( - this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success') + this.intl.t(isNew ? 'notifications.create-success' : 'notifications.save-success') ); this.transitionTo('scopes.scope.users.user', user); } catch (error) { @@ -69,7 +69,7 @@ export default class ScopesScopeUsersRoute extends Route { try { await user.destroyRecord(); this.refresh(); - this.notify.success(this.intl.t('notify.delete-success')); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo('scopes.scope.users'); } catch (error) { // TODO: replace with translated strings diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index df04fe907..01d5cc7cd 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -191,8 +191,3 @@ form: new_password: New Password started: Started status: Status -notify: - create-success: Created succesfully. - save-success: Saved succesfully. - delete-success: Deleted successfully. - session-canceled: Session canceled. diff --git a/ui/core/translations/notifications/en-us.yaml b/ui/core/translations/notifications/en-us.yaml new file mode 100644 index 000000000..8c915ebe0 --- /dev/null +++ b/ui/core/translations/notifications/en-us.yaml @@ -0,0 +1,6 @@ +create-success: Created succesfully. +save-success: Saved succesfully. +delete-success: Deleted successfully. +add-success: Added successfully. +remove-success: Removed successfully. +canceled-success: Canceled successfully. From 867e77ef5adacebc5b717bcf8af7ca0cd34446a8 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 15:50:45 -0400 Subject: [PATCH 03/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20actions?= =?UTF-8?q?=20translations=20into=20separate=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/translations/actions/en-us.yaml | 32 ++++++++++++++++++++++++ ui/core/translations/en-us.yaml | 33 ------------------------- 2 files changed, 32 insertions(+), 33 deletions(-) create mode 100644 ui/core/translations/actions/en-us.yaml diff --git a/ui/core/translations/actions/en-us.yaml b/ui/core/translations/actions/en-us.yaml new file mode 100644 index 000000000..018b94b48 --- /dev/null +++ b/ui/core/translations/actions/en-us.yaml @@ -0,0 +1,32 @@ +add: Add +cancel: Cancel +delete: Delete +remove: Remove +dismiss: Dismiss +save: Save +manage: Manage +help: Need help? +back: Back +authenticate: Authenticate +deauthenticate: Deauthenticate +choose-org: Choose Scope +choose-different-org: Choose a Different Scope +delete-user: Delete user +delete-group: Delete group +delete-role: Delete role +delete-project: Delete project +delete-host-catalog: Delete host catalog +delete-auth-method: Delete auth method +delete-host-set: Delete host set +delete-host: Delete host +delete-target: Delete target +delete-account: Delete account +add-host-set: Create Host Set +add-host: Create Host +add-host-sets: Add Host Sets +add-principals: Add Principals +add-members: Add Members +add-hosts: Add Hosts +add-account: Create Account +set-password: Set Password +change-password: Change Password diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 01d5cc7cd..6b6cb3afa 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -1,36 +1,3 @@ -actions: - add: Add - cancel: Cancel - delete: Delete - remove: Remove - dismiss: Dismiss - save: Save - manage: Manage - help: Need help? - back: Back - authenticate: Authenticate - deauthenticate: Deauthenticate - choose-org: Choose Scope - choose-different-org: Choose a Different Scope - delete-user: Delete user - delete-group: Delete group - delete-role: Delete role - delete-project: Delete project - delete-host-catalog: Delete host catalog - delete-auth-method: Delete auth method - delete-host-set: Delete host set - delete-host: Delete host - delete-target: Delete target - delete-account: Delete account - add-host-set: Create Host Set - add-host: Create Host - add-host-sets: Add Host Sets - add-principals: Add Principals - add-members: Add Members - add-hosts: Add Hosts - add-account: Create Account - set-password: Set Password - change-password: Change Password auth: titles: no-scopes: No Scopes Available From d4a11148597bceb324c2d08a9f2c06d7ab461c91 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 16:04:33 -0400 Subject: [PATCH 04/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20resourc?= =?UTF-8?q?es=20to=20separate=20translations=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/routes/scopes/scope/projects.js | 2 +- ui/core/translations/en-us.yaml | 52 --------------------- ui/core/translations/resources/en-us.yaml | 51 ++++++++++++++++++++ 3 files changed, 52 insertions(+), 53 deletions(-) create mode 100644 ui/core/translations/resources/en-us.yaml diff --git a/ui/core/app/routes/scopes/scope/projects.js b/ui/core/app/routes/scopes/scope/projects.js index 31a9f4386..0a6895e54 100644 --- a/ui/core/app/routes/scopes/scope/projects.js +++ b/ui/core/app/routes/scopes/scope/projects.js @@ -84,7 +84,7 @@ export default class ScopesScopeProjectsRoute extends Route { try { await project.destroyRecord(); this.refresh(); - this.notify.success('notifications.delete-success'); + this.notify.success(this.intl.t('notifications.delete-success')); this.transitionTo('scopes.scope.projects'); } catch (error) { // TODO: replace with translated strings diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 6b6cb3afa..e462d9b33 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -21,58 +21,6 @@ host: account: types: password: Password -resources: - user: User - users: Users - role: Role - roles: Roles - group: Group - groups: Groups - orgs: Orgs - org: Org - projects: Projects - project: Project - host-catalog: Host Catalog - host-catalogs: Host Catalogs - auth-method: Auth Method - auth-methods: Auth Methods - host-set: Host Set - host-sets: Host Sets - host: Host - hosts: Hosts - target: Target - targets: Targets - accounts: Accounts - account: Account - sessions: Sessions - session: Session - descriptions: - user: A User inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. - users: A user is any entity authorized to access Boundary using authentication credentials specific to one of the configured Authentication Methods. A User is owned by one and only one Organization. A User is associated with zero or one Authentication Methods. A User not associated with an Authentication Method can not log in to the system. A User can belong to zero or more Groups. A User is deleted when the Organization it belongs to is deleted. The lifecycle of a User is not tied to the lifecycle of any Authentication Method, Group or Role, but rather to its Organization only. - role: A Role can be assigned to zero or more Principals. A Principal assigned a Role receives all capabilities granted by any Direct Grant owned by the Role. A Role is deleted when the Scope it belongs to is deleted. All Direct Grants owned by a Role are deleted when the Role is deleted. - roles: A role is a collection of capabilities granted to any Principal the Role is assigned to. A Role belongs to one and only one Scope. A Role owns zero or more Direct Grants. The lifecycle of a Role is not tied to the lifecycle of any Principal. - grants: A grant represents a set of capabilities granted to a role. It couples a set of Actions to either a set of Resource Types or an individual Resource. A Direct Grant belongs exclusively to one and only one Role. However, equivalent Direct Grants may exist across different Roles. A Direct Grant references one or more Actions and either one or more Resource types or one specific Resource. A Direct Grant is deleted when the Role it belongs to is deleted. A Direct Grant is also deleted if it is associated with a specific Resource and that Resource itself is deleted. The lifecycle of a Direct Grant is not tied to the lifecycle of any Action or Resource Type. - principals: A principal is any entity which can be assigned capabilities. Principal is abstract. User, Group, and Project are concrete Principals. A Principal can be assigned to zero or more Roles. - group: All Users in a Group are granted the capabilities of all Roles the Group is associated with. A Group is deleted when the Scope it belongs to is deleted. - groups: Groups are collections of Users used only for access control purposes. A Group is owned by one and only one Scope. A Group can contain zero or more Users. A Group inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. The lifecycle of a Group is not tied to the lifecycle of any User or Role. - org: When an Organization is deleted, all resources owned by it are also deleted. - orgs: An Organization is a top-level container, and owns zero to many Projects and zero to many Authentication Methods. An Organization inherits from Scope ("is-a" Scope) allowing it to own zero to many Groups, Roles, Targets, or Host Catalogs. The lifecycle of an Organization is not tied to anything else. A Role at the Organization level can grant permissions at the Project level. - project: When a Project is deleted, all resources owned by it are also deleted. The lifecycle of a Project is not tied to any resource it contains. - projects: A project is a child scope of an organization and is owned by an Organization. A Project inherits from Scope ("is-a" Scope) allowing it to own zero to many Groups, Roles, Targets, or Host Catalogs. A Project also inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. A Project has no additional relationships beyond those defined in Scope and Principal. A Project is deleted when the Organization it belongs to is deleted. - host-catalog: A host catalog is a permission boundary modeled as a container. - host-catalogs: A host catalog is a permission boundary modeled as a container. - auth-method: An Authentication Method creates and references zero or more Users. An Authentication Method is deleted when the Organization it belongs to is deleted. The lifecycle of an Authentication Method is not tied to the lifecycle of any User. - auth-methods: An authentication method is a method configured for an Organization to authenticate Users. An Authentication Method is owned by one and only one Organization. - host-set: Host Set is abstract. A Host Set is deleted when the Host Catalog it belongs to is deleted. - host-sets: A host set is a resource which provides a subset of Hosts from the set of Hosts of the Host Catalog it belongs to. A Host Set belongs to one and only one Host Catalog. A Host Set can contain zero or more Hosts. A Host Set can be contained by zero or more Targets. The lifecycle of a Host Set is not tied to the lifecycle of any Targets or Hosts. - host: Host is abstract. A Host is deleted when the Host Catalog it belongs to is deleted. - hosts: A host is a computing element with a network address reachable from Boundary. A Host belongs to one and only one Host Catalog. A Host can be contained by zero or more Host Sets. The lifecycle of a Host is not tied to the lifecycle of any Host Sets. - target: Target is abstract. A Target is deleted when the Scope it belongs to is deleted. - targets: A target is a networked service a User can connect to and interact with through Boundary. A Target does not directly contain any secrets. A Target contains a collection of Hosts. A Target belongs to one and only one Scope. A Target can contain zero or more Host Sets. The lifecycle of a Target is not tied to the lifecycle of any Host Set. - accounts: Accounts - account: Account - sessions: Sessions - session: Session titles: iam: IAM new: New diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml new file mode 100644 index 000000000..da3e77a86 --- /dev/null +++ b/ui/core/translations/resources/en-us.yaml @@ -0,0 +1,51 @@ +user: User +users: Users +role: Role +roles: Roles +group: Group +groups: Groups +orgs: Orgs +org: Org +projects: Projects +project: Project +host-catalog: Host Catalog +host-catalogs: Host Catalogs +auth-method: Auth Method +auth-methods: Auth Methods +host-set: Host Set +host-sets: Host Sets +host: Host +hosts: Hosts +target: Target +targets: Targets +accounts: Accounts +account: Account +sessions: Sessions +session: Session +descriptions: + user: A User inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. + users: A user is any entity authorized to access Boundary using authentication credentials specific to one of the configured Authentication Methods. A User is owned by one and only one Organization. A User is associated with zero or one Authentication Methods. A User not associated with an Authentication Method can not log in to the system. A User can belong to zero or more Groups. A User is deleted when the Organization it belongs to is deleted. The lifecycle of a User is not tied to the lifecycle of any Authentication Method, Group or Role, but rather to its Organization only. + role: A Role can be assigned to zero or more Principals. A Principal assigned a Role receives all capabilities granted by any Direct Grant owned by the Role. A Role is deleted when the Scope it belongs to is deleted. All Direct Grants owned by a Role are deleted when the Role is deleted. + roles: A role is a collection of capabilities granted to any Principal the Role is assigned to. A Role belongs to one and only one Scope. A Role owns zero or more Direct Grants. The lifecycle of a Role is not tied to the lifecycle of any Principal. + grants: A grant represents a set of capabilities granted to a role. It couples a set of Actions to either a set of Resource Types or an individual Resource. A Direct Grant belongs exclusively to one and only one Role. However, equivalent Direct Grants may exist across different Roles. A Direct Grant references one or more Actions and either one or more Resource types or one specific Resource. A Direct Grant is deleted when the Role it belongs to is deleted. A Direct Grant is also deleted if it is associated with a specific Resource and that Resource itself is deleted. The lifecycle of a Direct Grant is not tied to the lifecycle of any Action or Resource Type. + principals: A principal is any entity which can be assigned capabilities. Principal is abstract. User, Group, and Project are concrete Principals. A Principal can be assigned to zero or more Roles. + group: All Users in a Group are granted the capabilities of all Roles the Group is associated with. A Group is deleted when the Scope it belongs to is deleted. + groups: Groups are collections of Users used only for access control purposes. A Group is owned by one and only one Scope. A Group can contain zero or more Users. A Group inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. The lifecycle of a Group is not tied to the lifecycle of any User or Role. + org: When an Organization is deleted, all resources owned by it are also deleted. + orgs: An Organization is a top-level container, and owns zero to many Projects and zero to many Authentication Methods. An Organization inherits from Scope ("is-a" Scope) allowing it to own zero to many Groups, Roles, Targets, or Host Catalogs. The lifecycle of an Organization is not tied to anything else. A Role at the Organization level can grant permissions at the Project level. + project: When a Project is deleted, all resources owned by it are also deleted. The lifecycle of a Project is not tied to any resource it contains. + projects: A project is a child scope of an organization and is owned by an Organization. A Project inherits from Scope ("is-a" Scope) allowing it to own zero to many Groups, Roles, Targets, or Host Catalogs. A Project also inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. A Project has no additional relationships beyond those defined in Scope and Principal. A Project is deleted when the Organization it belongs to is deleted. + host-catalog: A host catalog is a permission boundary modeled as a container. + host-catalogs: A host catalog is a permission boundary modeled as a container. + auth-method: An Authentication Method creates and references zero or more Users. An Authentication Method is deleted when the Organization it belongs to is deleted. The lifecycle of an Authentication Method is not tied to the lifecycle of any User. + auth-methods: An authentication method is a method configured for an Organization to authenticate Users. An Authentication Method is owned by one and only one Organization. + host-set: Host Set is abstract. A Host Set is deleted when the Host Catalog it belongs to is deleted. + host-sets: A host set is a resource which provides a subset of Hosts from the set of Hosts of the Host Catalog it belongs to. A Host Set belongs to one and only one Host Catalog. A Host Set can contain zero or more Hosts. A Host Set can be contained by zero or more Targets. The lifecycle of a Host Set is not tied to the lifecycle of any Targets or Hosts. + host: Host is abstract. A Host is deleted when the Host Catalog it belongs to is deleted. + hosts: A host is a computing element with a network address reachable from Boundary. A Host belongs to one and only one Host Catalog. A Host can be contained by zero or more Host Sets. The lifecycle of a Host is not tied to the lifecycle of any Host Sets. + target: Target is abstract. A Target is deleted when the Scope it belongs to is deleted. + targets: A target is a networked service a User can connect to and interact with through Boundary. A Target does not directly contain any secrets. A Target contains a collection of Hosts. A Target belongs to one and only one Scope. A Target can contain zero or more Host Sets. The lifecycle of a Target is not tied to the lifecycle of any Host Set. + accounts: Accounts + account: Account + sessions: Sessions + session: Session From d134fc13e6fc180e0026ddfaf0b2c4cfde2e6880 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 16:22:07 -0400 Subject: [PATCH 05/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20refactor=20for?= =?UTF-8?q?m=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../password/change-password/index.hbs | 4 +-- .../form/account/password/index.hbs | 10 +++---- .../account/password/set-password/index.hbs | 2 +- .../app/components/form/auth-method/index.hbs | 6 ++--- .../form/group/add-members/index.hbs | 4 +-- ui/core/app/components/form/group/index.hbs | 4 +-- .../components/form/host-catalog/index.hbs | 4 +-- .../form/host-set/add-hosts/index.hbs | 6 ++--- .../components/form/host-set/hosts/index.hbs | 6 ++--- .../app/components/form/host-set/index.hbs | 6 ++--- ui/core/app/components/form/host/index.hbs | 8 +++--- ui/core/app/components/form/org/index.hbs | 4 +-- ui/core/app/components/form/project/index.hbs | 4 +-- .../form/role/add-principals/index.hbs | 6 ++--- .../app/components/form/role/grants/index.hbs | 2 +- ui/core/app/components/form/role/index.hbs | 4 +-- .../form/target/add-host-sets/index.hbs | 6 ++--- ui/core/app/components/form/target/index.hbs | 8 +++--- ui/core/app/components/form/user/index.hbs | 4 +-- .../auth-method/accounts/index.hbs | 6 ++--- .../scopes/scope/auth-methods/index.hbs | 6 ++--- .../scopes/scope/authenticate/method.hbs | 4 +-- .../scopes/scope/groups/group/members.hbs | 4 +-- .../templates/scopes/scope/groups/index.hbs | 4 +-- .../host-catalog/host-sets/host-set/hosts.hbs | 6 ++--- .../host-catalog/host-sets/index.hbs | 6 ++--- .../host-catalog/hosts/index.hbs | 8 +++--- .../projects/project/host-catalogs/index.hbs | 6 ++--- .../scope/projects/project/sessions/index.hbs | 6 ++--- .../scope/projects/project/targets/index.hbs | 6 ++--- .../project/targets/target/host-sets.hbs | 6 ++--- .../templates/scopes/scope/roles/index.hbs | 4 +-- .../scopes/scope/roles/role/principals.hbs | 6 ++--- .../templates/scopes/scope/users/index.hbs | 4 +-- ui/core/translations/en-us.yaml | 23 ---------------- ui/core/translations/form/en-us.yaml | 26 +++++++++++++++++++ ui/core/translations/states/en-us.yaml | 4 +++ 37 files changed, 120 insertions(+), 113 deletions(-) create mode 100644 ui/core/translations/form/en-us.yaml create mode 100644 ui/core/translations/states/en-us.yaml diff --git a/ui/core/app/components/form/account/password/change-password/index.hbs b/ui/core/app/components/form/account/password/change-password/index.hbs index a0d85390d..e3ebf0775 100644 --- a/ui/core/app/components/form/account/password/change-password/index.hbs +++ b/ui/core/app/components/form/account/password/change-password/index.hbs @@ -10,7 +10,7 @@ @name="currentPassword" @type="password" @value={{this.currentPassword}} - @label={{t "form.label.current_password"}} + @label={{t "form.current_password.label"}} @error={{@model.errors.name}} readonly={{false}} autocomplete="current-password" @@ -28,7 +28,7 @@ @name="newPassword" @type="password" @value={{this.newPassword}} - @label={{t "form.label.new_password"}} + @label={{t "form.new_password.label"}} @error={{@model.errors.name}} readonly={{false}} autocomplete="new-password" diff --git a/ui/core/app/components/form/account/password/index.hbs b/ui/core/app/components/form/account/password/index.hbs index facd43c2f..391a524d5 100644 --- a/ui/core/app/components/form/account/password/index.hbs +++ b/ui/core/app/components/form/account/password/index.hbs @@ -7,7 +7,7 @@ > @@ -15,7 +15,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -32,7 +32,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -50,7 +50,7 @@ @name="login_name" @type="text" @value={{@model.attributes.login_name}} - @label={{t "form.label.identification"}} + @label={{t "form.login_name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -68,7 +68,7 @@ @name="password" @type="password" @value={{this.password}} - @label={{t "form.label.password"}} + @label={{t "form.password.label"}} @error={{@model.errors.name}} readonly={{false}} autocomplete="new-password" diff --git a/ui/core/app/components/form/account/password/set-password/index.hbs b/ui/core/app/components/form/account/password/set-password/index.hbs index 7d88d57eb..80780ccc3 100644 --- a/ui/core/app/components/form/account/password/set-password/index.hbs +++ b/ui/core/app/components/form/account/password/set-password/index.hbs @@ -10,7 +10,7 @@ @name="password" @type="password" @value={{this.password}} - @label={{t "form.label.password"}} + @label={{t "form.password.label"}} @error={{@model.errors.name}} readonly={{false}} autocomplete="new-password" diff --git a/ui/core/app/components/form/auth-method/index.hbs b/ui/core/app/components/form/auth-method/index.hbs index 7c1bc5162..782dceefd 100644 --- a/ui/core/app/components/form/auth-method/index.hbs +++ b/ui/core/app/components/form/auth-method/index.hbs @@ -7,7 +7,7 @@ > @@ -15,7 +15,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -32,7 +32,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/group/add-members/index.hbs b/ui/core/app/components/form/group/add-members/index.hbs index 30f9308c6..14943ae3f 100644 --- a/ui/core/app/components/form/group/add-members/index.hbs +++ b/ui/core/app/components/form/group/add-members/index.hbs @@ -15,8 +15,8 @@ - {{t 'form.label.id'}} - {{t 'form.label.name'}} + {{t 'form.id.label'}} + {{t 'form.name.label'}} diff --git a/ui/core/app/components/form/group/index.hbs b/ui/core/app/components/form/group/index.hbs index 45adc26d0..0bcc6df4c 100644 --- a/ui/core/app/components/form/group/index.hbs +++ b/ui/core/app/components/form/group/index.hbs @@ -10,7 +10,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -27,7 +27,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/host-catalog/index.hbs b/ui/core/app/components/form/host-catalog/index.hbs index 45adc26d0..0bcc6df4c 100644 --- a/ui/core/app/components/form/host-catalog/index.hbs +++ b/ui/core/app/components/form/host-catalog/index.hbs @@ -10,7 +10,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -27,7 +27,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/host-set/add-hosts/index.hbs b/ui/core/app/components/form/host-set/add-hosts/index.hbs index b6428b1c1..b743efe0b 100644 --- a/ui/core/app/components/form/host-set/add-hosts/index.hbs +++ b/ui/core/app/components/form/host-set/add-hosts/index.hbs @@ -15,9 +15,9 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} diff --git a/ui/core/app/components/form/host-set/hosts/index.hbs b/ui/core/app/components/form/host-set/hosts/index.hbs index 088270a0b..6fb9e5158 100644 --- a/ui/core/app/components/form/host-set/hosts/index.hbs +++ b/ui/core/app/components/form/host-set/hosts/index.hbs @@ -25,9 +25,9 @@ - {{t 'form.label.id'}} - {{t 'form.label.name'}} - {{t 'form.label.address'}} + {{t 'form.id.label'}} + {{t 'form.name.label'}} + {{t 'form.address.label'}} diff --git a/ui/core/app/components/form/host-set/index.hbs b/ui/core/app/components/form/host-set/index.hbs index beb85b652..82f093d2c 100644 --- a/ui/core/app/components/form/host-set/index.hbs +++ b/ui/core/app/components/form/host-set/index.hbs @@ -8,7 +8,7 @@ @@ -16,7 +16,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -33,7 +33,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/host/index.hbs b/ui/core/app/components/form/host/index.hbs index 72951a2a4..7c0fcb8ef 100644 --- a/ui/core/app/components/form/host/index.hbs +++ b/ui/core/app/components/form/host/index.hbs @@ -8,7 +8,7 @@ @@ -16,7 +16,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -33,7 +33,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -51,7 +51,7 @@ @name="address" @type="text" @value={{@model.attributes.address}} - @label={{t "form.label.address"}} + @label={{t "form.address.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> diff --git a/ui/core/app/components/form/org/index.hbs b/ui/core/app/components/form/org/index.hbs index 45adc26d0..0bcc6df4c 100644 --- a/ui/core/app/components/form/org/index.hbs +++ b/ui/core/app/components/form/org/index.hbs @@ -10,7 +10,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -27,7 +27,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/project/index.hbs b/ui/core/app/components/form/project/index.hbs index 45adc26d0..0bcc6df4c 100644 --- a/ui/core/app/components/form/project/index.hbs +++ b/ui/core/app/components/form/project/index.hbs @@ -10,7 +10,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -27,7 +27,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/role/add-principals/index.hbs b/ui/core/app/components/form/role/add-principals/index.hbs index 86cefd36a..29e1a460c 100644 --- a/ui/core/app/components/form/role/add-principals/index.hbs +++ b/ui/core/app/components/form/role/add-principals/index.hbs @@ -15,9 +15,9 @@ - {{t 'form.label.id'}} - {{t 'form.label.name'}} - {{t 'form.label.type'}} + {{t 'form.id.label'}} + {{t 'form.name.label'}} + {{t 'form.type.label'}} diff --git a/ui/core/app/components/form/role/grants/index.hbs b/ui/core/app/components/form/role/grants/index.hbs index 098621b45..9cd980868 100644 --- a/ui/core/app/components/form/role/grants/index.hbs +++ b/ui/core/app/components/form/role/grants/index.hbs @@ -63,7 +63,7 @@ @error={{@model.errors.grants}} as |input|> - {{t "form.label.grant"}} + {{t "form.grant.label"}} diff --git a/ui/core/app/components/form/role/index.hbs b/ui/core/app/components/form/role/index.hbs index 45adc26d0..0bcc6df4c 100644 --- a/ui/core/app/components/form/role/index.hbs +++ b/ui/core/app/components/form/role/index.hbs @@ -10,7 +10,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -27,7 +27,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/components/form/target/add-host-sets/index.hbs b/ui/core/app/components/form/target/add-host-sets/index.hbs index bd0f9f5fe..46fc66308 100644 --- a/ui/core/app/components/form/target/add-host-sets/index.hbs +++ b/ui/core/app/components/form/target/add-host-sets/index.hbs @@ -14,9 +14,9 @@ - {{t 'form.label.id'}} - {{t 'form.label.name'}} - {{t 'form.label.type'}} + {{t 'form.id.label'}} + {{t 'form.name.label'}} + {{t 'form.type.label'}} {{t 'resources.host-catalog'}} diff --git a/ui/core/app/components/form/target/index.hbs b/ui/core/app/components/form/target/index.hbs index 5a977d2e4..7cc431613 100644 --- a/ui/core/app/components/form/target/index.hbs +++ b/ui/core/app/components/form/target/index.hbs @@ -8,7 +8,7 @@ @@ -16,7 +16,7 @@ @name="name" @type="text" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} as |field|> {{#if @model.errors.name}} @@ -32,7 +32,7 @@ @name="description" @type="text" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} as |field|> {{#if @model.errors.description}} @@ -49,7 +49,7 @@ @name="default_port" @type="number" @value={{@model.attributes.default_port}} - @label={{t "form.label.default_port"}} + @label={{t "form.default_port.label"}} @error={{@model.errors.default_port}} min="0" step="1" diff --git a/ui/core/app/components/form/user/index.hbs b/ui/core/app/components/form/user/index.hbs index 45adc26d0..0bcc6df4c 100644 --- a/ui/core/app/components/form/user/index.hbs +++ b/ui/core/app/components/form/user/index.hbs @@ -10,7 +10,7 @@ @name="name" @type="name" @value={{@model.name}} - @label={{t "form.label.name"}} + @label={{t "form.name.label"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -27,7 +27,7 @@ @name="description" @type="description" @value={{@model.description}} - @label={{t "form.label.description"}} + @label={{t "form.description.label"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs index 83ed4fa1a..a1af0308d 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs @@ -3,9 +3,9 @@ - {{t 'form.label.name'}} - {{t 'form.label.identification'}} - {{t 'form.label.id'}} + {{t 'form.name.label'}} + {{t 'form.login_name.label'}} + {{t 'form.id.label'}} diff --git a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs index 78e39a496..90ac6b2bc 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs @@ -22,9 +22,9 @@ - {{t 'form.label.name'}} - {{t 'form.label.type'}} - {{t 'form.label.id'}} + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} diff --git a/ui/core/app/templates/scopes/scope/authenticate/method.hbs b/ui/core/app/templates/scopes/scope/authenticate/method.hbs index 014adf65b..589acdbfa 100644 --- a/ui/core/app/templates/scopes/scope/authenticate/method.hbs +++ b/ui/core/app/templates/scopes/scope/authenticate/method.hbs @@ -11,13 +11,13 @@ @name="identification" @type="text" @value={{this.identification}} - @label={{t "form.label.identification"}} /> + @label={{t "form.login_name.label"}} /> + @label={{t "form.password.label"}} /> - {{t 'form.label.name'}} - {{t 'form.label.id'}} + {{t 'form.name.label'}} + {{t 'form.id.label'}} {{t "titles.actions"}} diff --git a/ui/core/app/templates/scopes/scope/groups/index.hbs b/ui/core/app/templates/scopes/scope/groups/index.hbs index 21fd64095..8b153a923 100644 --- a/ui/core/app/templates/scopes/scope/groups/index.hbs +++ b/ui/core/app/templates/scopes/scope/groups/index.hbs @@ -22,8 +22,8 @@ - {{t "form.label.name"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.id.label"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs index b0ef4a625..6a89c2bc1 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs @@ -3,9 +3,9 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} {{t "titles.actions"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs index a97f7852d..be027d78c 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs @@ -3,9 +3,9 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs index 2cac93ee4..98bc8c2b9 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs @@ -3,10 +3,10 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} - {{t "form.label.address"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} + {{t "form.address.label"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs index 1a4717479..dda201a70 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs @@ -24,9 +24,9 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs index 6fe82d12b..587b6a963 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs @@ -15,11 +15,11 @@ - {{t "form.label.id"}} + {{t "form.id.label"}} {{t "resources.user"}} {{t "resources.target"}} - {{t "form.label.started"}} - {{t "form.label.status"}} + {{t "form.started.label"}} + {{t "form.status.label"}} {{t "titles.actions"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs index af99edaec..987d342d1 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs @@ -24,9 +24,9 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs index 583a8df55..acdad4643 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs @@ -5,9 +5,9 @@ - {{t "form.label.name"}} - {{t "form.label.type"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.type.label"}} + {{t "form.id.label"}} {{t "titles.actions"}} diff --git a/ui/core/app/templates/scopes/scope/roles/index.hbs b/ui/core/app/templates/scopes/scope/roles/index.hbs index dcb462b4d..cf9ae52ca 100644 --- a/ui/core/app/templates/scopes/scope/roles/index.hbs +++ b/ui/core/app/templates/scopes/scope/roles/index.hbs @@ -22,8 +22,8 @@ - {{t "form.label.name"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.id.label"}} diff --git a/ui/core/app/templates/scopes/scope/roles/role/principals.hbs b/ui/core/app/templates/scopes/scope/roles/role/principals.hbs index 160c91c7b..2acc62cd0 100644 --- a/ui/core/app/templates/scopes/scope/roles/role/principals.hbs +++ b/ui/core/app/templates/scopes/scope/roles/role/principals.hbs @@ -5,9 +5,9 @@ - {{t 'form.label.name'}} - {{t 'form.label.type'}} - {{t 'form.label.id'}} + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} {{t "titles.actions"}} diff --git a/ui/core/app/templates/scopes/scope/users/index.hbs b/ui/core/app/templates/scopes/scope/users/index.hbs index 506abc01f..8ecec771c 100644 --- a/ui/core/app/templates/scopes/scope/users/index.hbs +++ b/ui/core/app/templates/scopes/scope/users/index.hbs @@ -22,8 +22,8 @@ - {{t "form.label.name"}} - {{t "form.label.id"}} + {{t "form.name.label"}} + {{t "form.id.label"}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index e462d9b33..2f30bf22e 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -83,26 +83,3 @@ descriptions: account-set-password: Set a password for the account. accounts-welcome: No accounts are available in this auth method. no-sessions: There are no active sessions at this time. -states: - info: Info - success: Success - warning: Warning - error: Error -form: - label: - id: ID - name: Name - description: Description - type: Type - identification: Username - password: Password - grant: Grant - principal: Principal - address: Address - protocol: Protocol - actions: Actions - default_port: Default Port - current_password: Current Password - new_password: New Password - started: Started - status: Status diff --git a/ui/core/translations/form/en-us.yaml b/ui/core/translations/form/en-us.yaml new file mode 100644 index 000000000..ff2030cff --- /dev/null +++ b/ui/core/translations/form/en-us.yaml @@ -0,0 +1,26 @@ +id: + label: ID +name: + label: Name +description: + label: Description +type: + label: Type +login_name: + label: Username +password: + label: Password +grant: + label: Grant +address: + label: Address +default_port: + label: Default Port +current_password: + label: Current Password +new_password: + label: New Password +started: + label: Started +status: + label: Status diff --git a/ui/core/translations/states/en-us.yaml b/ui/core/translations/states/en-us.yaml new file mode 100644 index 000000000..585ed6a26 --- /dev/null +++ b/ui/core/translations/states/en-us.yaml @@ -0,0 +1,4 @@ +info: Info +success: Success +warning: Warning +error: Error From eac4ebe2db0e57ddf45bb7d691bc923871565855 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 16:37:31 -0400 Subject: [PATCH 06/10] chore: add helper text to certain form fields --- ui/core/app/components/form/host/index.hbs | 3 +++ ui/core/app/components/form/role/grants/index.hbs | 4 ++-- ui/core/app/components/form/role/index.hbs | 2 ++ ui/core/app/components/form/target/index.hbs | 3 +++ ui/core/translations/form/en-us.yaml | 5 +++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/core/app/components/form/host/index.hbs b/ui/core/app/components/form/host/index.hbs index 7c0fcb8ef..af2ddf471 100644 --- a/ui/core/app/components/form/host/index.hbs +++ b/ui/core/app/components/form/host/index.hbs @@ -18,6 +18,7 @@ @value={{@model.name}} @label={{t "form.name.label"}} @error={{@model.errors.name}} + @helperText={{t "form.name.help"}} readonly={{false}} as |field|> {{#if @model.errors.name}} @@ -35,6 +36,7 @@ @value={{@model.description}} @label={{t "form.description.label"}} @error={{@model.errors.description}} + @helperText={{t "form.description.help"}} disabled={{@model.isSaving}} readonly={{false}} as |field|> @@ -53,6 +55,7 @@ @value={{@model.attributes.address}} @label={{t "form.address.label"}} @error={{@model.errors.name}} + @helperText={{t "form.address.help"}} readonly={{false}} as |field|> {{#if @model.errors.name}} diff --git a/ui/core/app/components/form/role/grants/index.hbs b/ui/core/app/components/form/role/grants/index.hbs index 9cd980868..d4fc71207 100644 --- a/ui/core/app/components/form/role/grants/index.hbs +++ b/ui/core/app/components/form/role/grants/index.hbs @@ -17,7 +17,7 @@ {{t "titles.new-grant"}} - + {{t "form.grant.label"}} - + diff --git a/ui/core/app/components/form/role/index.hbs b/ui/core/app/components/form/role/index.hbs index 0bcc6df4c..a35279612 100644 --- a/ui/core/app/components/form/role/index.hbs +++ b/ui/core/app/components/form/role/index.hbs @@ -12,6 +12,7 @@ @value={{@model.name}} @label={{t "form.name.label"}} @error={{@model.errors.name}} + @helperText={{t "form.name.help"}} readonly={{false}} as |field|> {{#if @model.errors.name}} @@ -29,6 +30,7 @@ @value={{@model.description}} @label={{t "form.description.label"}} @error={{@model.errors.description}} + @helperText={{t "form.description.help"}} disabled={{@model.isSaving}} readonly={{false}} as |field|> diff --git a/ui/core/app/components/form/target/index.hbs b/ui/core/app/components/form/target/index.hbs index 7cc431613..f061923bf 100644 --- a/ui/core/app/components/form/target/index.hbs +++ b/ui/core/app/components/form/target/index.hbs @@ -18,6 +18,7 @@ @value={{@model.name}} @label={{t "form.name.label"}} @error={{@model.errors.name}} + @helperText={{t "form.name.help"}} as |field|> {{#if @model.errors.name}} @@ -34,6 +35,7 @@ @value={{@model.description}} @label={{t "form.description.label"}} @error={{@model.errors.description}} + @helperText={{t "form.description.help"}} as |field|> {{#if @model.errors.description}} @@ -51,6 +53,7 @@ @value={{@model.attributes.default_port}} @label={{t "form.default_port.label"}} @error={{@model.errors.default_port}} + @helperText={{t "form.default_port.help"}} min="0" step="1" as |field|> diff --git a/ui/core/translations/form/en-us.yaml b/ui/core/translations/form/en-us.yaml index ff2030cff..1c271aaa9 100644 --- a/ui/core/translations/form/en-us.yaml +++ b/ui/core/translations/form/en-us.yaml @@ -2,18 +2,23 @@ id: label: ID name: label: Name + help: Optional name for identification purposes description: label: Description + help: Optional description for identification purposes type: label: Type + help: The type of the resource, to help differentiate schemas login_name: label: Username password: label: Password grant: label: Grant + help: A permissions grant string for a role address: label: Address + help: An IP, host name, or other routable address default_port: label: Default Port current_password: From e0f053113a8cde97205f442a0698df7486192cd5 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 17:42:47 -0400 Subject: [PATCH 07/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20account?= =?UTF-8?q?-related=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/account/password/index.hbs | 2 +- .../scope/auth-methods/auth-method/accounts.js | 2 +- .../auth-methods/auth-method/-navigation.hbs | 4 ++-- .../scope/auth-methods/auth-method/accounts.hbs | 2 +- .../auth-method/accounts/account/-header.hbs | 2 +- .../accounts/account/set-password/-header.hbs | 4 ++-- .../auth-methods/auth-method/accounts/index.hbs | 6 +++--- ui/core/translations/en-us.yaml | 8 -------- ui/core/translations/resources/en-us.yaml | 16 ++++++++++++---- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ui/core/app/components/form/account/password/index.hbs b/ui/core/app/components/form/account/password/index.hbs index 391a524d5..492e1c658 100644 --- a/ui/core/app/components/form/account/password/index.hbs +++ b/ui/core/app/components/form/account/password/index.hbs @@ -6,7 +6,7 @@ as |form| > diff --git a/ui/core/app/controllers/scopes/scope/auth-methods/auth-method/accounts.js b/ui/core/app/controllers/scopes/scope/auth-methods/auth-method/accounts.js index a922414ef..b6b542aa6 100644 --- a/ui/core/app/controllers/scopes/scope/auth-methods/auth-method/accounts.js +++ b/ui/core/app/controllers/scopes/scope/auth-methods/auth-method/accounts.js @@ -13,6 +13,6 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsController extends * @type {string} */ get breadCrumb() { - return this.intl.t('resources.accounts'); + return this.intl.t('resources.account.title_plural'); } } diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-navigation.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-navigation.hbs index 1c3f4d037..8862d9b4b 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-navigation.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-navigation.hbs @@ -3,6 +3,6 @@ {{t 'titles.details'}} - {{t 'titles.accounts'}} + {{t 'resources.account.title_plural'}} - \ No newline at end of file + diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts.hbs index 54c6c65e5..fe5b0c9ee 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts.hbs @@ -1,3 +1,3 @@ -{{title (t 'titles.accounts')}} +{{title (t 'resources.account.title_plural')}} {{outlet}} diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-header.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-header.hbs index 6d2a01ffa..834543f64 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-header.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-header.hbs @@ -1 +1 @@ -

{{t "resources.account"}}

+

{{t "resources.account.title"}}

diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs index 2a5ff843c..53aaf93f6 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header.hbs @@ -1,2 +1,2 @@ -

{{t "resources.account"}}

-

{{t 'descriptions.account-set-password'}}

+

{{t "resources.account.title"}}

+

{{t 'resources.account.messages.set-password.description'}}

diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs index a1af0308d..81b93da9c 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/index.hbs @@ -34,11 +34,11 @@ {{else}} - + - {{t "descriptions.accounts-welcome"}} + {{t "resources.account.messages.welcome.description"}} -{{/if}} \ No newline at end of file +{{/if}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 2f30bf22e..864b61001 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -18,9 +18,6 @@ target: host: types: static: Static -account: - types: - password: Password titles: iam: IAM new: New @@ -55,9 +52,6 @@ titles: members: Members group-members-welcome: Welcome to Members no-available-users: No Users Available - accounts: Accounts - account: Account - accounts-welcome: Welcome to Accounts no-sessions: No Active Sessions actions: Actions descriptions: @@ -80,6 +74,4 @@ descriptions: no-principals-available: Principals are not available for assignment. group-members-welcome: Users belonging to this group appear here. no-available-users: No users are available to add to this group. - account-set-password: Set a password for the account. - accounts-welcome: No accounts are available in this auth method. no-sessions: There are no active sessions at this time. diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml index da3e77a86..6e50a8523 100644 --- a/ui/core/translations/resources/en-us.yaml +++ b/ui/core/translations/resources/en-us.yaml @@ -1,3 +1,15 @@ +account: + title: Account + title_plural: Accounts + description: Accounts associate an IAM user with an auth method + messages: + welcome: + title: Welcome to Accounts + description: Create and manage accounts for an auth method. + set-password: + description: Set a password for the account. + types: + password: Password user: User users: Users role: Role @@ -18,8 +30,6 @@ host: Host hosts: Hosts target: Target targets: Targets -accounts: Accounts -account: Account sessions: Sessions session: Session descriptions: @@ -45,7 +55,5 @@ descriptions: hosts: A host is a computing element with a network address reachable from Boundary. A Host belongs to one and only one Host Catalog. A Host can be contained by zero or more Host Sets. The lifecycle of a Host is not tied to the lifecycle of any Host Sets. target: Target is abstract. A Target is deleted when the Scope it belongs to is deleted. targets: A target is a networked service a User can connect to and interact with through Boundary. A Target does not directly contain any secrets. A Target contains a collection of Hosts. A Target belongs to one and only one Scope. A Target can contain zero or more Host Sets. The lifecycle of a Target is not tied to the lifecycle of any Host Set. - accounts: Accounts - account: Account sessions: Sessions session: Session From 0241b8902de69aa2a0c572456fcd8f0d908fd9ef Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 17:54:53 -0400 Subject: [PATCH 08/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20auth=20?= =?UTF-8?q?method=20resource=20strings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controllers/scopes/scope/auth-methods.js | 2 +- ui/core/app/templates/scopes/scope.hbs | 2 +- .../scope/auth-methods/auth-method/-header.hbs | 4 ++-- .../templates/scopes/scope/auth-methods/index.hbs | 8 ++++---- .../app/templates/scopes/scope/authenticate.hbs | 4 ++-- .../templates/scopes/scope/authenticate/index.hbs | 4 ++-- ui/core/translations/en-us.yaml | 4 ---- ui/core/translations/resources/en-us.yaml | 15 +++++++++++---- 8 files changed, 23 insertions(+), 20 deletions(-) diff --git a/ui/core/app/controllers/scopes/scope/auth-methods.js b/ui/core/app/controllers/scopes/scope/auth-methods.js index ab152cf62..e84924fa3 100644 --- a/ui/core/app/controllers/scopes/scope/auth-methods.js +++ b/ui/core/app/controllers/scopes/scope/auth-methods.js @@ -13,6 +13,6 @@ export default class ScopesScopeAuthMethodsController extends Controller { * @type {string} */ get breadCrumb() { - return this.intl.t('resources.auth-methods'); + return this.intl.t('resources.auth-method.title_plural'); } } diff --git a/ui/core/app/templates/scopes/scope.hbs b/ui/core/app/templates/scopes/scope.hbs index 5f60d2607..341b098f8 100644 --- a/ui/core/app/templates/scopes/scope.hbs +++ b/ui/core/app/templates/scopes/scope.hbs @@ -20,7 +20,7 @@ {{t "resources.roles"}} - {{t "resources.auth-methods"}} + {{t "resources.auth-method.title_plural"}} diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs index f83a85430..18be0b9ea 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs @@ -1,2 +1,2 @@ -

{{t "resources.auth-method"}}

-

{{t "resources.descriptions.auth-method"}}

+

{{t "resources.auth-method.title"}}

+

{{t "resources.auth-method.description"}}

diff --git a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs index 90ac6b2bc..2acb8bfa1 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs @@ -1,7 +1,7 @@ -

{{t "resources.auth-methods"}}

-

{{t "resources.descriptions.auth-methods"}}

+

{{t "resources.auth-method.title_plural"}}

+

{{t "resources.auth-method.description"}}

@@ -56,9 +56,9 @@ {{else}} - + - {{t 'descriptions.auth-methods-welcome'}} + {{t 'resources.auth-method.messages.welcome.description'}} diff --git a/ui/core/app/templates/scopes/scope/authenticate.hbs b/ui/core/app/templates/scopes/scope/authenticate.hbs index 010282a00..05b901caa 100644 --- a/ui/core/app/templates/scopes/scope/authenticate.hbs +++ b/ui/core/app/templates/scopes/scope/authenticate.hbs @@ -39,11 +39,11 @@ {{#unless @model.authMethods}} - {{t "auth.descriptions.no-methods"}} + {{t "resources.auth-method.messages.none.description"}} diff --git a/ui/core/app/templates/scopes/scope/authenticate/index.hbs b/ui/core/app/templates/scopes/scope/authenticate/index.hbs index 22cc46f4e..effd53cbd 100644 --- a/ui/core/app/templates/scopes/scope/authenticate/index.hbs +++ b/ui/core/app/templates/scopes/scope/authenticate/index.hbs @@ -1,11 +1,11 @@ {{#unless @model}} - {{t "auth.descriptions.no-methods"}} + {{t "resources.auth-method.messages.none.description"}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 864b61001..235645b72 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -1,10 +1,8 @@ auth: titles: no-scopes: No Scopes Available - no-methods: No Authentication Method descriptions: no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access. - no-methods: No authentication methods were found for this scope. Switch scopes and try again. choose-org: Choose a scope to authenticate. authenticating-with-org: "You're authenticating with {name}." method-types: @@ -35,7 +33,6 @@ titles: users-welcome: Welcome to Users roles-welcome: Welcome to Roles groups-welcome: Welcome to Groups - auth-methods-welcome: Welcome to Auth Methods targets-welcome: Create your first Target target-host-sets-welcome: No Host Sets Associated grants: Permissions @@ -65,7 +62,6 @@ descriptions: users-welcome: Users are authorized to access Boundary. roles-welcome: Roles are collections of capabilities that can be granted to user and/or groups. groups-welcome: Groups are collections of users. - auth-methods-welcome: Auth methods are configurations to authenticate users. targets-welcome: Targets provide Users the means to connect to and interact networked services. A Target contains a collection of Hosts and a collection of Credentials. target-host-sets-welcome: Add Host Sets to this target to provide access. no-host-set-hosts: Before associating hosts with this host set, create hosts within the host catalog. diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml index 6e50a8523..60a6e303d 100644 --- a/ui/core/translations/resources/en-us.yaml +++ b/ui/core/translations/resources/en-us.yaml @@ -10,6 +10,17 @@ account: description: Set a password for the account. types: password: Password +auth-method: + title: Auth Method + title_plural: Auth Methods + description: An authentication method is a method configured for an Organization to authenticate Users. An Authentication Method is owned by one and only one Organization. + messages: + welcome: + title: Welcome to Auth Methods + description: Auth methods are configurations to authenticate users. + none: + title: No Authentication Methods + description: No authentication methods were found for this scope. Switch scopes and try again. user: User users: Users role: Role @@ -22,8 +33,6 @@ projects: Projects project: Project host-catalog: Host Catalog host-catalogs: Host Catalogs -auth-method: Auth Method -auth-methods: Auth Methods host-set: Host Set host-sets: Host Sets host: Host @@ -47,8 +56,6 @@ descriptions: projects: A project is a child scope of an organization and is owned by an Organization. A Project inherits from Scope ("is-a" Scope) allowing it to own zero to many Groups, Roles, Targets, or Host Catalogs. A Project also inherits from Principal ("is-a" Principal) allowing it to be associated with zero or more Roles. A Project has no additional relationships beyond those defined in Scope and Principal. A Project is deleted when the Organization it belongs to is deleted. host-catalog: A host catalog is a permission boundary modeled as a container. host-catalogs: A host catalog is a permission boundary modeled as a container. - auth-method: An Authentication Method creates and references zero or more Users. An Authentication Method is deleted when the Organization it belongs to is deleted. The lifecycle of an Authentication Method is not tied to the lifecycle of any User. - auth-methods: An authentication method is a method configured for an Organization to authenticate Users. An Authentication Method is owned by one and only one Organization. host-set: Host Set is abstract. A Host Set is deleted when the Host Catalog it belongs to is deleted. host-sets: A host set is a resource which provides a subset of Hosts from the set of Hosts of the Host Catalog it belongs to. A Host Set belongs to one and only one Host Catalog. A Host Set can contain zero or more Hosts. A Host Set can be contained by zero or more Targets. The lifecycle of a Host Set is not tied to the lifecycle of any Targets or Hosts. host: Host is abstract. A Host is deleted when the Host Catalog it belongs to is deleted. From aee5f9e44bf478b9e6d46d5dee0b89d1d6ab7164 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 18:00:06 -0400 Subject: [PATCH 09/10] refactor: move auth method type strings --- ui/core/app/components/form/auth-method/index.hbs | 4 ++-- ui/core/app/templates/scopes/scope/auth-methods/index.hbs | 2 +- ui/core/app/templates/scopes/scope/authenticate.hbs | 2 +- ui/core/translations/en-us.yaml | 2 -- ui/core/translations/resources/en-us.yaml | 2 ++ 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/core/app/components/form/auth-method/index.hbs b/ui/core/app/components/form/auth-method/index.hbs index 782dceefd..df59e01d8 100644 --- a/ui/core/app/components/form/auth-method/index.hbs +++ b/ui/core/app/components/form/auth-method/index.hbs @@ -6,7 +6,7 @@ as |form| > @@ -50,4 +50,4 @@ @disabled={{if @model.cannotSave @model.cannotSave}} @submitText={{t "actions.save"}} @cancelText={{t "actions.cancel"}} /> - \ No newline at end of file + diff --git a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs index 2acb8bfa1..e1c23f96f 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs @@ -42,7 +42,7 @@ - {{t (concat 'auth.method-types.' authMethod.type)}} + {{t (concat 'resources.auth-method.types.' authMethod.type)}} diff --git a/ui/core/app/templates/scopes/scope/authenticate.hbs b/ui/core/app/templates/scopes/scope/authenticate.hbs index 05b901caa..0bee46a27 100644 --- a/ui/core/app/templates/scopes/scope/authenticate.hbs +++ b/ui/core/app/templates/scopes/scope/authenticate.hbs @@ -26,7 +26,7 @@ {{#each @model.authMethods as |authMethod|}} - {{t (concat "auth.method-types." authMethod.type)}} + {{t (concat "resources.auth-method.types." authMethod.type)}} {{/each}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 235645b72..d53d5e4b9 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -5,8 +5,6 @@ auth: no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access. choose-org: Choose a scope to authenticate. authenticating-with-org: "You're authenticating with {name}." - method-types: - password: Password host-set: types: static: Static diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml index 60a6e303d..acea170dd 100644 --- a/ui/core/translations/resources/en-us.yaml +++ b/ui/core/translations/resources/en-us.yaml @@ -21,6 +21,8 @@ auth-method: none: title: No Authentication Methods description: No authentication methods were found for this scope. Switch scopes and try again. + types: + password: Password user: User users: Users role: Role From 0169700b33ced64b64315111cb49b79a47e1e3d3 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 22 Sep 2020 18:16:54 -0400 Subject: [PATCH 10/10] refactor: move account and auth-method action strings --- .../scopes/scope/auth-methods/auth-method/-actions.hbs | 6 +++--- .../auth-methods/auth-method/accounts/account/-actions.hbs | 4 ++-- ui/core/translations/actions/en-us.yaml | 3 --- ui/core/translations/resources/en-us.yaml | 6 ++++++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs index 71a762a46..06335bd6d 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-actions.hbs @@ -3,13 +3,13 @@ @route="scopes.scope.auth-methods.auth-method.accounts.new" @model={{@model}} > - {{t "actions.add-account"}} + {{t "resources.account.actions.create"}} - {{t 'actions.delete-auth-method'}} + {{t 'resources.auth-method.actions.delete'}} - \ No newline at end of file + diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-actions.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-actions.hbs index 90b6d2189..ea1b0115d 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-actions.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/accounts/account/-actions.hbs @@ -4,6 +4,6 @@ @disabled={{@model.canSave}} {{on "click" (route-action "delete" @model)}} > - {{t 'actions.delete-account'}} + {{t 'actions.delete'}} - \ No newline at end of file + diff --git a/ui/core/translations/actions/en-us.yaml b/ui/core/translations/actions/en-us.yaml index 018b94b48..448810a32 100644 --- a/ui/core/translations/actions/en-us.yaml +++ b/ui/core/translations/actions/en-us.yaml @@ -16,17 +16,14 @@ delete-group: Delete group delete-role: Delete role delete-project: Delete project delete-host-catalog: Delete host catalog -delete-auth-method: Delete auth method delete-host-set: Delete host set delete-host: Delete host delete-target: Delete target -delete-account: Delete account add-host-set: Create Host Set add-host: Create Host add-host-sets: Add Host Sets add-principals: Add Principals add-members: Add Members add-hosts: Add Hosts -add-account: Create Account set-password: Set Password change-password: Change Password diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml index acea170dd..5a1e3ac32 100644 --- a/ui/core/translations/resources/en-us.yaml +++ b/ui/core/translations/resources/en-us.yaml @@ -10,6 +10,9 @@ account: description: Set a password for the account. types: password: Password + actions: + create: Create Account + delete: Delete Account auth-method: title: Auth Method title_plural: Auth Methods @@ -23,6 +26,9 @@ auth-method: description: No authentication methods were found for this scope. Switch scopes and try again. types: password: Password + actions: + create: Create Auth Method + delete: Delete Auth Method user: User users: Users role: Role