Skip to content

Commit 1ec6726

Browse files
Gusted0ko
authored andcommitted
chore(i18n): cleanup settings.adopt string (go-gitea#7451)
The translation of `settings.adopt` is not actually used, it is set as the title for a POST handler that does not actually render any template. It does render the the 'Internal server error' template, however for safety reasons it does not use the set context data. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7451 Reviewed-by: 0ko <[email protected]> Co-authored-by: Gusted <[email protected]> Co-committed-by: Gusted <[email protected]>
1 parent d28a64e commit 1ec6726

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

options/locale_next/locale_en-US.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"error.not_found.title": "Page not found",
2121
"alert.asset_load_failed": "Failed to load asset files from {path}. Please make sure the asset files can be accessed.",
2222
"alert.range_error": " must be a number between %[1]s and %[2]s.",
23-
"settings.adopt": "Adopt",
2423
"install.invalid_lfs_path": "Unable to create the LFS root at the specified path: %[1]s",
2524
"install.lfs_jwt_secret_failed": "Unable to generate a LFS JWT secret: %[1]s"
2625
}

routers/web/user/setting/adopt.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ import (
1616

1717
// AdoptOrDeleteRepository adopts or deletes a repository
1818
func AdoptOrDeleteRepository(ctx *context.Context) {
19-
ctx.Data["Title"] = ctx.Tr("settings.adopt")
20-
ctx.Data["PageIsSettingsRepos"] = true
2119
allowAdopt := ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories
22-
ctx.Data["allowAdopt"] = allowAdopt
2320
allowDelete := ctx.IsUserSiteAdmin() || setting.Repository.AllowDeleteOfUnadoptedRepositories
24-
ctx.Data["allowDelete"] = allowDelete
2521

2622
dir := ctx.FormString("id")
2723
action := ctx.FormString("action")

0 commit comments

Comments
 (0)