aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorFelipe Leopoldo Sologuren GutiƩrrez <fsologureng@users.noreply.github.com>2023-02-01 19:56:10 -0300
committerGitHub <noreply@github.com>2023-02-01 22:56:10 +0000
commit15c035775a9684cf409ec8bf8a082ae5293a03ab (patch)
treee9a015b3c435c72acf3d068db0f826d3aeedef6e /routers/web
parent1e0e79dcbfb21971ac4cd591585672517117d4f0 (diff)
downloadgitea-15c035775a9684cf409ec8bf8a082ae5293a03ab.tar.gz
gitea-15c035775a9684cf409ec8bf8a082ae5293a03ab.zip
Add main landmark to templates and adjust titles (#22670)
* Add main aria landmark to templates * Adjust some titles to improve understanding of location in navigation Contributed by @Forgejo
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/admin/hooks.go1
-rw-r--r--routers/web/repo/setting.go6
-rw-r--r--routers/web/repo/setting_protected_branch.go4
-rw-r--r--routers/web/repo/tag.go2
-rw-r--r--routers/web/user/setting/account.go2
-rw-r--r--routers/web/user/setting/adopt.go2
-rw-r--r--routers/web/user/setting/applications.go2
-rw-r--r--routers/web/user/setting/keys.go2
-rw-r--r--routers/web/user/setting/profile.go8
-rw-r--r--routers/web/user/setting/security/security.go2
10 files changed, 16 insertions, 15 deletions
diff --git a/routers/web/admin/hooks.go b/routers/web/admin/hooks.go
index 57cf5f49e5..46dc734d25 100644
--- a/routers/web/admin/hooks.go
+++ b/routers/web/admin/hooks.go
@@ -22,6 +22,7 @@ const (
func DefaultOrSystemWebhooks(ctx *context.Context) {
var err error
+ ctx.Data["Title"] = ctx.Tr("admin.hooks")
ctx.Data["PageIsAdminSystemHooks"] = true
ctx.Data["PageIsAdminDefaultHooks"] = true
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go
index e970dab3eb..da52957548 100644
--- a/routers/web/repo/setting.go
+++ b/routers/web/repo/setting.go
@@ -60,7 +60,7 @@ const (
// SettingsCtxData is a middleware that sets all the general context data for the
// settings template.
func SettingsCtxData(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("repo.settings")
+ ctx.Data["Title"] = ctx.Tr("repo.settings.options")
ctx.Data["PageIsSettingsOptions"] = true
ctx.Data["ForcePrivate"] = setting.Repository.ForcePrivate
ctx.Data["MirrorsEnabled"] = setting.Mirror.Enabled
@@ -879,7 +879,7 @@ func handleSettingRemoteAddrError(ctx *context.Context, err error, form *forms.R
// Collaboration render a repository's collaboration page
func Collaboration(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("repo.settings")
+ ctx.Data["Title"] = ctx.Tr("repo.settings.collaboration")
ctx.Data["PageIsSettingsCollaboration"] = true
users, err := repo_model.GetCollaborators(ctx, ctx.Repo.Repository.ID, db.ListOptions{})
@@ -1119,7 +1119,7 @@ func GitHooksEditPost(ctx *context.Context) {
// DeployKeys render the deploy keys list of a repository page
func DeployKeys(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys")
+ ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys") + " / " + ctx.Tr("secrets.secrets")
ctx.Data["PageIsSettingsKeys"] = true
ctx.Data["DisableSSH"] = setting.SSH.Disabled
diff --git a/routers/web/repo/setting_protected_branch.go b/routers/web/repo/setting_protected_branch.go
index 31abde1ef6..a54565c1f1 100644
--- a/routers/web/repo/setting_protected_branch.go
+++ b/routers/web/repo/setting_protected_branch.go
@@ -31,7 +31,7 @@ const (
// ProtectedBranchRules render the page to protect the repository
func ProtectedBranchRules(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("repo.settings")
+ ctx.Data["Title"] = ctx.Tr("repo.settings.branches")
ctx.Data["PageIsSettingsBranches"] = true
rules, err := git_model.FindRepoProtectedBranchRules(ctx, ctx.Repo.Repository.ID)
@@ -46,7 +46,7 @@ func ProtectedBranchRules(ctx *context.Context) {
// SetDefaultBranchPost set default branch
func SetDefaultBranchPost(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("repo.settings")
+ ctx.Data["Title"] = ctx.Tr("repo.settings.branches.update_default_branch")
ctx.Data["PageIsSettingsBranches"] = true
repo := ctx.Repo.Repository
diff --git a/routers/web/repo/tag.go b/routers/web/repo/tag.go
index aa9edc7375..95bc6dfce7 100644
--- a/routers/web/repo/tag.go
+++ b/routers/web/repo/tag.go
@@ -133,7 +133,7 @@ func DeleteProtectedTagPost(ctx *context.Context) {
}
func setTagsContext(ctx *context.Context) error {
- ctx.Data["Title"] = ctx.Tr("repo.settings")
+ ctx.Data["Title"] = ctx.Tr("repo.settings.tags")
ctx.Data["PageIsSettingsTags"] = true
protectedTags, err := git_model.GetProtectedTags(ctx, ctx.Repo.Repository.ID)
diff --git a/routers/web/user/setting/account.go b/routers/web/user/setting/account.go
index 95b3b4040d..dbaa8fd351 100644
--- a/routers/web/user/setting/account.go
+++ b/routers/web/user/setting/account.go
@@ -30,7 +30,7 @@ const (
// Account renders change user's password, user's email and user suicide page
func Account(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.account")
ctx.Data["PageIsSettingsAccount"] = true
ctx.Data["Email"] = ctx.Doer.Email
ctx.Data["EnableNotifyMail"] = setting.Service.EnableNotifyMail
diff --git a/routers/web/user/setting/adopt.go b/routers/web/user/setting/adopt.go
index 0aaf5920bc..844d6fa166 100644
--- a/routers/web/user/setting/adopt.go
+++ b/routers/web/user/setting/adopt.go
@@ -17,7 +17,7 @@ import (
// AdoptOrDeleteRepository adopts or deletes a repository
func AdoptOrDeleteRepository(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.adopt")
ctx.Data["PageIsSettingsRepos"] = true
allowAdopt := ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories
ctx.Data["allowAdopt"] = allowAdopt
diff --git a/routers/web/user/setting/applications.go b/routers/web/user/setting/applications.go
index b66806ff2d..ac935e51bb 100644
--- a/routers/web/user/setting/applications.go
+++ b/routers/web/user/setting/applications.go
@@ -21,7 +21,7 @@ const (
// Applications render manage access token page
func Applications(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.applications")
ctx.Data["PageIsSettingsApplications"] = true
loadApplicationsData(ctx)
diff --git a/routers/web/user/setting/keys.go b/routers/web/user/setting/keys.go
index ec50eef9c1..0ecc39ecd1 100644
--- a/routers/web/user/setting/keys.go
+++ b/routers/web/user/setting/keys.go
@@ -23,7 +23,7 @@ const (
// Keys render user's SSH/GPG public keys page
func Keys(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.ssh_gpg_keys")
ctx.Data["PageIsSettingsKeys"] = true
ctx.Data["DisableSSH"] = setting.SSH.Disabled
ctx.Data["BuiltinSSH"] = setting.SSH.StartBuiltinServer
diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go
index af16195250..e01f3cdeea 100644
--- a/routers/web/user/setting/profile.go
+++ b/routers/web/user/setting/profile.go
@@ -42,7 +42,7 @@ const (
// Profile render user's profile page
func Profile(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.profile")
ctx.Data["PageIsSettingsProfile"] = true
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
@@ -219,7 +219,7 @@ func DeleteAvatar(ctx *context.Context) {
// Organization render all the organization of the user
func Organization(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.organization")
ctx.Data["PageIsSettingsOrganization"] = true
opts := organization.FindOrgOptions{
@@ -254,7 +254,7 @@ func Organization(ctx *context.Context) {
// Repos display a list of all repositories of the user
func Repos(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.repos")
ctx.Data["PageIsSettingsRepos"] = true
ctx.Data["allowAdopt"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories
ctx.Data["allowDelete"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowDeleteOfUnadoptedRepositories
@@ -360,7 +360,7 @@ func Repos(ctx *context.Context) {
// Appearance render user's appearance settings
func Appearance(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.appearance")
ctx.Data["PageIsSettingsAppearance"] = true
var hiddenCommentTypes *big.Int
diff --git a/routers/web/user/setting/security/security.go b/routers/web/user/setting/security/security.go
index db6faaed6e..6e6e7efb0b 100644
--- a/routers/web/user/setting/security/security.go
+++ b/routers/web/user/setting/security/security.go
@@ -22,7 +22,7 @@ const (
// Security render change user's password page and 2FA
func Security(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Tr("settings")
+ ctx.Data["Title"] = ctx.Tr("settings.security")
ctx.Data["PageIsSettingsSecurity"] = true
if ctx.FormString("openid.return_to") != "" {