Skip to content

Commit d41608c

Browse files
authored
Merge branch 'main' into prevent-race-in-qdc-test
2 parents 888c148 + 726715f commit d41608c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+172
-52
lines changed

.eslintrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ env:
2323

2424
globals:
2525
__webpack_public_path__: true
26-
CodeMirror: false
27-
Dropzone: false
28-
SimpleMDE: false
2926

3027
settings:
3128
html/html-extensions: [".tmpl"]
@@ -34,7 +31,6 @@ overrides:
3431
- files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl"]
3532
env:
3633
browser: true
37-
jquery: true
3834
node: false
3935
- files: ["templates/**/*.tmpl"]
4036
rules:

models/repo_list.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ type SearchRepoOptions struct {
136136
Archived util.OptionalBool
137137
// only search topic name
138138
TopicOnly bool
139+
// only search repositories with specified primary language
140+
Language string
139141
// include description in keyword search
140142
IncludeDescription bool
141143
// None -> include has milestones AND has no milestone
@@ -439,6 +441,13 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond {
439441
cond = cond.And(keywordCond)
440442
}
441443

444+
if opts.Language != "" {
445+
cond = cond.And(builder.In("id", builder.
446+
Select("repo_id").
447+
From("language_stat").
448+
Where(builder.Eq{"language": opts.Language}).And(builder.Eq{"is_primary": true})))
449+
}
450+
442451
if opts.Fork != util.OptionalBoolNone {
443452
cond = cond.And(builder.Eq{"is_fork": opts.Fork == util.OptionalBoolTrue})
444453
}

modules/git/repo.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,22 @@ func InitRepository(ctx context.Context, repoPath string, bare bool) error {
7979

8080
// IsEmpty Check if repository is empty.
8181
func (repo *Repository) IsEmpty() (bool, error) {
82-
var errbuf strings.Builder
83-
if err := NewCommandContext(repo.Ctx, "log", "-1").RunInDirPipeline(repo.Path, nil, &errbuf); err != nil {
84-
if strings.Contains(errbuf.String(), "fatal: bad default revision 'HEAD'") ||
85-
strings.Contains(errbuf.String(), "fatal: your current branch 'master' does not have any commits yet") {
86-
return true, nil
87-
}
82+
var errbuf, output strings.Builder
83+
if err := NewCommandContext(repo.Ctx, "rev-list", "--all", "--count", "--max-count=1").
84+
RunWithContext(&RunContext{
85+
Timeout: -1,
86+
Dir: repo.Path,
87+
Stdout: &output,
88+
Stderr: &errbuf,
89+
}); err != nil {
8890
return true, fmt.Errorf("check empty: %v - %s", err, errbuf.String())
8991
}
9092

91-
return false, nil
93+
c, err := strconv.Atoi(strings.TrimSpace(output.String()))
94+
if err != nil {
95+
return true, fmt.Errorf("check empty: convert %s to count failed: %v", output.String(), err)
96+
}
97+
return c == 0, nil
9298
}
9399

94100
// CloneRepoOptions options when clone a repository

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ issues.filter_sort.moststars = Most stars
12631263
issues.filter_sort.feweststars = Fewest stars
12641264
issues.filter_sort.mostforks = Most forks
12651265
issues.filter_sort.fewestforks = Fewest forks
1266-
issues.keyword_search_unavailable = Currently searhing by keyword is not available. Please contact your site administrator.
1266+
issues.keyword_search_unavailable = Currently searching by keyword is not available. Please contact your site administrator.
12671267
issues.action_open = Open
12681268
issues.action_close = Close
12691269
issues.action_label = Label

options/locale/locale_ja-JP.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ comment_type_group_lock=ロック状態
563563
comment_type_group_review_request=レビュー依頼
564564
comment_type_group_pull_request_push=追加されたコミット
565565
comment_type_group_project=プロジェクト
566-
comment_type_group_issue_ref=イシューの参照
566+
comment_type_group_issue_ref=イシューの参照先
567567
saved_successfully=設定は正常に保存されました。
568568
privacy=プライバシー
569569
keep_activity_private=プロフィールページのアクティビティ表示を隠す

options/locale/locale_zh-CN.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ search=搜索
268268
code=代码
269269
search.fuzzy=模糊
270270
search.match=匹配
271+
code_search_unavailable=当前代码搜索不可用。请与网站管理员联系。
271272
repo_no_results=未找到匹配的仓库。
272273
user_no_results=未找到匹配的用户。
273274
org_no_results=未找到匹配的组织。
@@ -1262,6 +1263,7 @@ issues.filter_sort.moststars=点赞由多到少
12621263
issues.filter_sort.feweststars=点赞由少到多
12631264
issues.filter_sort.mostforks=派生由多到少
12641265
issues.filter_sort.fewestforks=派生由少到多
1266+
issues.keyword_search_unavailable=当前无法通过关键字搜索。请联系网站管理员。
12651267
issues.action_open=开启
12661268
issues.action_close=关闭
12671269
issues.action_label=标签
@@ -1707,6 +1709,8 @@ search.search_repo=搜索仓库...
17071709
search.fuzzy=模糊
17081710
search.match=匹配
17091711
search.results=在 <a href="%[2]s"> %[3]s </a> 中搜索 "%[1]s" 的结果
1712+
search.code_no_results=未找到与搜索字词匹配的源代码。
1713+
search.code_search_unavailable=当前代码搜索不可用。请与网站管理员联系。
17101714
17111715
settings=设置
17121716
settings.desc=设置是你可以管理仓库设置的地方

options/locale/locale_zh-TW.ini

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ search=搜尋
268268
code=程式碼
269269
search.fuzzy=模糊
270270
search.match=符合
271+
code_search_unavailable=現在無法使用程式碼搜尋。請與網站管理員聯絡。
271272
repo_no_results=沒有找到符合的儲存庫。
272273
user_no_results=沒有找到符合的使用者。
273274
org_no_results=沒有找到符合的組織。
@@ -549,6 +550,22 @@ continue=繼續操作
549550
cancel=取消
550551
language=語言
551552
ui=佈景主題
553+
hidden_comment_types=隱藏的留言類型
554+
comment_type_group_reference=參考
555+
comment_type_group_label=標籤
556+
comment_type_group_milestone=里程碑
557+
comment_type_group_assignee=負責人
558+
comment_type_group_title=標題
559+
comment_type_group_branch=分支
560+
comment_type_group_time_tracking=時間追蹤
561+
comment_type_group_deadline=最後期限
562+
comment_type_group_dependency=先決條件
563+
comment_type_group_lock=鎖定狀態
564+
comment_type_group_review_request=審核請求
565+
comment_type_group_pull_request_push=加入的提交
566+
comment_type_group_project=專案
567+
comment_type_group_issue_ref=問題參考
568+
saved_successfully=您的設定已成功儲存。
552569
privacy=隱私
553570
keep_activity_private=在個人資料頁面隱藏動態
554571
keep_activity_private_popup=讓動態只有你和管理員看得到
@@ -1152,7 +1169,7 @@ projects.open=開啟
11521169
projects.close=關閉
11531170

11541171
issues.desc=管理錯誤報告、任務和里程碑。
1155-
issues.filter_assignees=篩選成員
1172+
issues.filter_assignees=篩選負責人
11561173
issues.filter_milestones=篩選里程碑
11571174
issues.filter_projects=篩選專案
11581175
issues.filter_labels=篩選標籤
@@ -1176,10 +1193,10 @@ issues.new.no_milestone=未選擇里程碑
11761193
issues.new.clear_milestone=清除已選取里程碑
11771194
issues.new.open_milestone=開放中的里程碑
11781195
issues.new.closed_milestone=已關閉的里程碑
1179-
issues.new.assignees=成員
1180-
issues.new.add_assignees_title=指派成員
1181-
issues.new.clear_assignees=清除成員
1182-
issues.new.no_assignees=沒有成員
1196+
issues.new.assignees=負責人
1197+
issues.new.add_assignees_title=指派負責人
1198+
issues.new.clear_assignees=清除負責人
1199+
issues.new.no_assignees=沒有負責人
11831200
issues.new.no_reviewers=沒有審核者
11841201
issues.new.add_reviewer_title=請求審核
11851202
issues.choose.get_started=開始
@@ -1225,8 +1242,8 @@ issues.filter_label_exclude=`使用 <code>alt</code> + <code>click/enter</code>
12251242
issues.filter_label_no_select=所有標籤
12261243
issues.filter_milestone=里程碑
12271244
issues.filter_milestone_no_select=所有里程碑
1228-
issues.filter_assignee=成員
1229-
issues.filter_assginee_no_select=所有成員
1245+
issues.filter_assignee=負責人
1246+
issues.filter_assginee_no_select=所有負責人
12301247
issues.filter_type=類型
12311248
issues.filter_type.all_issues=所有問題
12321249
issues.filter_type.assigned_to_you=指派給您的
@@ -1246,13 +1263,14 @@ issues.filter_sort.moststars=最多星號
12461263
issues.filter_sort.feweststars=最少星號
12471264
issues.filter_sort.mostforks=最多 fork
12481265
issues.filter_sort.fewestforks=最少 fork
1266+
issues.keyword_search_unavailable=現在無法使用關鍵字搜尋。請與網站管理員聯絡。
12491267
issues.action_open=開放
12501268
issues.action_close=關閉
12511269
issues.action_label=標籤
12521270
issues.action_milestone=里程碑
12531271
issues.action_milestone_no_select=無里程碑
1254-
issues.action_assignee=成員
1255-
issues.action_assignee_no_select=沒有成員
1272+
issues.action_assignee=負責人
1273+
issues.action_assignee_no_select=沒有負責人
12561274
issues.opened_by=建立於 %[1]s 由 <a href="%[2]s">%[3]s</a>
12571275
pulls.merged_by=由 <a href="%[2]s">%[3]s</a> 建立,合併於 %[1]s
12581276
pulls.merged_by_fake=由 %[2]s 建立,合併於 %[1]s
@@ -1431,7 +1449,7 @@ issues.review.hide_resolved=隱藏已解決
14311449
issues.review.resolve_conversation=解決對話
14321450
issues.review.un_resolve_conversation=取消解決對話
14331451
issues.review.resolved_by=標記了此對話為已解決
1434-
issues.assignee.error=因為未預期的錯誤,未能成功指派所有成員
1452+
issues.assignee.error=因為未預期的錯誤,未能成功加入所有負責人
14351453
issues.reference_issue.body=內容
14361454
issues.content_history.deleted=刪除
14371455
issues.content_history.edited=編輯
@@ -1572,8 +1590,8 @@ milestones.edit_success=已更新里程碑「%s」。
15721590
milestones.deletion=刪除里程碑
15731591
milestones.deletion_desc=刪除里程碑會從所有相關的問題移除它。是否繼續?
15741592
milestones.deletion_success=里程碑已刪除
1575-
milestones.filter_sort.closest_due_date=到期日由近到遠
1576-
milestones.filter_sort.furthest_due_date=到期日由遠到近
1593+
milestones.filter_sort.closest_due_date=截止日期由近到遠
1594+
milestones.filter_sort.furthest_due_date=截止日期由遠到近
15771595
milestones.filter_sort.least_complete=完成度由低到高
15781596
milestones.filter_sort.most_complete=完成度由高到低
15791597
milestones.filter_sort.most_issues=問題由多到少
@@ -1691,6 +1709,8 @@ search.search_repo=搜尋儲存庫
16911709
search.fuzzy=模糊
16921710
search.match=符合
16931711
search.results=在 <a href="%s"> %s </a> 中搜尋 "%s" 的结果
1712+
search.code_no_results=找不到符合您關鍵字的原始碼。
1713+
search.code_search_unavailable=現在無法使用程式碼搜尋。請與網站管理員聯絡。
16941714

16951715
settings=設定
16961716
settings.desc=設定是您可以管理儲存庫設定的地方
@@ -1887,7 +1907,7 @@ settings.event_repository_desc=建立或刪除儲存庫。
18871907
settings.event_header_issue=問題事件
18881908
settings.event_issues=問題
18891909
settings.event_issues_desc=建立、編輯、關閉及重新開放問題。
1890-
settings.event_issue_assign=指派
1910+
settings.event_issue_assign=指派問題
18911911
settings.event_issue_assign_desc=指派或取消指派問題。
18921912
settings.event_issue_label=標籤
18931913
settings.event_issue_label_desc=更新或清除問題標籤。
@@ -1898,7 +1918,7 @@ settings.event_issue_comment_desc=已經建立、編輯或刪除的問題留言
18981918
settings.event_header_pull_request=合併請求事件
18991919
settings.event_pull_request=合併請求
19001920
settings.event_pull_request_desc=建立、編輯、關閉及重新開放合併請求。
1901-
settings.event_pull_request_assign=合併請求指派
1921+
settings.event_pull_request_assign=指派合併請求
19021922
settings.event_pull_request_assign_desc=指派或取消指派合併請求。
19031923
settings.event_pull_request_label=合併請求標籤
19041924
settings.event_pull_request_label_desc=更新或清除合併請求標籤。

routers/web/explore/repo.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
7878
topicOnly := ctx.FormBool("topic")
7979
ctx.Data["TopicOnly"] = topicOnly
8080

81+
language := ctx.FormTrim("language")
82+
ctx.Data["Language"] = language
83+
8184
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{
8285
ListOptions: db.ListOptions{
8386
Page: page,
@@ -91,6 +94,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
9194
AllPublic: true,
9295
AllLimited: true,
9396
TopicOnly: topicOnly,
97+
Language: language,
9498
IncludeDescription: setting.UI.SearchRepoDescription,
9599
})
96100
if err != nil {
@@ -105,6 +109,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
105109
pager := context.NewPagination(int(count), opts.PageSize, page, 5)
106110
pager.SetDefaultParams(ctx)
107111
pager.AddParam(ctx, "topic", "TopicOnly")
112+
pager.AddParam(ctx, "language", "Language")
108113
ctx.Data["Page"] = pager
109114

110115
ctx.HTML(http.StatusOK, opts.TplName)

routers/web/org/home.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ func Home(ctx *context.Context) {
8383
keyword := ctx.FormTrim("q")
8484
ctx.Data["Keyword"] = keyword
8585

86+
language := ctx.FormTrim("language")
87+
ctx.Data["Language"] = language
88+
8689
page := ctx.FormInt("page")
8790
if page <= 0 {
8891
page = 1
@@ -103,6 +106,7 @@ func Home(ctx *context.Context) {
103106
OrderBy: orderBy,
104107
Private: ctx.IsSigned,
105108
Actor: ctx.User,
109+
Language: language,
106110
IncludeDescription: setting.UI.SearchRepoDescription,
107111
})
108112
if err != nil {
@@ -148,6 +152,7 @@ func Home(ctx *context.Context) {
148152

149153
pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5)
150154
pager.SetDefaultParams(ctx)
155+
pager.AddParam(ctx, "language", "Language")
151156
ctx.Data["Page"] = pager
152157

153158
ctx.HTML(http.StatusOK, tplOrgHome)

routers/web/user/profile.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ func Profile(ctx *context.Context) {
232232

233233
keyword := ctx.FormTrim("q")
234234
ctx.Data["Keyword"] = keyword
235+
236+
language := ctx.FormTrim("language")
237+
ctx.Data["Language"] = language
238+
235239
switch tab {
236240
case "followers":
237241
items, err := user_model.GetUserFollowers(ctxUser, db.ListOptions{
@@ -283,6 +287,7 @@ func Profile(ctx *context.Context) {
283287
StarredByID: ctxUser.ID,
284288
Collaborate: util.OptionalBoolFalse,
285289
TopicOnly: topicOnly,
290+
Language: language,
286291
IncludeDescription: setting.UI.SearchRepoDescription,
287292
})
288293
if err != nil {
@@ -314,6 +319,7 @@ func Profile(ctx *context.Context) {
314319
WatchedByID: ctxUser.ID,
315320
Collaborate: util.OptionalBoolFalse,
316321
TopicOnly: topicOnly,
322+
Language: language,
317323
IncludeDescription: setting.UI.SearchRepoDescription,
318324
})
319325
if err != nil {
@@ -335,6 +341,7 @@ func Profile(ctx *context.Context) {
335341
Private: ctx.IsSigned,
336342
Collaborate: util.OptionalBoolFalse,
337343
TopicOnly: topicOnly,
344+
Language: language,
338345
IncludeDescription: setting.UI.SearchRepoDescription,
339346
})
340347
if err != nil {
@@ -349,6 +356,9 @@ func Profile(ctx *context.Context) {
349356

350357
pager := context.NewPagination(total, setting.UI.User.RepoPagingNum, page, 5)
351358
pager.SetDefaultParams(ctx)
359+
if tab != "followers" && tab != "following" && tab != "activity" && tab != "projects" {
360+
pager.AddParam(ctx, "language", "Language")
361+
}
352362
ctx.Data["Page"] = pager
353363

354364
ctx.Data["ShowUserEmail"] = len(ctxUser.Email) > 0 && ctx.IsSigned && (!ctxUser.KeepEmailPrivate || ctxUser.ID == ctx.User.ID)

templates/explore/repo_list.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
</div>
4141
<div class="metas df ac">
4242
{{if .PrimaryLanguage }}
43-
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
43+
<a href="{{$.Link}}?tab={{$.TabName}}&q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
44+
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
45+
</a>
4446
{{end}}
4547
{{if not $.DisableStars}}
4648
<span class="text grey df ac mr-3">{{svg "octicon-star" 16 "mr-3"}}{{.NumStars}}</span>

templates/explore/repo_search.tmpl

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,25 @@
66
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
77
</span>
88
<div class="menu">
9-
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
10-
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
11-
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
12-
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
13-
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
14-
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
9+
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
10+
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
11+
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
12+
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
13+
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
14+
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
1515
{{if not .DisableStars}}
16-
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
17-
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
16+
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
17+
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
1818
{{end}}
19-
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
20-
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
19+
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
20+
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}&language={{$.Language}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
2121
</div>
2222
</div>
2323
</div>
2424
<form class="ui form ignore-dirty" style="max-width: 90%">
2525
<input type="hidden" name="tab" value="{{$.TabName}}">
2626
<input type="hidden" name="sort" value="{{$.SortType}}">
27+
<input type="hidden" name="language" value="{{$.Language}}">
2728
<div class="ui fluid action input">
2829
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
2930
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>

web_src/js/components/ContextPopup.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
</template>
2525

2626
<script>
27+
import $ from 'jquery';
2728
import {SvgIcon} from '../svg.js';
2829
2930
const {appSubUrl, i18n} = window.config;

0 commit comments

Comments
 (0)