From 9fc1ceede1c67b5489acf989c049f189f87716ae Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Fri, 1 Mar 2024 22:52:43 +0100 Subject: [PATCH 01/18] deduplicate search translations --- options/locale/locale_en-US.ini | 46 ++++++------------- templates/admin/base/search.tmpl | 2 +- templates/admin/emails/list.tmpl | 2 +- templates/admin/packages/list.tmpl | 2 +- templates/admin/repo/search.tmpl | 2 +- templates/admin/repo/unadopted.tmpl | 2 +- templates/admin/user/list.tmpl | 2 +- templates/code/searchcombo.tmpl | 7 +-- templates/code/searchform.tmpl | 10 ++-- templates/explore/repo_list.tmpl | 2 +- templates/explore/repo_search.tmpl | 2 +- templates/explore/search.tmpl | 2 +- templates/explore/user_list.tmpl | 2 +- templates/org/team/members.tmpl | 2 +- templates/org/team/repositories.tmpl | 2 +- templates/package/shared/list.tmpl | 2 +- templates/package/shared/versionlist.tmpl | 2 +- templates/projects/list.tmpl | 2 +- templates/repo/branch/list.tmpl | 4 +- templates/repo/commits_table.tmpl | 4 +- templates/repo/home.tmpl | 4 +- templates/repo/issue/search.tmpl | 2 +- templates/repo/search.tmpl | 17 +++---- templates/repo/settings/collaboration.tmpl | 4 +- templates/repo/settings/protected_branch.tmpl | 12 ++--- templates/repo/settings/tags.tmpl | 4 +- templates/shared/actions/runner_list.tmpl | 2 +- templates/shared/issuelist.tmpl | 2 +- templates/shared/searchinput.tmpl | 2 +- templates/user/dashboard/issues.tmpl | 2 +- templates/user/dashboard/milestones.tmpl | 2 +- templates/user/dashboard/repolist.tmpl | 2 +- 32 files changed, 65 insertions(+), 91 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 6d4e109e1dc66..1e54a39405acf 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -142,6 +142,19 @@ confirm_delete_selected = Confirm to delete all selected items? name = Name value = Value +[search] +search = Search +search_kind = Search %s... +type_tooltip = Search type +fuzzy = Fuzzy +fuzzy_tooltip = Include results that also match the search term closely +match = Match +match_tooltip = Include only results that match the exact search term +no_results = No %s matching your search term found. +unavailable = %s is currently not available. Please contact your site administrator. +kind.code = Code search +kind.keyword = Searching by keyword + [aria] navbar = Navigation Bar footer = Footer @@ -316,7 +329,6 @@ collaborative_repos = Collaborative Repositories my_orgs = My Organizations my_mirrors = My Mirrors view_home = View %s -search_repos = Find a repository… filter = Other Filters filter_by_team_repositories = Filter by team repositories feed_of = Feed of "%s" @@ -337,20 +349,8 @@ issues.in_your_repos = In your repositories repos = Repositories users = Users organizations = Organizations -search = Search go_to = Go to code = Code -search.type.tooltip = Search type -search.fuzzy = Fuzzy -search.fuzzy.tooltip = Include results that also matches the search term closely -search.match = Match -search.match.tooltip = Include only results that matches the exact search term -code_search_unavailable = Currently code search is not available. Please contact your site administrator. -repo_no_results = No matching repositories found. -user_no_results = No matching users found. -org_no_results = No matching organizations found. -code_no_results = No source code matching your search term found. -code_search_results = Search results for "%s" code_last_indexed_at = Last indexed %s relevant_repositories_tooltip = Repositories that are forks or that have no topic, no icon, and no description are hidden. relevant_repositories = Only relevant repositories are being shown, show unfiltered results. @@ -1282,9 +1282,7 @@ commits.desc = Browse source code change history. commits.commits = Commits commits.no_commits = No commits in common. "%s" and "%s" have entirely different histories. commits.nothing_to_compare = These branches are equal. -commits.search = Search commits… commits.search.tooltip = You can prefix keywords with "author:", "committer:", "after:", or "before:", e.g. "revert author:Alice before:2019-01-13". -commits.find = Search commits.search_all = All Branches commits.author = Author commits.message = Message @@ -1458,7 +1456,6 @@ issues.filter_sort.moststars = Most stars issues.filter_sort.feweststars = Fewest stars issues.filter_sort.mostforks = Most forks issues.filter_sort.fewestforks = Fewest forks -issues.keyword_search_unavailable = Searching by keyword is currently not available. Please contact your site administrator. issues.action_open = Open issues.action_close = Close issues.action_label = Label @@ -1989,17 +1986,6 @@ contributors.contribution_type.commits = Commits contributors.contribution_type.additions = Additions contributors.contribution_type.deletions = Deletions -search = Search -search.search_repo = Search repository -search.type.tooltip = Search type -search.fuzzy = Fuzzy -search.fuzzy.tooltip = Include results that also matches the search term closely -search.match = Match -search.match.tooltip = Include only results that matches the exact search term -search.results = Search results for "%s" in %s -search.code_no_results = No source code matching your search term found. -search.code_search_unavailable = Currently code search is not available. Please contact your site administrator. - settings = Settings settings.desc = Settings is where you can manage the settings for the repository settings.options = Repository @@ -2152,7 +2138,6 @@ settings.delete_collaborator = Remove settings.collaborator_deletion = Remove Collaborator settings.collaborator_deletion_desc = Removing a collaborator will revoke their access to this repository. Continue? settings.remove_collaborator_success = The collaborator has been removed. -settings.search_user_placeholder = Search user… settings.org_not_allowed_to_be_collaborator = Organizations cannot be added as a collaborator. settings.change_team_access_not_allowed = Changing team access for repository has been restricted to organization owner settings.team_not_in_organization = The team is not in the same organization as the repository @@ -2160,7 +2145,6 @@ settings.teams = Teams settings.add_team = Add Team settings.add_team_duplicate = Team already has the repository settings.add_team_success = The team now have access to the repository. -settings.search_team = Search Team… settings.change_team_permission_tip = Team's permission is set on the team setting page and can't be changed per repository settings.delete_team_tip = This team has access to all repositories and can't be removed settings.remove_team_success = The team's access to the repository has been removed. @@ -2313,9 +2297,7 @@ settings.protect_whitelist_committers = Whitelist Restricted Push settings.protect_whitelist_committers_desc = Only whitelisted users or teams will be allowed to push to this branch (but not force push). settings.protect_whitelist_deploy_keys = Whitelist deploy keys with write access to push. settings.protect_whitelist_users = Whitelisted users for pushing: -settings.protect_whitelist_search_users = Search users… settings.protect_whitelist_teams = Whitelisted teams for pushing: -settings.protect_whitelist_search_teams = Search teams… settings.protect_merge_whitelist_committers = Enable Merge Whitelist settings.protect_merge_whitelist_committers_desc = Allow only whitelisted users or teams to merge pull requests into this branch. settings.protect_merge_whitelist_users = Whitelisted users for merging: @@ -2560,7 +2542,6 @@ branch.default_deletion_failed = Branch "%s" is the default branch. It cannot be branch.restore = Restore Branch "%s" branch.download = Download Branch "%s" branch.rename = Rename Branch "%s" -branch.search = Search Branch branch.included_desc = This branch is part of the default branch branch.included = Included branch.create_new_branch = Create branch from branch: @@ -2705,7 +2686,6 @@ teams.write_permission_desc = This team grants Write access: me teams.admin_permission_desc = This team grants Admin access: members can read from, push to and add collaborators to team repositories. teams.create_repo_permission_desc = Additionally, this team grants Create repository permission: members can create new repositories in organization. teams.repositories = Team Repositories -teams.search_repo_placeholder = Search repository… teams.remove_all_repos_title = Remove all team repositories teams.remove_all_repos_desc = This will remove all repositories from the team. teams.add_all_repos_title = Add all repositories diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 0fecb61d9e367..d070baac77393 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -2,7 +2,7 @@
{{template "shared/searchinput" dict "Value" .Keyword}} - +
diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index bcd80368e663c..4ae3d6e59c9d6 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -8,7 +8,7 @@
{{template "shared/searchinput" dict "Value" .Keyword}} - +
diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index cf860dab2ab1a..bcfa6edb07a55 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -22,7 +22,7 @@ {{$type.Name}} {{end}} - + diff --git a/templates/admin/repo/search.tmpl b/templates/admin/repo/search.tmpl index 247ec5491a87f..7093fd49ccbec 100644 --- a/templates/admin/repo/search.tmpl +++ b/templates/admin/repo/search.tmpl @@ -2,7 +2,7 @@
{{template "shared/searchinput" dict "Value" .Keyword}} - +
diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index fb4f16791da84..fd6d252132d7f 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -11,7 +11,7 @@
- +
diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 8fdc80fc70494..fd494525e3914 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -55,7 +55,7 @@
{{template "shared/searchinput" dict "Value" .Keyword}} - +
diff --git a/templates/code/searchcombo.tmpl b/templates/code/searchcombo.tmpl index d451bc0ad8cea..780713d7c6b93 100644 --- a/templates/code/searchcombo.tmpl +++ b/templates/code/searchcombo.tmpl @@ -3,15 +3,12 @@
{{if .CodeIndexerUnavailable}}
-

{{ctx.Locale.Tr "explore.code_search_unavailable"}}

+

{{ctx.Locale.Tr "search.unavailable" (ctx.Locale.Tr "search.kind.code")}}

{{else if .SearchResults}} -

- {{ctx.Locale.Tr "explore.code_search_results" .Keyword}} -

{{template "code/searchresults" .}} {{else if .Keyword}} -
{{ctx.Locale.Tr "explore.code_no_results"}}
+
{{ctx.Locale.Tr "search.no_results" (ctx.Locale.Tr "explore.code")}}
{{end}}
{{template "base/paginate" .}} diff --git a/templates/code/searchform.tmpl b/templates/code/searchform.tmpl index fae1340046838..6bdc8849586e2 100644 --- a/templates/code/searchform.tmpl +++ b/templates/code/searchform.tmpl @@ -1,14 +1,14 @@
{{template "shared/searchinput" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable}} - diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index c51dcaa3ffda2..843ab25d4e530 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -58,7 +58,7 @@
{{else}}
- {{ctx.Locale.Tr "explore.repo_no_results"}} + {{ctx.Locale.Tr "search.no_results" (ctx.Locale.Tr "explore.repos")}}
{{end}} diff --git a/templates/explore/repo_search.tmpl b/templates/explore/repo_search.tmpl index e268670e93ee9..60a2c0bddad33 100644 --- a/templates/explore/repo_search.tmpl +++ b/templates/explore/repo_search.tmpl @@ -9,7 +9,7 @@ {{else if .TabName}} {{end}} - + diff --git a/templates/explore/search.tmpl b/templates/explore/search.tmpl index 2bb5f319d13fb..30a51ed24995e 100644 --- a/templates/explore/search.tmpl +++ b/templates/explore/search.tmpl @@ -2,7 +2,7 @@
{{template "shared/searchinput" dict "Value" .Keyword}} - +
diff --git a/templates/explore/user_list.tmpl b/templates/explore/user_list.tmpl index 0d661d53cbaf7..051fad360a5e0 100644 --- a/templates/explore/user_list.tmpl +++ b/templates/explore/user_list.tmpl @@ -26,6 +26,6 @@ {{else}} -
{{ctx.Locale.Tr "explore.user_no_results"}}
+
{{ctx.Locale.Tr "search.no_results" (ctx.Locale.Tr "explore.users")}}
{{end}} diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index adaf83ae155e5..774ce5f187ac9 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -14,7 +14,7 @@ diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 5a32eea64fa79..3c9d516c4684f 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -14,7 +14,7 @@ {{.CsrfTokenHtml}} diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 51e080f495167..66606b8767c2a 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -10,7 +10,7 @@ {{$type.Name}} {{end}} - + {{end}} diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index eee952c096e88..eb8a4abe6a58c 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -15,7 +15,7 @@ {{end}} - +
diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index 30fbd498a4ec6..66d4032a46184 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -24,7 +24,7 @@ diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 46503cb5df300..03faa34fb1121 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -75,9 +75,9 @@
- +
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 054a3f6bec8bb..9fc50e440b68b 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -12,14 +12,14 @@ {{if .PageIsCommits}}
- +
{{else if .IsDiffCompare}} {{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 2c08fb02d5f24..15127c85c7050 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -15,8 +15,8 @@