From 049cda526b3acd654b468444561fddedc1dc201a Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Mon, 23 Jun 2025 17:56:28 +0200 Subject: [PATCH] feat(ui): use kbd in label selector hint, remove enter (#8199) Rel: https://codeberg.org/forgejo/forgejo/pulls/7958 Also remove Enter from the hint as it is not working right now, ref https://codeberg.org/forgejo/forgejo/issues/1335#issuecomment-1073523 Preview: * https://codeberg.org/attachments/b8eb7525-2bbe-4216-97f5-bc10aee1f3e2 * https://codeberg.org/attachments/37e3734e-0f51-4a8b-add6-7bc0e0a5ad6b Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8199 Reviewed-by: Beowulf --- build/lint-locale/lint-locale_test.go | 1 + options/locale/locale_en-US.ini | 2 +- web_src/js/features/repo-issue.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/lint-locale/lint-locale_test.go b/build/lint-locale/lint-locale_test.go index 9e9a931feb..dd146c0d70 100644 --- a/build/lint-locale/lint-locale_test.go +++ b/build/lint-locale/lint-locale_test.go @@ -37,6 +37,7 @@ func TestLocalizationPolicy(t *testing.T) { assert.Empty(t, checkLocaleContent([]byte("teams.specific_repositories_helper = Members will only have access to repositories explicitly added to the team. Selecting this will not automatically remove repositories already added with All repositories."))) assert.Empty(t, checkLocaleContent([]byte("sqlite_helper = File path for the SQLite3 database.
Enter an absolute path if you run Forgejo as a service."))) assert.Empty(t, checkLocaleContent([]byte("hi_user_x = Hi %s,"))) + assert.Empty(t, checkLocaleContent([]byte("key = Press Shift"))) assert.Equal(t, []string{"error404: The page you are trying to reach either does not exist or you are not authorized to view it."}, checkLocaleContent([]byte("error404 = The page you are trying to reach either does not exist or you are not authorized to view it."))) }) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 0bb128f8b3..5fd2ebd163 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1610,7 +1610,7 @@ issues.remove_ref_at = `removed reference %s %s` issues.add_ref_at = `added reference %s %s` issues.delete_branch_at = `deleted branch %s %s` issues.filter_label = Label -issues.filter_label_exclude = `Use alt + click/enter to exclude labels` +issues.filter_label_exclude = Use Alt + Click to exclude labels issues.filter_label_no_select = All labels issues.filter_label_select_no_label = No label issues.filter_milestone = Milestone diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 889687da3e..297329d816 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -167,6 +167,7 @@ export function initRepoIssueSidebarList() { }); }); + // FIXME: this is broken, see discussion https://codeberg.org/forgejo/forgejo/pulls/8199 $('.menu .ui.dropdown.label-filter').on('keydown', (e) => { if (e.altKey && e.keyCode === 13) { const selectedItem = document.querySelector('.menu .ui.dropdown.label-filter .menu .item.selected');