chore: reorganize locale of actions

This commit is contained in:
Jason Song
2022-12-22 17:29:41 +08:00
parent c326ea5c20
commit 9eafbada53
11 changed files with 68 additions and 68 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ const (
// Runners show all the runners
func Runners(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.runners")
ctx.Data["Title"] = ctx.Tr("actions.runners")
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminRunners"] = true
@@ -44,7 +44,7 @@ func Runners(ctx *context.Context) {
// EditRunner show editing runner page
func EditRunner(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.runners.edit_runner")
ctx.Data["Title"] = ctx.Tr("actions.runners.edit_runner")
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminRunners"] = true
@@ -58,7 +58,7 @@ func EditRunner(ctx *context.Context) {
// EditRunnerPost response for editing runner
func EditRunnerPost(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.runners.edit")
ctx.Data["Title"] = ctx.Tr("actions.runners.edit")
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminRunners"] = true
actions_shared.RunnerDetailsEditPost(ctx, ctx.ParamsInt64(":runnerid"), 0, 0,
+1 -1
View File
@@ -44,7 +44,7 @@ func MustEnableActions(ctx *context.Context) {
}
func List(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.actions")
ctx.Data["Title"] = ctx.Tr("actions.actions")
ctx.Data["PageIsActions"] = true
var workflows git.Entries
+3 -3
View File
@@ -136,14 +136,14 @@ func RunnerDetailsEditPost(ctx *context.Context, runnerID, ownerID, repoID int64
err = actions_model.UpdateRunner(ctx, runner, "description", "custom_labels")
if err != nil {
log.Warn("RunnerDetailsEditPost.UpdateRunner failed: %v, url: %s", err, ctx.Req.URL)
ctx.Flash.Warning(ctx.Tr("admin.runners.update_runner_failed"))
ctx.Flash.Warning(ctx.Tr("actions.runners.update_runner_failed"))
ctx.Redirect(redirectTo)
return
}
log.Debug("RunnerDetailsEditPost success: %s", ctx.Req.URL)
ctx.Flash.Success(ctx.Tr("admin.runners.update_runner_success"))
ctx.Flash.Success(ctx.Tr("actions.runners.update_runner_success"))
ctx.Redirect(redirectTo)
}
@@ -155,7 +155,7 @@ func RunnerResetRegistrationToken(ctx *context.Context, ownerID, repoID int64, r
return
}
ctx.Flash.Success(ctx.Tr("admin.runners.reset_registration_token_success"))
ctx.Flash.Success(ctx.Tr("actions.runners.reset_registration_token_success"))
ctx.Redirect(redirectTo)
}