From 8e8610d2f8d677492307b615fdddb9b279b840a6 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Wed, 10 Jun 2026 09:16:26 +0200 Subject: [PATCH] fix(ui): dedup, fix, improve various strings (#12843) Multiple fixes squashed into one PR for simplicity. See individual commit messages in the PR for details Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12843 Reviewed-by: Gusted --- options/locale/locale_en-US.ini | 8 ++++---- options/locale_next/locale_en-US.json | 19 +++++++------------ templates/repo/pulls/status.tmpl | 2 +- templates/shared/actions/runner_create.tmpl | 8 ++++---- templates/shared/secrets/add_list.tmpl | 2 +- tests/e2e/runner-management.test.e2e.ts | 8 ++++---- 6 files changed, 21 insertions(+), 26 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 4989de655d..4788ed1ad0 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1717,8 +1717,8 @@ issues.due_date_remove = removed the due date %s %s issues.due_date_overdue = Overdue issues.due_date_invalid = The due date is invalid or out of range. Please use the format "yyyy-mm-dd". issues.dependency.title = Dependencies -issues.dependency.issue_no_dependencies = No dependencies set. -issues.dependency.pr_no_dependencies = No dependencies set. +issues.dependency.issue_no_dependencies = No dependencies set +issues.dependency.pr_no_dependencies = No dependencies set issues.dependency.no_permission_1 = You do not have permission to read %d dependency issues.dependency.no_permission_n = You do not have permission to read %d dependencies issues.dependency.no_permission.can_remove = You do not have permission to read this dependency but can remove this dependency @@ -1900,8 +1900,8 @@ pulls.status_checks_failure = Some checks failed pulls.status_checks_error = Some checks reported errors pulls.status_checks_requested = Required pulls.status_checks_details = Details -pulls.status_checks_hide_all = Hide all checks -pulls.status_checks_show_all = Show all checks +pulls.status_checks_hide_all = Hide checks +pulls.status_checks_show_all = Show checks pulls.update_branch = Update branch by merge pulls.update_branch_rebase = Update branch by rebase pulls.update_branch_success = Branch update was successful diff --git a/options/locale_next/locale_en-US.json b/options/locale_next/locale_en-US.json index 03a7ab28a4..d21c32162c 100644 --- a/options/locale_next/locale_en-US.json +++ b/options/locale_next/locale_en-US.json @@ -90,7 +90,6 @@ }, "repo.pulls.maintainers_can_edit": "Maintainers can edit this pull request.", "repo.pulls.maintainers_cannot_edit": "Maintainers cannot edit this pull request.", - "repo.pulls.status_checks_skipped": "Skipped", "repo.form.cannot_create": "All spaces in which you can create repositories have reached the limit of repositories.", "repo.view.gitmodules_too_large": "The .gitmodules file is too large and will be ignored (on API calls for instance)", "repo.packages.visibility_warning": "This repository is private, but linked packages are public (owner %s is public).", @@ -292,15 +291,15 @@ "admin.monitor.queue": "Queue: %s", "admin.monitor.queue.name": "Name", "admin.monitor.queue.type": "Type", - "admin.monitor.queue.exemplar": "Exemplar Type", + "admin.monitor.queue.exemplar": "Exemplar type", "admin.monitor.queue.numberworkers": "Number of workers", "admin.monitor.queue.activeworkers": "Active workers", - "admin.monitor.queue.maxnumberworkers": "Max Number of workers", + "admin.monitor.queue.maxnumberworkers": "Max number of workers", "admin.monitor.queue.numberinqueue": "Number in queue", "admin.monitor.queue.review_add": "Review / add workers", "admin.monitor.queue.settings.title": "Pool settings", "admin.monitor.queue.settings.description": "Pools dynamically grow in response to their worker queue blocking.", - "admin.monitor.queue.settings.maxnumberworkers": "Max Number of workers", + "admin.monitor.queue.settings.maxnumberworkers": "Max number of workers", "admin.monitor.queue.settings.maxnumberworkers.placeholder": "Currently %[1]d", "admin.monitor.queue.settings.maxnumberworkers.error": "Max number of workers must be a number", "admin.monitor.queue.settings.submit": "Update settings", @@ -469,7 +468,7 @@ "settings.authorized_integration.create_success": "Created authorized integration: %s", "settings.authorized_integration.field.name": "Name", "settings.authorized_integration.field.description": "Description", - "settings.authorized_integration.field.description.placeholder": "Used to publish packages when ...", + "settings.authorized_integration.field.description.placeholder": "Used to publish packages when…", "settings.authorized_integration.field.audience": "Audience (aud Claim)", "settings.authorized_integration.field.issuer": "Issuer (iss Claim)", "settings.authorized_integration.field.claim_rules": "Claim Rules JSON", @@ -791,13 +790,9 @@ "actions.runners.task_list.commit": "Commit", "actions.runners.task_list.done_at": "Done at", "actions.runners.edit_runner_button": "Edit runner", - "actions.runners.create_runner.page_title": "Create new runner", + "actions.runners.create_runner.page_title": "New runner", "actions.runners.create_runner.title": "Create new runner", - "actions.runners.create_runner.properties_fieldset": "Properties", - "actions.runners.create_runner.name_label": "Name", - "actions.runners.create_runner.description_label": "Description", "actions.runners.create_runner.create_button": "Create", - "actions.runners.create_runner.cancel_button": "Cancel", "actions.runners.edit_runner.page_title": "Edit runner %s", "actions.runners.edit_runner.title": "Edit runner %s", "actions.runners.edit_runner.properties_fieldset": "Properties", @@ -876,7 +871,6 @@ "actions.workflow.pre_execution_error": "Workflow was not executed due to an error that blocked the execution attempt.", "actions.workflow.rerun_impossible": "The workflow cannot be rerun.", "actions.workflow.job_rerun_impossible": "The job cannot be rerun.", - "actions.secrets.creation.name_description": "The name of a secret can only contain letters, numbers, and underscores. It cannot start with FORGEJO_, GITEA_, GITHUB_, or a number. Forgejo will automatically convert it to uppercase.", "actions.secrets.creation.value_description": "The value of a secret can be any text. Special characters are retained. CRLF (Windows-style line breaks) is automatically converted to LF. Encode the value with Base64 if linebreaks should be retained.", "actions.variables.mutation.name_description": "The name of a variable can only contain letters, numbers, and underscores. It cannot be named CI or start with FORGEJO_, GITEA_, GITHUB_, or a number. Forgejo will automatically convert it to uppercase.", "actions.variables.mutation.value_description": "A variable's value can be any text. Special characters are retained. CRLF (Windows-style line breaks) is automatically converted to LF. Encode the value with Base64 if linebreaks should be retained.", @@ -891,7 +885,7 @@ "actions.variables.deletion.failed": "Failed to remove variable.", "actions.variables.deletion.success": "The variable has been removed.", "actions.variables.description": "Variables will be passed to certain actions and cannot be read otherwise.", - "actions.variables.edit": "Edit Variable", + "actions.variables.edit": "Edit variable", "actions.variables.not_found": "Failed to find the variable.", "actions.variables.update.failed": "Failed to edit variable.", "actions.variables.update.success": "The variable has been edited.", @@ -915,6 +909,7 @@ "members.user": "User", "members.user_already_member": "This user is already a member of the organization.", "members.no_team_selected": "Organization members must belong to at least one team.", + "pulls.status_checks.skipped": "Some checks were skipped", "pulls.manual_merge.helper": "Manual merge helper", "pulls.manual_merge.helpder.description": "Use this merge commit message when completing the merge manually.", "pulls.manual_merge.commit.title": "Merge commit title", diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl index 56e8259f4e..98f1095180 100644 --- a/templates/repo/pulls/status.tmpl +++ b/templates/repo/pulls/status.tmpl @@ -15,7 +15,7 @@ Template Attributes: {{else if eq .CommitStatus.State "success"}} {{ctx.Locale.Tr "repo.pulls.status_checks_success"}} {{else if eq .CommitStatus.State "skipped"}} - {{ctx.Locale.Tr "repo.pulls.status_checks_skipped"}} + {{ctx.Locale.Tr "pulls.status_checks.skipped"}} {{else if eq .CommitStatus.State "warning"}} {{ctx.Locale.Tr "repo.pulls.status_checks_warning"}} {{else if eq .CommitStatus.State "failure"}} diff --git a/templates/shared/actions/runner_create.tmpl b/templates/shared/actions/runner_create.tmpl index d42005441e..7cb23d8d8e 100644 --- a/templates/shared/actions/runner_create.tmpl +++ b/templates/shared/actions/runner_create.tmpl @@ -4,19 +4,19 @@
- {{ctx.Locale.Tr "actions.runners.create_runner.properties_fieldset"}} + {{ctx.Locale.Tr "actions.runners.edit_runner.properties_fieldset"}}
- +
- +
diff --git a/templates/shared/secrets/add_list.tmpl b/templates/shared/secrets/add_list.tmpl index d2eb74b406..0e418f0da3 100644 --- a/templates/shared/secrets/add_list.tmpl +++ b/templates/shared/secrets/add_list.tmpl @@ -73,7 +73,7 @@ value="{{.name}}" pattern="^(?!FORGEJO_|GITEA_|GITHUB_)[a-zA-Z_][a-zA-Z0-9_]*$" > -

{{ctx.Locale.Tr "actions.secrets.creation.name_description"}}

+

{{ctx.Locale.Tr "actions.secrets.mutation.name_description"}}

diff --git a/tests/e2e/runner-management.test.e2e.ts b/tests/e2e/runner-management.test.e2e.ts index 02edbd6e87..29dfe5d02c 100644 --- a/tests/e2e/runner-management.test.e2e.ts +++ b/tests/e2e/runner-management.test.e2e.ts @@ -98,14 +98,14 @@ test.describe('Runners of user2', () => { await expect(rows.nth(1)).toHaveAccessibleName('88932 Waiting 49f55ab99b -'); }); - test('create new runner', async ({page}) => { + test('Create new runner', async ({page}) => { await page.goto('/user/settings/actions/runners'); await expect(page.getByRole('heading', {name: 'Manage runners'})).toBeVisible(); await page.getByRole('link', {name: 'Create new runner'}).click(); - await expect(page).toHaveTitle(/^Create new runner .*/); + await expect(page).toHaveTitle(/^New runner .*/); // Submit an invalid form to test validation. await page.getByRole('button', {name: 'Create'}).click(); @@ -218,7 +218,7 @@ test.describe('Runners of user2', () => { `); }); - test('regenerate runner token', async ({page}) => { + test('Regenerate runner token', async ({page}) => { await page.goto('/user/settings/actions/runners'); await page.getByRole('link', {name: 'Edit runner-2', exact: true}).click(); @@ -420,7 +420,7 @@ test.describe('Global runners', () => { await page.getByRole('link', {name: 'Create new runner'}).click(); - await expect(page).toHaveTitle(/^Create new runner .*/); + await expect(page).toHaveTitle(/^New runner .*/); // Submit an invalid form to test validation. await page.getByRole('button', {name: 'Create'}).click();