Skip to content

Commit 3d9b966

Browse files
authored
Merge branch 'main' into fix-pr-perm
2 parents b89a961 + ce65613 commit 3d9b966

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

models/actions/run_list.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
repo_model "code.gitea.io/gitea/models/repo"
1111
user_model "code.gitea.io/gitea/models/user"
1212
"code.gitea.io/gitea/modules/container"
13+
"code.gitea.io/gitea/modules/translation"
1314
webhook_module "code.gitea.io/gitea/modules/webhook"
1415

1516
"xorm.io/builder"
@@ -112,14 +113,14 @@ type StatusInfo struct {
112113
}
113114

114115
// GetStatusInfoList returns a slice of StatusInfo
115-
func GetStatusInfoList(ctx context.Context) []StatusInfo {
116+
func GetStatusInfoList(ctx context.Context, lang translation.Locale) []StatusInfo {
116117
// same as those in aggregateJobStatus
117118
allStatus := []Status{StatusSuccess, StatusFailure, StatusWaiting, StatusRunning}
118119
statusInfoList := make([]StatusInfo, 0, 4)
119120
for _, s := range allStatus {
120121
statusInfoList = append(statusInfoList, StatusInfo{
121122
Status: int(s),
122-
DisplayedStatus: s.String(),
123+
DisplayedStatus: s.LocaleString(lang),
123124
})
124125
}
125126
return statusInfoList

routers/web/repo/actions/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ func prepareWorkflowList(ctx *context.Context, workflows []Workflow) {
306306
}
307307
ctx.Data["Actors"] = shared_user.MakeSelfOnTop(ctx.Doer, actors)
308308

309-
ctx.Data["StatusInfoList"] = actions_model.GetStatusInfoList(ctx)
309+
ctx.Data["StatusInfoList"] = actions_model.GetStatusInfoList(ctx, ctx.Locale)
310310

311311
pager := context.NewPagination(int(total), opts.PageSize, opts.Page, 5)
312312
pager.AddParamFromRequest(ctx.Req)

templates/org/home.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
{{if .ShowMemberAndTeamTab}}
1717
<div class="ui five wide column">
1818
{{if .CanCreateOrgRepo}}
19-
<div class="center aligned tw-mb-4">
20-
<a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
19+
<div class="tw-flex tw-flex-wrap tw-justify-center tw-gap-x-1 tw-gap-y-2 tw-mb-4">
20+
<a class="ui primary button tw-grow" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
2121
{{if not .DisableNewPullMirrors}}
22-
<a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
22+
<a class="ui primary button tw-grow" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
2323
{{end}}
2424
</div>
2525
<div class="divider"></div>

0 commit comments

Comments
 (0)