style(formatters): render branch/commit/tag refs as inline code with hyperlinks

Unify all branch, commit hash and tag references across formatters to the push commit style (inline code + link). Adds commitLink/branchLink/tagLink helpers in formatters/helpers.ts, links branches to /tree/, tags to /releases/tag/, and PR head branches to the fork repo. Drops the backticks from the en/zh locale templates around {ref}/{sha} since the formatters now inject pre-linked values.
This commit is contained in:
RhenCloud 2026-08-13 06:37:45 +08:00
parent 3029b3468f
commit bf76b9342f
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
12 changed files with 110 additions and 45 deletions

View file

@ -88,7 +88,7 @@ export const zh = {
push: {
force_push: "**强制推送**",
branch_created: "分支已创建",
commits_pushed: "**{count}** 个提交已推送到 `{ref}`",
commits_pushed: "**{count}** 个提交已推送到 {ref}",
view_comparison: "[查看比较]({url})",
added: "+{count} 新增",
removed: "-{count} 删除",
@ -124,10 +124,10 @@ export const zh = {
title: "{repo}: {name}",
},
create: {
title: "{repo}: {emoji}已创建{type} `{ref}`",
title: "{repo}: {emoji}已创建{type} {ref}",
},
delete: {
title: "{repo}: {emoji}已删除{type} `{ref}`",
title: "{repo}: {emoji}已删除{type} {ref}",
},
star: {
starred: "已加星标",
@ -154,7 +154,7 @@ export const zh = {
},
commit_comment: {
action_comment: "{emoji}**{action}**",
title: "{repo}: 提交 `{sha}` 的评论",
title: "{repo}: 提交 {sha} 的评论",
},
deployment: {
title: "{repo}: 部署到 `{env}` — {state}",