Skip to content

Commit

Permalink
词条调整: 将某个拉取请求相关页面调整到repository/pull页面规则下
Browse files Browse the repository at this point in the history
  • Loading branch information
maboloshi committed Jun 17, 2024
1 parent 0bcfb96 commit 19dc862
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ I18N.conf = {
rePagePath: /^\/($|dashboard|signup|login\/oauth|login|logout|sessions?|password_reset|orgs|explore|topics|notifications\/subscriptions|notifications|watching|stars|issues|pulls|search|trending|showcases|new\/(import|project)|new|import|settings\/(profile|admin|appearance|accessibility|notifications|billing|emails|security_analysis|security-log|security|auth|sessions|keys|ssh|gpg|organizations|enterprises|blocked_users|interaction_limits|code_review_limits|repositories|codespaces|deleted_repositories|packages|copilot|pages|replies|installations|apps\/authorizations|reminders|sponsors-log|apps|(?:personal-access-|)tokens|developers|applications\/new|applications|connections\/applications)|settings|installations\/new|marketplace|apps|account\/(organizations\/new|choose|upgrade|billing\/history)|projects|redeem|discussions|events|collections|sponsors|sponsoring|github-copilot\/signup|codespaces|developer\/register|features|security)|^\/users\/[^\/]+\/(projects|packages)/,

// 仓库路径
rePagePathRepo: /^\/[^\/]+\/[^\/]+\/(issues|pull|watchers|stargazers|new|edit|delete|upload|find|wiki|branches|discussions|activity|rules|releases|packages|tags|labels|milestones|compare|commit|blob|blame|actions|runs|deployments|security|pulse|community|forks|fork|import|graphs\/(contributors|community|traffic|commit-activity|code-frequency)|network$|network\/(dependencies|dependents|updates|members)|settings\/(access|code_review_limits|interaction_limits|branches|branch_protection_rules|tag_protection|rules|actions|hooks|environments|codespaces|pages|security_analysis|dependabot_rules|keys|secrets|variables|installations|notifications)|settings|transfer|projects\/new|pkgs|contribute|subscription|invitations|codespaces|attestations)/,
rePagePathRepo: /^\/[^\/]+\/[^\/]+\/(issues|pulls|pull|watchers|stargazers|new|edit|delete|upload|find|wiki|branches|discussions|activity|rules|releases|packages|tags|labels|milestones|compare|commit|blob|blame|actions|runs|deployments|security|pulse|community|forks|fork|import|graphs\/(contributors|community|traffic|commit-activity|code-frequency)|network$|network\/(dependencies|dependents|updates|members)|settings\/(access|code_review_limits|interaction_limits|branches|branch_protection_rules|tag_protection|rules|actions|hooks|environments|codespaces|pages|security_analysis|dependabot_rules|keys|secrets|variables|installations|notifications)|settings|transfer|projects\/new|pkgs|contribute|subscription|invitations|codespaces|attestations)/,

// 组织路径
rePagePathOrg: /^\/[^\/]+\/[^\/]+\/(repositories|discussions|projects|packages|teams|new-team|people|outside-collaborators|pending_collaborators|dashboard|billing_managers\/new|settings\/(profile|billing|roles|member_privileges|teams|import-export|blocked_users|interaction_limits|code_review_limits|moderators|repository-defaults|rules|codespaces|copilot|actions|hooks|discussions|packages|pages|projects|security_analysis|security|dependabot_rules|domains|secrets|variables|oauth_application_policy|installations|personal-access-token|reminders|sponsors-log|audit-log|deleted_repositories|applications\/new|applications|apps\/new|apps|publisher)|topics|domain\/new|audit-log\/event_settings|billing\/history|policies\/applications)|^\/[^\/]+\/(enterprise_plan|sponsoring)/,
Expand Down Expand Up @@ -7147,7 +7147,7 @@ I18N.zh["repository/issues"] = { // 仓库 - 议题页面
};
I18N.zh["repository/labels"] = I18N.zh["repository/issues"];

I18N.zh["repository/pull"] = { // 仓库 - 拉取请求页面
I18N.zh["repository/pulls"] = { // 仓库 - 拉取请求页面
"static": { // 静态翻译
...I18N.zh["repository-public"]["static"],
...I18N.zh["repository/pull_issue_public"]["static"],
Expand Down Expand Up @@ -7211,6 +7211,24 @@ I18N.zh["repository/pull"] = { // 仓库 - 拉取请求页面
"You commented on this pull request": "您对此拉取请求发表了评论",
"You opened this pull request": "您打开了此拉取请求",

},
"regexp": [
[/([\d,]+) Open/, "$1 打开"],
[/([\d,]+) Closed/, "$1 已关闭"],
[/#(\d+) opened/, "#$1 打开于"],
[/#(\d+) by/, "#$1 打开者"],
[/(\d+) tasks? done/, "$1 个任务完成"],
[/(\d+) of (\d+) tasks?/, "$1 / $2 个任务"],
[/(\d+) tasks?/, "$1 个任务"],
[/First time contributing to ([^ ]+)?/, "首次为 $1 做贡献?"],
],
};

I18N.zh["repository/pull"] = { // 仓库 - 某个拉取请求页面
"static": { // 静态翻译
...I18N.zh["repository-public"]["static"],
...I18N.zh["repository/pull_issue_public"]["static"],

// 某条具体的拉取请求 /<user-name>/<repo-name>/pull/<id> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// 顶部提醒
"Your review was submitted on a merged pull request.": "您的审查已提交,一个合并的拉取请求。",
Expand Down Expand Up @@ -7774,14 +7792,6 @@ I18N.zh["repository/pull"] = { // 仓库 - 拉取请求页面
...I18N.zh["repository-public"]["regexp"],
...I18N.zh["repository/pull_issue_public"]["regexp"],

[/([\d,]+) Open/, "$1 打开"],
[/([\d,]+) Closed/, "$1 已关闭"],
[/#(\d+) opened/, "#$1 打开于"],
[/#(\d+) by/, "#$1 打开者"],
[/(\d+) tasks? done/, "$1 个任务完成"],
[/(\d+) of (\d+) tasks?/, "$1 / $2 个任务"],
[/(\d+) tasks?/, "$1 个任务"],
[/First time contributing to ([^ ]+)?/, "首次为 $1 做贡献?"],
// 具体某条拉取请求
[/merged (\d+) commits? into/, "将 $1 个提交合并到"],
[/([^ ]+) left review comments?/, "$1 发表了审查意见"],
Expand Down

0 comments on commit 19dc862

Please sign in to comment.