From 04daebf1b80e7120b575cc5fb7faf511948cbaaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=94=9F=E6=9D=82=E7=89=A9=E6=88=BF?= <3177754310@qq.com> Date: Tue, 1 Oct 2024 12:32:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=A1=B5=E9=9D=A2=EF=BC=9A=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E4=BD=BF=E7=94=A8=E6=83=85=E5=86=B5=20(#285)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locals.js | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 141 insertions(+), 5 deletions(-) diff --git a/locals.js b/locals.js index 5736b7260..37598a31a 100644 --- a/locals.js +++ b/locals.js @@ -48,7 +48,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|succession\/invitation)/, // 仓库路径 - rePagePathRepo: /^\/[^\/]+\/[^\/]+\/(issues|pulls|pull|tree|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|custom-properties)/, + rePagePathRepo: /^\/[^\/]+\/[^\/]+\/(issues|pulls|pull|tree|watchers|stargazers|new|edit|delete|upload|find|wiki|branches|discussions|activity|rules|releases|packages|tags|labels|milestones|compare|commit|blob|blame|actions(\/metrics\/usage)?|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|custom-properties)/, // 组织路径 rePagePathOrg: /^\/[^\/]+\/[^\/]+\/(repositories\/new|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|plans)|policies\/applications)|^\/[^\/]+\/(enterprise_plan|sponsoring)/, @@ -318,6 +318,7 @@ I18N["zh-CN"]["title"] = { // 标题翻译 "Error": "错误", "Discover gists · GitHub": "探索代码片段 · GitHub", "Explore GitHub Sponsors": "探索 GitHub 赞助者", + "Actions Usage Metrics": "操作使用情况", }, "regexp": [ // 正则翻译 [/Authorized OAuth Apps/, "授权的 OAuth 应用"], @@ -598,6 +599,7 @@ I18N["zh-CN"]["public"] = { // 公共区域翻译 "Enables rich diffs of Jupyter Notebooks in pull requests": "在拉取请求中启用 Jupyter Notebook 的丰富差异视图", "Note: commenting on rich diff views of notebooks is not yet supported": "注意:尚不支持对 Jupyter Notebook 的丰富差异视图进行评论", "New Pull Request Commits Experience": "新拉取请求提交体验", + "The pull request commits page has been refreshed to improve performance, improve consistency with other pages, and to make the page more accessible!": "拉取请求提交页面已被刷新,以提高性能,改善与其他页面的一致性,并使页面更易于访问!", "Enhanced Repos Insights Views": "仓库洞察增强视图", "We’re thrilled to introduce our new graphics library! With this update, you’ll find significant enhancements to two of our repository insights views—Contributors and Code Frequency. Both now utilize an SVG-based solution, offering improved focus navigation for precise, point-by-point interaction. You can also hide a series by interacting with the chart legend and view or download the data in both table format and as PNGs.": "我们非常高兴地介绍我们的新图形库!通过此次更新,您将发现我们的两个仓库洞察视图-- “贡献者” 和 “代码频率” 都有了显著增强。这两个视图现在都采用了基于 SVG 的解决方案,为精确的逐点交互提供了改进的焦点导航。您还可以通过与图表图例交互来隐藏系列,并以表格格式和 PNG 格式查看或下载数据。", "Slash Commands": "斜杠命令", @@ -1848,8 +1850,21 @@ I18N["zh-CN"]["page-profile"] = { // 个人首页 [/([\d,]+) contributions? in (\d+) in ([^ ]+)/, "在 $2 年中向 $3, 贡献 $1 次"], [/([\d,]+) contributions? in (\d+)/, "在 $2 年中贡献 $1 次"], [/(\d+) contributions? in private repositor(y|ies)/, "私有仓库 $1 个贡献"], - [/(\d+|No) contributions?/, function (all, number) { - return number === 'No' ? "无贡献" : number + " 次贡献"; + [/(\d+|No) contribution(?:s)? on (January|February|March|April|May|June|July|August|September|October|November|December) (\d+)(?:st|nd|rd|th)./, function (all, number, month , day) { + var monthKey = { + "January" : "1月", + "February" : "2月", + "March" : "3月", + "April" : "4月", + "June" : "6月", + "July" : "7月", + "August" : "8月", + "September" : "9月", + "October" : "10月", + "November" : "11月", + "December" : "12月", + }; + return number === 'No' ? monthKey[month] + day + "日,"+ "无贡献" : monthKey[month] + day + "日," + number + " 次贡献"; }],// 贡献日历 [/A graph representing ([^ ]+)'s contributions from ( .+) to ( .+)./, "$1 从 $2 到 $3 的贡献图。"], [/and (\d+) other repositor(y|ies)/, "和 $1 个其他仓库"], // 活动概览 @@ -4886,6 +4901,12 @@ I18N["zh-CN"]["settings/apps"] = { // 设置 - 开发者设置/GitHub 应用 "to get started developing on the GitHub API. You can also read more about building GitHub Apps in our": ",开始在 GitHub API 上进行开发。您还可以在我们的文档中阅读更多关于构建 GitHub 应用的信息", "developer documentation": "开发者文档", "A GitHub App can act on its own behalf, taking actions via the API directly instead of impersonating a user. Read more in our": "GitHub 应用可以代表自己执行操作,直接通过 API 执行操作,而不是冒充用户。阅读我们的更多内容", // 存在 app时 + + // 无应用提示 + "No GitHub Apps": "无 GitHub 应用", + "Want to build something that integrates with and extends GitHub? Register a new GitHub App to get started developing on the GitHub API.": "想创建与 GitHub 集成并扩展 GitHub 的应用程序吗?注册一个新的 GitHub 应用程序,开始使用 GitHub API 进行开发。", + + "View documentation": "查看文档", // 注册 GitHub 应用 https://github.com/settings/apps/new "Register new GitHub App": "注册新 GitHub 应用", @@ -5428,6 +5449,12 @@ I18N["zh-CN"]["settings/developers"] = { // 设置 - 开发者设置/OAuth 应 "to find out more.": "以了解更多情况。", "Register a new application": "注册新 OAuth 应用", + "No OAuth apps": "无 OAuth 应用", + "OAuth apps are used to access the GitHub API. Read the docs to find out more.": "OAuth 应用程序用于访问 GitHub API。阅读文档了解详情。", + "New OAuth app": "注册新 OAuth 应用", + + "View documentation": "查看文档", + }, "regexp": [ // 正则翻译 ], @@ -9020,15 +9047,18 @@ I18N["zh-CN"]["repository/commit"] = { // 仓库 - 提交页面 "File extensions": "文件扩展名", "No extension": "无扩展名", - // 中间信息 + // 中间 "file": "个文件", "s": " ", "changed": "更改", + "Copy file name to clipboard": "复制文件名到剪切板", + // 右侧 "Top": "顶部", "Layout": "布局", "Hide whitespace": "隐藏空白", + "Compact line height": "自定义行高", "Copy": "复制", "Select all": "全选", @@ -9036,6 +9066,11 @@ I18N["zh-CN"]["repository/commit"] = { // 仓库 - 提交页面 "Expand below": "向下展开", "Go to previous hunk": "上一块", "Go to next hunk": "下一块", + + "Customizable line height": "自定义行高", + "The default line height has been increased for improved accessibility. You can choose to enable a more compact line height from the view settings menu.": "默认行高已增加,以提高可访问性。您可以从视图设置菜单中选择启用更紧凑的行高。", + "Enable compact line height": "启用自定义行高", + "Dismiss": "禁用", // 底部评论 "Comments": "评论", @@ -9053,9 +9088,9 @@ I18N["zh-CN"]["repository/commit"] = { // 仓库 - 提交页面 [/(\d+) parents?/, "$1 个父"], [/lines? changed/, "行更改"],//新版提交页面 [/(\d+) changed files?/, "$1 个更改的文件"], + [/(\d+) changes: (\d+) additions? & (\d+) deletions?$/, "$1 处更改:$2 处增加和 $3 处删除"], [/(\d+) additions?$/, "$1 处增加"], [/(\d+) deletions?$/, "$1 处删除"], - [/(\d+) changes: (\d+) additions? & (\d+) deletions?$/, "$1 处更改:$2 处增加和 $3 处删除"], [/This commit closes issue (#\d+)./, "此提交关闭了议题 $1。"], //具体提交页面 [/from ([^ ]+) to ([^ ]+)/, "从 $1 到 $2。"], //具体提交页面 [/([\d,]+) additions, ([\d,]+) deletions not shown because the diff is too large. Please use a local Git client to view these changes./, "$1 处增加,$2 处删除未显示,因为差异太大。请使用本地 Git 客户端查看这些更改。"], @@ -12010,6 +12045,7 @@ I18N["zh-CN"]["repository-insights-menu"] = { // 仓库 -> 洞察 - 公共部分 "Network": "网络", // "Members": "成员", "Forks": "复刻", + "Actions Usage Metrics": "操作使用情况", "People": "成员", //组织仓库 @@ -21345,3 +21381,103 @@ I18N["zh-CN"]["orgs/sponsoring"] = { // https://github.com/orgs//spons ...I18N["zh-CN"]["orgs-public"]["regexp"], ], }; + +I18N["zh-CN"]["repository/actions/metrics/usage"] = { // 仓库 - 洞察 - 操作使用情况 + "static": { + ...I18N["zh-CN"]["repository-public"]["static"], + ...I18N["zh-CN"]["repository-insights-menu"]["static"], + + "Period": "周期", + "Current week (Mon-Sun)": "本周(周一-周日)", + "Current month": "本月", + "Last month": "上个月", + "Last 30 days": "最近30天", + "Last 90 days": "最近90天", + "Last year": "最近一年", + + "Total minutes": "总分钟数", + //"Total minutes across all workflows in this organization for current month": "当月该组织所有工作流程的总时长", + "Total job runs": "总工作运行", + //"Total job runs across all workflows in this organization for current month": "当月该组织所有工作流程的工作运行总数", + + "Filter": "筛选", + "Search or filter": "搜索或筛选", + "Exclude": "排除", + "Download report": "下载报告", + + // 高级帅选窗口 + "Advanced filters": "高级筛选", + "Build complex filter queries": "建立复杂的筛选器查询", + "To start building your query add your first filter using the button below.": "要开始建立查询,请使用下面的按钮添加第一个筛选器。", + + "Qualifier": "限定", + "Operator": "操作", + "is not one of": "不包含", + "is one of": "包含", + "is": "是", + "greater than": "大于", + "less than": "小于", + "greater than or equal to": "大于或等于", + "less than or equal to": "小于或等于", + "equal to": "等于", + "between": "之间", + "Value": "值", + "Make a selection": "请选择", + "Select items": "请选择项目", + "Filter values": "筛选值", + "Enter a number": "键入数字", + "Enter search text": "键入任意文本", + "Me": "我", + "Signed-in user": "已登录用户", + "Add a filter": "添加", + "Text": "文本", + "Apply": "应用", + + // 关闭弹窗 + "Discard changes?": "是否放弃更改?", + "You have unsaved changes. Are you sure you want to discard them?": "您有未保存的更改。您确定要放弃它们吗?", + "Keep editing": "继续编辑", + "Close and discard": "关闭并放弃", + + //筛选器报错窗口 + "Empty value for": "空值:", + "Text will be ignored since log searching is not yet available:": "由于尚未提供日志搜索功能,文本将被忽略:", + + "Workflows": "工作流", + "Jobs": "作业", + "Job": "作业", + "Job runs": "作业运行", + "Runtime OS": "操作系统", + "Runner type": "运行器类型", + "hosted": "托管", + "hosted-larger": "大型托管", + "self-hosted": "自托管", + + // 无数据 + "No table data available yet.": "还没有数据。", + "You don't have workflows on any of your organization repositories.": "您的任何组织仓库中都没有工作流程。", + "Get started with GitHub Actions": "快速开始", + + "Workflow": "工作流", + "Workflow runs": "工作流运行", + + "of": "/", + + }, + "regexp": [ + [/Showing data from (\d+)\/(\d+)\/(\d+) to/, "显示数据:从$1年$2月$3日至"], + [/Total (minutes|job runs) across all workflows in this organization for (current week \(mon-sun\)|current month|last month|last 30 days|last 90 days|last year)/, function(all, type, period){ + var typeKey = {'minutes': '总分钟数', 'job runs': '总工作运行数'}; + + var periodKey = { + "current week (mon-sun)": "本周(周一-周日)", + "current month": "本月", + "last month": "上个月", + "last 30 days": "最近30天", + "last 90 days": "最近90天", + "last year": "最近一年",}; + + return periodKey[period] + '该组织所有工作流程的' + typeKey[type]; + }], + ], +}; \ No newline at end of file