Skip to content

Commit 19e4e07

Browse files
authored
Merge branch 'master' into navbar-username
2 parents 7a17002 + f8e9a3d commit 19e4e07

File tree

7 files changed

+46
-44
lines changed

7 files changed

+46
-44
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ diff.whitespace_ignore_all_whitespace = Ignore whitespace when comparing lines
17871787
diff.whitespace_ignore_amount_changes = Ignore changes in amount of whitespace
17881788
diff.whitespace_ignore_at_eol = Ignore changes in whitespace at EOL
17891789
diff.stats_desc = <strong> %d changed files</strong> with <strong>%d additions</strong> and <strong>%d deletions</strong>
1790+
diff.stats_desc_file = %d changes: %d additions and %d deletions
17901791
diff.bin = BIN
17911792
diff.view_file = View File
17921793
diff.file_before = Before

options/locale/locale_tr-TR.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ projects=Projeler
407407
following=Takip Edilenler
408408
follow=Takip Et
409409
unfollow=Takibi Bırak
410-
heatmap.loading=Heatmap yükleniyor…
410+
heatmap.loading=Isı haritası yükleniyor…
411411
user_bio=Biyografi
412412
disabled_public_activity=Bu kullanıcı, etkinliğin herkese görünür olmasını devre dışı bıraktı.
413413

@@ -1786,6 +1786,7 @@ diff.whitespace_ignore_all_whitespace=Satırları karşılaştırırken boşluğ
17861786
diff.whitespace_ignore_amount_changes=Boşluk miktarındaki değişiklikleri yoksay
17871787
diff.whitespace_ignore_at_eol=Satır sonundaki boşluk değişiklikleri yoksay
17881788
diff.stats_desc=<strong> %d değiştirilmiş dosya</strong> ile <strong>%d ekleme</strong> ve <strong>%d silme</strong>
1789+
diff.stats_desc_file=%d değişiklik: %d ekleme ve %d silme
17891790
diff.bin=BIN
17901791
diff.view_file=Dosyayı Görüntüle
17911792
diff.file_before=Önce

options/locale/locale_zh-CN.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ write=撰写
8686
preview=预览
8787
loading=正在加载...
8888

89+
step1=第一步:
90+
step2=第二步:
8991

9092
error404=您正尝试访问的页面 <strong>不存在</strong> 或 <strong>您尚未被授权</strong> 查看该页面。
9193

@@ -246,6 +248,7 @@ register_helper_msg=已经注册?立即登录!
246248
social_register_helper_msg=已经注册?立即绑定!
247249
disable_register_prompt=对不起,注册功能已被关闭。请联系网站管理员。
248250
disable_register_mail=已禁用注册的电子邮件确认。
251+
remember_me=记住此设备
249252
forgot_password_title=忘记密码
250253
forgot_password=忘记密码?
251254
sign_up_now=还没帐户?马上注册。
@@ -278,6 +281,7 @@ twofa_scratch_token_incorrect=你的验证口令不正确。
278281
login_userpass=登录
279282
login_openid=OpenID
280283
oauth_signup_tab=注册帐号
284+
oauth_signup_title=完成新帐户
281285
oauth_signup_submit=完成账号
282286
oauth_signin_tab=绑定到现有帐号
283287
oauth_signin_title=登录以授权绑定帐户
@@ -364,6 +368,7 @@ org_name_been_taken=组织名称已被使用。
364368
team_name_been_taken=团队名称已被使用。
365369
team_no_units_error=至少选择一项仓库单元。
366370
email_been_used=该电子邮件地址已在使用中。
371+
email_invalid=此邮箱地址无效。
367372
openid_been_used=OpenID 地址 '%s' 已被使用。
368373
username_password_incorrect=用户名或密码不正确。
369374
password_complexity=密码未达到复杂程度要求:
@@ -437,6 +442,7 @@ website=个人网站
437442
location=所在地区
438443
update_theme=更新主题
439444
update_profile=更新信息
445+
update_language_not_found=语言 %s 不可用。
440446
update_profile_success=您的资料信息已经更新
441447
change_username=您的用户名已更改。
442448
change_username_prompt=注意:更改账号名将同时改变账号的URL
@@ -1241,6 +1247,7 @@ pulls.required_status_check_missing=缺少一些必要的检查。
12411247
pulls.required_status_check_administrator=作为管理员,您仍可合并此合并请求。
12421248
pulls.blocked_by_approvals=此合并请求没有通过审批。已获取审批数%d个,共需要审批数%d个。
12431249
pulls.blocked_by_rejection=此合并请求有官方审核员请求的更改。
1250+
pulls.blocked_by_official_review_requests=此合并请求需要评审
12441251
pulls.blocked_by_outdated_branch=此合并请求因过期而被阻止。
12451252
pulls.blocked_by_changed_protected_files_1=此合并请求被阻止因为修改了被保护的文件:
12461253
pulls.blocked_by_changed_protected_files_n=此合并请求被阻止因为修改了被保护的文件:
@@ -1291,7 +1298,10 @@ pulls.update_not_allowed=您无权更新分支
12911298
pulls.outdated_with_base_branch=此分支相比基础分支已过期
12921299
pulls.closed_at=`关闭此合并请求 <a id="%[1]s" href="#%[1]s">%[2]s</a>`
12931300
pulls.reopened_at=`重新打开此合并请求 <a id="%[1]s" href="#%[1]s">%[2]s</a>`
1301+
pulls.merge_instruction_hint=`你也可以查看 <a class="show-instruction">命令行指令</a>.`
12941302
1303+
pulls.merge_instruction_step1_desc=从您的仓库中签出一个新的分支并测试变更。
1304+
pulls.merge_instruction_step2_desc=合并变更并更新到 Gitea 上。
12951305
12961306
milestones.new=新的里程碑
12971307
milestones.open_tab=%d 开启中
@@ -1705,6 +1715,8 @@ settings.protected_branch_deletion=禁用分支保护
17051715
settings.protected_branch_deletion_desc=禁用分支保护允许具有写入权限的用户推送提交到此分支。继续?
17061716
settings.block_rejected_reviews=拒绝审核阻止了此合并
17071717
settings.block_rejected_reviews_desc=如果官方审查人员要求作出改动,即使有足够的批准,合并也不允许。
1718+
settings.block_on_official_review_requests=有官方审核阻止了代码合并
1719+
settings.block_on_official_review_requests_desc=处于评审状态时,即使有足够的批准,也不能合并。
17081720
settings.block_outdated_branch=如果拉取请求已经过时,阻止合并
17091721
settings.block_outdated_branch_desc=当头部分支落后基础分支时,不能合并。
17101722
settings.default_branch_desc=请选择一个默认的分支用于合并请求和提交:
@@ -1774,6 +1786,7 @@ diff.whitespace_ignore_all_whitespace=比较行时忽略空白符号
17741786
diff.whitespace_ignore_amount_changes=忽略空白符号数量的变化
17751787
diff.whitespace_ignore_at_eol=忽略行末空白符号的更改
17761788
diff.stats_desc=共有 <strong> %d 个文件被更改</strong>,包括 <strong>%d 次插入</strong> 和 <strong>%d 次删除</strong>
1789+
diff.stats_desc_file=变更 %d 行:新增 %d 行,删除 %d 行
17771790
diff.bin=二进制
17781791
diff.view_file=查看文件
17791792
diff.file_before=之前

services/wiki/wiki.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ func InitUncyclo(repo *models.Repository) error {
7777
return fmt.Errorf("InitRepository: %v", err)
7878
} else if err = repo_module.CreateDelegateHooks(repo.UncycloPath()); err != nil {
7979
return fmt.Errorf("createDelegateHooks: %v", err)
80+
} else if _, err = git.NewCommand("symbolic-ref", "HEAD", git.BranchPrefix+"master").RunInDir(repo.UncycloPath()); err != nil {
81+
return fmt.Errorf("unable to set default wiki branch to master: %v", err)
8082
}
8183
return nil
8284
}

templates/repo/diff/box.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
<ol class="diff-detail-box diff-stats detail-files hide" id="diff-files">
3737
{{range .Diff.Files}}
3838
<li>
39-
<div class="diff-counter count pull-right">
39+
<div class="diff-counter pull-right">
4040
{{if not .IsBin}}
41-
{{template "repo/diff/stats" .}}
41+
{{template "repo/diff/stats" dict "file" . "root" $}}
4242
{{else}}
4343
<span>{{$.i18n.Tr "repo.diff.bin"}}</span>
4444
{{end}}
@@ -53,9 +53,9 @@
5353
{{if $file.IsIncomplete}}
5454
<div class="diff-file-box diff-box file-content">
5555
<h4 class="ui top attached normal header rounded">
56-
<div class="diff-counter count ui left">
56+
<div class="diff-counter ui left">
5757
{{if not $file.IsRenamed}}
58-
{{template "repo/diff/stats" .}}
58+
{{template "repo/diff/stats" dict "file" . "root" $}}
5959
{{end}}
6060
</div>
6161
<span class="file">{{$file.Name}}</span>
@@ -87,11 +87,11 @@
8787
{{svg "octicon-chevron-down" 18}}
8888
</a>
8989
{{end}}
90-
<div class="diff-counter count">
90+
<div class="diff-counter">
9191
{{if $file.IsBin}}
9292
{{$.i18n.Tr "repo.diff.bin"}}
9393
{{else if not $file.IsRenamed}}
94-
{{template "repo/diff/stats" .}}
94+
{{template "repo/diff/stats" dict "file" . "root" $}}
9595
{{end}}
9696
</div>
9797
<span class="file">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.i18n.Tr "repo.stored_lfs"}}){{end}}</span>

templates/repo/diff/stats.tmpl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
2-
<span class="bar">
3-
<div class="pull-left add" style="width: {{DiffStatsWidth .Addition .Deletion}}%"></div>
4-
<div class="pull-left del"></div>
1+
{{Add .file.Addition .file.Deletion}}
2+
<span class="diff-stats-bar poping up ml-2" data-content="{{.root.i18n.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}" data-variation="wide">
3+
<div class="diff-stats-add-bar" style="width: {{DiffStatsWidth .file.Addition .file.Deletion}}%"></div>
54
</span>
6-
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>

web_src/less/_repository.less

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,29 +1563,8 @@
15631563
display: flex;
15641564
align-items: center;
15651565

1566-
.count {
1567-
margin-right: 12px;
1568-
font-size: 13px;
1569-
flex: 0 0 auto;
1570-
1571-
.bar {
1572-
background-color: var(--color-red);
1573-
height: 12px;
1574-
width: 40px;
1575-
display: inline-block;
1576-
margin: 2px 4px 0;
1577-
vertical-align: text-top;
1578-
1579-
.add {
1580-
background-color: var(--color-green);
1581-
height: 12px;
1582-
}
1583-
}
1584-
}
1585-
15861566
.file {
15871567
flex: 1;
1588-
color: var(--color-text-light-2);
15891568
word-break: break-all;
15901569
}
15911570

@@ -1768,17 +1747,6 @@
17681747
border-bottom: 1px dashed #dddddd;
17691748
padding-left: 6px;
17701749
}
1771-
1772-
.diff-counter {
1773-
margin-right: 15px;
1774-
1775-
.del {
1776-
color: var(--color-red);
1777-
}
1778-
.add {
1779-
color: var(--color-green);
1780-
}
1781-
}
17821750
}
17831751

17841752
.repo-search-result {
@@ -3142,6 +3110,25 @@ td.blob-excerpt {
31423110
border-radius: var(--border-radius) !important;
31433111
}
31443112

3113+
.diff-counter {
3114+
font-weight: 600;
3115+
margin-right: 8px;
3116+
}
3117+
3118+
.diff-stats-bar {
3119+
display: inline-block;
3120+
background-color: var(--color-red);
3121+
height: 12px;
3122+
width: 40px;
3123+
position: relative;
3124+
top: 2px;
3125+
3126+
.diff-stats-add-bar {
3127+
background-color: var(--color-green);
3128+
height: 100%;
3129+
}
3130+
}
3131+
31453132
/* prevent page shaking on language bar click */
31463133
.repository-summary-language-stats {
31473134
height: 48px;

0 commit comments

Comments
 (0)