From 6d2f1dcbbfabfc25f201fd045fda3599e883fa74 Mon Sep 17 00:00:00 2001 From: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:06:38 -0800 Subject: [PATCH] Cleanup worker filter translations (#2621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 💡 clean-up worker filter translations --- addons/core/translations/actions/en-us.yaml | 2 + addons/core/translations/en-us.yaml | 41 ++++++++++--------- addons/core/translations/form/en-us.yaml | 2 + addons/core/translations/resources/en-us.yaml | 19 +-------- .../credential-store/actions/index.hbs | 2 +- .../credential-store/nav/index.hbs | 2 +- .../form/host-catalog/aws/index.hbs | 4 +- .../form/storage-bucket/aws/index.hbs | 4 +- .../form/storage-bucket/minio/index.hbs | 4 +- .../components/targets/target/nav/index.hbs | 2 +- .../worker-filter-generator/index.hbs | 39 ++++++------------ ui/admin/app/templates/scopes/scope.hbs | 2 +- .../credential-store/edit-worker-filter.hbs | 8 ++-- .../credential-store/worker-filter.hbs | 16 +++----- .../scopes/scope/targets/target/workers.hbs | 28 +++++-------- .../app/templates/scopes/scope/workers.hbs | 7 +--- .../templates/scopes/scope/workers/index.hbs | 4 +- .../tests/acceptance/targets/workers-test.js | 10 +++-- 18 files changed, 74 insertions(+), 122 deletions(-) diff --git a/addons/core/translations/actions/en-us.yaml b/addons/core/translations/actions/en-us.yaml index 3bcd875c0..7ed7bcd09 100644 --- a/addons/core/translations/actions/en-us.yaml +++ b/addons/core/translations/actions/en-us.yaml @@ -63,3 +63,5 @@ narrow-results: Narrow results overflow-options: Overflow Options show-errors: Show Errors hide-errors: Hide Errors +edit-worker-filter: Edit Worker Filter +add-worker-filter: Add Worker Filter diff --git a/addons/core/translations/en-us.yaml b/addons/core/translations/en-us.yaml index 3cff6634e..5aabdfa9d 100644 --- a/addons/core/translations/en-us.yaml +++ b/addons/core/translations/en-us.yaml @@ -44,6 +44,8 @@ titles: not-set: Not set year: '{numberOfYears, plural, =1 {# year} other {# years}}' days: '{days, plural, =1 {# day} other {# days}}' + workers: Workers + no-worker-filter: No worker filter added descriptions: empty-set: There are no items to display yet. You may be able to add items or try back later. cluster-url-initialization: To get started, please enter your cluster URL @@ -134,26 +136,25 @@ settings: cache-daemon: There may be a problem with the cache daemon client-agent: There may be a problem with the client agent worker-filter-generator: + title: Filter generator + description: Choose what you want to format into a filter. + link: Learn more about formatting a worker filter. toggle: title: Show filter generator description: The generator will automatically generate a pre-formatted filter for you. You can copy the result to the editor above. - filter-generator: - title: Filter generator - description: Choose what you want to format into a filter. - link: Learn more about formatting a worker filter. - input-values: - title: Input values - description: Next, input what you want to format. - formatted-result: - title: Formatted result - description: Copy and paste this into the editor above. - label: Generated result - tag: - label: Tag - helper: Format a worker tag - name: - label: Name - helper: Format a worker name - operator: - matches: matches - contains: contains + input-values: + title: Input values + description: Next, input what you want to format. + formatted-result: + title: Formatted result + description: Copy and paste this into the editor above. + label: Generated result + tag: + label: Tag + helper: Format a worker tag + name: + label: Name + helper: Format a worker name + operator: + matches: matches + contains: contains diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 8be1621eb..b5aea8ebf 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -183,3 +183,5 @@ created: other_fields: label: Other Fields help: This information is provided by the server and cannot be edited in Boundary +worker_filter: + label: Worker Filter diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 9098e9a7c..dff49b81e 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -239,7 +239,6 @@ host-catalog: label: Client/Application ID help: The client (application) ID of an Azure service principal that Boundary will use to authenticate and discover hosts from Azure. worker_filter: - label: Worker Filter help: Insert a worker filter in order to route requests to the correct worker. host-set: title: Host Set @@ -501,7 +500,6 @@ storage-bucket: label: Secret access key help: The secret access key generated by your storage provider for the IAM user to use with this storage bucket. We will not show this data after it is saved, but you can replace it. worker_filter: - label: Worker filter help: Filters to the worker(s) that can handle requests for this storage bucket. disable_credential_rotation: label: Disable credential rotation @@ -782,11 +780,9 @@ target: title: Add Injected Application Credential Sources description: Select injected Application credential sources to assign to this target. workers: - title: Workers description: You can customize how your workers route traffic to this target by setting up a filter that matches specific worker tags. If your target is in a private network, we recommend setting up an egress filter to specify a worker inside the network so that Boundary can access the host. Ingress and egress filters are allowed to select the same worker. messages: none: - title: No worker filter added description: You haven't added an {type} worker filter yet. diagram: client: Client @@ -812,14 +808,10 @@ target: title: Edit Ingress Worker Filter description: Specify workers Boundary should use to start the route to this target. worker-filter: - title: Worker filter description: The worker filter format for this target. accordion-label: egress-workers: Egress workers ingress-workers: Ingress workers - actions: - edit-worker-filter: Edit worker filter - add-worker-filter: Add worker filter credential-store: title: Credential Store title_plural: Credential Stores @@ -830,19 +822,14 @@ credential-store: titles: new: New Credential Store worker-filter: - title: Worker Filter - description: The worker filter format for this credential store. + description: A filter used to control which PKI workers can handle Vault requests, allowing the use of private Vault instances with Boundary. messages: none: - title: No worker filter added description: You haven't added a worker filter yet. edit: - title: Edit Worker Filter description: Specify workers that have access to the credential store. actions: - add: Add Worker Filter delete: Delete Credential Store - edit: Edit Worker Filter types: vault: Vault static: Static @@ -878,9 +865,6 @@ credential-store: help: A PEM-encoded private key matching the client certificate from Client Certificate. client_certificate_key_hmac: label: Client Certificate Key HMAC - worker_filter: - label: Worker Filter - help: A filter used to control which PKI workers can handle Vault requests, allowing the use of private Vault instances with Boundary. credential-library: title: Credential Library title_plural: Credential Libraries @@ -1014,7 +998,6 @@ managed-group: help: The list of groups that this Managed Group belongs to. worker: title: Worker - title_plural: Workers titles: new: New PKI Worker description: Workers are the server components that perform the session handling. diff --git a/ui/admin/app/components/credential-stores/credential-store/actions/index.hbs b/ui/admin/app/components/credential-stores/credential-store/actions/index.hbs index d7b116d16..912a1c064 100644 --- a/ui/admin/app/components/credential-stores/credential-store/actions/index.hbs +++ b/ui/admin/app/components/credential-stores/credential-store/actions/index.hbs @@ -21,7 +21,7 @@ {{#if (and (feature-flag 'vault-worker-filter') @model.isVault)}} {{/if}} {{#if (can 'delete model' @model)}} diff --git a/ui/admin/app/components/credential-stores/credential-store/nav/index.hbs b/ui/admin/app/components/credential-stores/credential-store/nav/index.hbs index 307868cc0..0f3142cfc 100644 --- a/ui/admin/app/components/credential-stores/credential-store/nav/index.hbs +++ b/ui/admin/app/components/credential-stores/credential-store/nav/index.hbs @@ -12,7 +12,7 @@ - {{t 'resources.credential-store.worker-filter.title'}} + {{t 'form.worker_filter.label'}} {{/if}} {{#if (can 'navigate model' @model collection='credential-libraries')}} diff --git a/ui/admin/app/components/form/host-catalog/aws/index.hbs b/ui/admin/app/components/form/host-catalog/aws/index.hbs index ecb43eb59..b78775ad6 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -360,9 +360,7 @@ disabled={{form.disabled}} as |F| > - - {{t 'resources.host-catalog.form.worker_filter.label'}} - + {{t 'form.worker_filter.label'}} {{t 'resources.host-catalog.form.worker_filter.help'}} diff --git a/ui/admin/app/components/form/storage-bucket/aws/index.hbs b/ui/admin/app/components/form/storage-bucket/aws/index.hbs index 51f7cc1bc..838f4f9c4 100644 --- a/ui/admin/app/components/form/storage-bucket/aws/index.hbs +++ b/ui/admin/app/components/form/storage-bucket/aws/index.hbs @@ -464,9 +464,7 @@ @isRequired={{true}} as |F| > - {{t - 'resources.storage-bucket.form.worker_filter.label' - }} + {{t 'form.worker_filter.label'}} {{t 'resources.storage-bucket.form.worker_filter.help'}} diff --git a/ui/admin/app/components/form/storage-bucket/minio/index.hbs b/ui/admin/app/components/form/storage-bucket/minio/index.hbs index 1761c2701..76c7ca069 100644 --- a/ui/admin/app/components/form/storage-bucket/minio/index.hbs +++ b/ui/admin/app/components/form/storage-bucket/minio/index.hbs @@ -323,9 +323,7 @@ @isRequired={{true}} as |F| > - {{t - 'resources.storage-bucket.form.worker_filter.label' - }} + {{t 'form.worker_filter.label'}} {{t 'resources.storage-bucket.form.worker_filter.help'}} diff --git a/ui/admin/app/components/targets/target/nav/index.hbs b/ui/admin/app/components/targets/target/nav/index.hbs index 6f5ed5e3e..c0f88501a 100644 --- a/ui/admin/app/components/targets/target/nav/index.hbs +++ b/ui/admin/app/components/targets/target/nav/index.hbs @@ -8,7 +8,7 @@ {{t 'titles.details'}} - {{t 'resources.target.workers.title'}} + {{t 'titles.workers'}} {{t 'resources.target.host-source.title_plural'}} diff --git a/ui/admin/app/components/worker-filter-generator/index.hbs b/ui/admin/app/components/worker-filter-generator/index.hbs index 54306a42f..8a214ddb3 100644 --- a/ui/admin/app/components/worker-filter-generator/index.hbs +++ b/ui/admin/app/components/worker-filter-generator/index.hbs @@ -51,15 +51,15 @@ {{on 'change' this.setGeneratorType}} as |G| > - {{t 'worker-filter-generator.filter-generator.title'}} + {{t 'worker-filter-generator.title'}} - {{t 'worker-filter-generator.filter-generator.description'}} + {{t 'worker-filter-generator.description'}}
- {{t 'worker-filter-generator.filter-generator.link'}} + {{t 'worker-filter-generator.link'}}
- {{t - 'worker-filter-generator.filter-generator.tag.label' - }} - {{t - 'worker-filter-generator.filter-generator.tag.helper' - }} + {{t 'worker-filter-generator.tag.label'}} + {{t 'worker-filter-generator.tag.helper'}} - {{t - 'worker-filter-generator.filter-generator.name.label' - }} - {{t - 'worker-filter-generator.filter-generator.name.helper' - }} + {{t 'worker-filter-generator.name.label'}} + {{t 'worker-filter-generator.name.helper'}} @@ -96,10 +88,10 @@ as |F| > {{t - 'worker-filter-generator.filter-generator.input-values.title' + 'worker-filter-generator.input-values.title' }} {{t - 'worker-filter-generator.filter-generator.input-values.description' + 'worker-filter-generator.input-values.description' }} {{#if (eq this.selectedGeneratorType this.generatorTagType)}} @@ -133,12 +125,7 @@ {{#if (eq operator '==')}} {{operator}} {{else}} - {{t - (concat - 'worker-filter-generator.filter-generator.operator.' - operator - ) - }} + {{t (concat 'worker-filter-generator.operator.' operator)}} {{/if}} {{/each}} @@ -169,14 +156,14 @@ as |F| > {{t - 'worker-filter-generator.filter-generator.formatted-result.title' + 'worker-filter-generator.formatted-result.title' }} {{t - 'worker-filter-generator.filter-generator.formatted-result.description' + 'worker-filter-generator.formatted-result.description' }} {{t - 'worker-filter-generator.filter-generator.formatted-result.label' + 'worker-filter-generator.formatted-result.label' }}
- {{t 'resources.worker.title_plural'}} + {{t 'titles.workers'}} {{/if}} diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/edit-worker-filter.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/edit-worker-filter.hbs index e45c15585..ec1f89d48 100644 --- a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/edit-worker-filter.hbs +++ b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/edit-worker-filter.hbs @@ -3,11 +3,9 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{page-title - (t 'resources.credential-store.worker-filter.messages.edit.title') -}} +{{page-title (t 'actions.edit-worker-filter')}} @@ -18,7 +16,7 @@ - {{t 'resources.credential-store.worker-filter.messages.edit.title'}} + {{t 'actions.edit-worker-filter'}} diff --git a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/worker-filter.hbs b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/worker-filter.hbs index f3d1d3a3e..ad9332253 100644 --- a/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/worker-filter.hbs +++ b/ui/admin/app/templates/scopes/scope/credential-stores/credential-store/worker-filter.hbs @@ -3,9 +3,9 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{page-title (t 'resources.credential-store.worker-filter.title')}} +{{page-title (t 'form.worker_filter.label')}} @@ -38,9 +38,7 @@ @hasCopyButton={{true}} as |CB| > - - {{t 'resources.credential-store.worker-filter.title'}} - + {{t 'form.worker_filter.label'}} {{t 'resources.credential-store.worker-filter.description'}} @@ -48,11 +46,7 @@ {{else}} - + diff --git a/ui/admin/app/templates/scopes/scope/targets/target/workers.hbs b/ui/admin/app/templates/scopes/scope/targets/target/workers.hbs index b9342a4ae..8c4113100 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/workers.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/workers.hbs @@ -3,9 +3,9 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{page-title (t 'resources.target.workers.title')}} +{{page-title (t 'titles.workers')}} @@ -55,8 +55,8 @@ @text={{t (if @model.ingress_worker_filter - 'resources.target.workers.actions.edit-worker-filter' - 'resources.target.workers.actions.add-worker-filter' + 'actions.edit-worker-filter' + 'actions.add-worker-filter' ) }} @route='scopes.scope.targets.target.edit-ingress-worker-filter' @@ -72,18 +72,14 @@ @value={{@model.ingress_worker_filter}} as |CB| > - {{t - 'resources.target.workers.worker-filter.title' - }} + {{t 'form.worker_filter.label'}} {{t 'resources.target.workers.worker-filter.description' }} {{else}} - + - {{t - 'resources.target.workers.worker-filter.title' - }} + {{t 'form.worker_filter.label'}} {{t 'resources.target.workers.worker-filter.description' }} {{else}} - + +{{page-title (t 'titles.workers')}} + {{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/workers/index.hbs b/ui/admin/app/templates/scopes/scope/workers/index.hbs index 09ad386fa..82ffe5c99 100644 --- a/ui/admin/app/templates/scopes/scope/workers/index.hbs +++ b/ui/admin/app/templates/scopes/scope/workers/index.hbs @@ -11,7 +11,7 @@

- {{t 'resources.worker.title_plural'}} + {{t 'titles.workers'}}

@@ -218,7 +218,7 @@ 'descriptions.neither-list-nor-create' ) ) - resource=(t 'resources.worker.title_plural') + resource=(t 'titles.workers') }} /> {{#if diff --git a/ui/admin/tests/acceptance/targets/workers-test.js b/ui/admin/tests/acceptance/targets/workers-test.js index 8d2857e24..a3dfe9116 100644 --- a/ui/admin/tests/acceptance/targets/workers-test.js +++ b/ui/admin/tests/acceptance/targets/workers-test.js @@ -14,6 +14,7 @@ module('Acceptance | targets | workers', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); + let intl; let featuresService; let featureEdition; @@ -52,6 +53,7 @@ module('Acceptance | targets | workers', function (hooks) { }; hooks.beforeEach(async function () { + intl = this.owner.lookup('service:intl'); featuresService = this.owner.lookup('service:features'); featureEdition = this.owner.lookup('service:featureEdition'); @@ -258,10 +260,10 @@ module('Acceptance | targets | workers', function (hooks) { assert .dom(ACCORDION_DROPDOWN_TEXT_SELECTOR('egress')) - .hasText('Add worker filter'); + .hasText(intl.t('actions.add-worker-filter')); assert .dom(ACCORDION_DROPDOWN_TEXT_SELECTOR('ingress')) - .hasText('Add worker filter'); + .hasText(intl.t('actions.add-worker-filter')); }); test('user will see "Edit worker filter" if filter is set', async function (assert) { @@ -272,10 +274,10 @@ module('Acceptance | targets | workers', function (hooks) { assert .dom(ACCORDION_DROPDOWN_TEXT_SELECTOR('egress')) - .hasText('Edit worker filter'); + .hasText(intl.t('actions.edit-worker-filter')); assert .dom(ACCORDION_DROPDOWN_TEXT_SELECTOR('ingress')) - .hasText('Edit worker filter'); + .hasText(intl.t('actions.edit-worker-filter')); }); test('user can cancel changes to egress worker filter in a target', async function (assert) {