From 0e51127c49b3ea3d7040c5ea26eece9c6971afd5 Mon Sep 17 00:00:00 2001 From: imrdong <67107853+imrdong@users.noreply.github.com> Date: Fri, 21 Aug 2020 21:45:46 +0800 Subject: [PATCH] docs(translation): update readme_cn.md (#411) --- docs/readme_cn.md | 124 +++++++++++++++++++++++++++++----------------- 1 file changed, 79 insertions(+), 45 deletions(-) diff --git a/docs/readme_cn.md b/docs/readme_cn.md index 116bbeb..75f3f86 100644 --- a/docs/readme_cn.md +++ b/docs/readme_cn.md @@ -3,7 +3,6 @@

GitHub Readme Stats

在你的 README 中获取动态生成的 GitHub 统计信息!

-

Tests Passing @@ -30,11 +29,13 @@

查看 Demo · - 报告 bug + 报告 Bug · 请求增加功能

+ Français + · 简体中文 · Español @@ -71,7 +72,7 @@ _注: 等级基于用户的统计信息计算得出,详见 [src/calculateRank.js](../src/calculateRank.js)_ -### 隐藏个别统计项 +### 隐藏指定统计 想要隐藏指定统计信息,你可以调用参数 `?hide=`,其值用 `,` 分隔。 @@ -87,7 +88,7 @@ _注: 等级基于用户的统计信息计算得出,详见 [src/calculateRank. _注:如果你是自己部署本项目,私人贡献将会默认被计数,如果不是自己部署,你需要分享你的私人贡献计数。_ -> Options: `&count_private=true` +> 选项: `&count_private=true` ```md ![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&count_private=true) @@ -95,7 +96,7 @@ _注:如果你是自己部署本项目,私人贡献将会默认被计数, ### 显示图标 -如果想要显示图标,你可以调用 `show_icons=true` 参数,如下: +如果想要显示图标,你可以调用 `show_icons=true` 参数,像这样: ```md ![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true) @@ -117,45 +118,69 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr GitHub Readme Stat Themes -在 [theme config 文件](../themes/index.js) 中查看更多主题,或者你可以 **贡献新的主题** :D +你可以预览[所有可用主题](./themes/README.md)或者签出[主题配置文件](./themes/index.js), 而且如果你喜欢, **你也可以贡献新的主题** :D ### 自定义 你可以通过使用 URL 参数的方式,为你的 `Stats Card` 或 `Repo Card` 自定义样式。 -自定义选项: +常用选项: -| Option | type | description | Stats Card (default) | Repo Card (default) | Top Lang Card (default) | -| ------------- | --------- | ---------------------------- | -------------------- | ------------------- | ----------------------- | -| title_color | hex color | 标题颜色 | 2f80ed | 2f80ed | 2f80ed | -| text_color | hex color | 字体颜色 | 333 | 333 | 333 | -| icon_color | hex color | 图标颜色 | 4c71f2 | 586069 | 586069 | -| bg_color | hex color | 卡片背景颜色 | FFFEFE | FFFEFE | FFFEFE | -| line_height | number | 文字行高 | 30 | N/A | N/A | -| hide | CSV | 隐藏指定统计项 | undfined | N/A | undefined | -| hide_rank | boolean | 隐藏评分等级 | false | N/A | N/A | -| hide_title | boolean | 隐藏卡片标题 | false | N/A | false | -| hide_border | boolean | 隐藏卡片边框 | false | N/A | N/A | -| show_owner | boolean | 显示 Repo 卡片所属账户用户名 | N/A | false | N/A | -| show_icons | boolean | 显示图标 | false | N/A | N/A | -| theme | string | 设置主题 | 'default' | 'default_repocard' | 'default' | -| cache_seconds | number | 手动设置自定义缓存控制 | 1800 | 1800 | 1800 | -| count_private | boolean | 统计私人贡献计数 | false | N/A | N/A | -| layout | string | 布局方式 | N/A | N/A | 'default' | +- `title_color` - 卡片标题颜色 _(十六进制色码)_ +- `text_color` - 内容文本颜色 _(十六进制色码)_ +- `icon_color` - 图标颜色(如果可用)_(十六进制色码)_ +- `bg_color` - 卡片背景颜色 _(十六进制色码)_ **或者** 以 _angle,start,end_ 的形式渐变 +- `theme` - 主题名称,从[所有可用主题](./themes/README.md)中选择 +- `cache_seconds` - 手动设置缓存头 _(最小值: 1800,最大值: 86400)_ -> 注意缓存:Repo 卡片默认缓存 30 分钟,如果 fork 数和 star 数小于 1k ,则默认为 2 小时。缓存被限制为最少 30 分钟,最长 24 小时。 +##### bg_color 渐变 + +你可以在 bg_color 选项中提供多个逗号分隔的值来呈现渐变,渐变的格式是 :- + +``` +&bg_color=DEG,COLOR1,COLRO2,COLOR3...COLOR10 +``` + +> 缓存的注意事项: 如果 fork 数和 star 数 少于 1k , Repo 卡片默认缓存是 4 小时 (14400 秒) ,否则是 2 小时(7200)。另请注意缓存被限制为最短 2 小时,最长 24 小时。 + +#### 统计卡片专属选项: + +- `hide` - 隐藏特定统计信息 _(以逗号分隔)_ +- `hide_title` - _(boolean)_ +- `hide_rank` - _(boolean)_ +- `show_icons` - _(boolean)_ +- `include_all_commits` - 统计总提交次数而不是仅统计今年的提交次数 _(boolean)_ +- `count_private` - 统计私人提交 _(boolean)_ +- `line_height` - 设置文本之间的行高 _(number)_ + +#### Repo 卡片专属选项: + +- `show_owner` - 显示 Repo 的所有者名字 _(boolean)_ + +#### 语言卡片专属选项: + +- `hide` - 从卡片中隐藏指定语言 _(Comma seperated values)_ +- `hide_title` - _(boolean)_ +- `layout` - 在两个可用布局 `default` & `compact` 间切换 +- `card_width` - 手动设置卡片的宽度 _(number)_ + +> :warning: **重要:** +> 如 [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding) 所指定,语言名称应使用 uri 转义。 +> (例: `c++` 应该是 `c%2B%2B`, `jupyter notebook` 应该是 `jupyter%20notebook`, 等.) + +--- # GitHub 更多置顶 -GitHub 更多置顶 让你使用 README Profile,在个人页面中置顶多于 6 个 repo 。 +GitHub 更多置顶 允许你在使用 GitHub readme profile 时,在个人资料中置顶多于 6 个 repo 。 -这波可以!你再也不用受限于最多 6 个置顶了。 +是的!你不再受限于置顶最多 6 个存储库了。 ### 使用细则 复制粘贴这段代码到你的 README 文件中,并更改链接。 -Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats` +端点: `api/pin?username=anuraghazra&repo=github-readme-stats` ```md [![ReadMe Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats)](https://github.com/anuraghazra/github-readme-stats) @@ -165,7 +190,7 @@ Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats` [![ReadMe Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats)](https://github.com/anuraghazra/github-readme-stats) -使用 [show_owner](#自定义) 变量将 Repo 所属账户的用户名包含在内。 +使用 [show_owner](#自定义) 变量将 Repo 所有者的用户名包含在内。 [![ReadMe Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&show_owner=true)](https://github.com/anuraghazra/github-readme-stats) @@ -173,24 +198,24 @@ Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats` 热门语言卡片显示了 GitHub 用户常用的编程语言。 -_注意:热门语言并不表示我的技能水平或类似的水平,它是用户在 GitHub 上拥有最多代码的一项指标,它是 github-readme-stats 的新功能_ +_注意:热门语言并不表示我的技能水平或类似的水平,它是用来衡量用户在 github 上拥有最多代码的语言的一项指标,它是 github-readme-stats 的新特性_ ### 使用细则 -将此代码复制粘贴到您的`README.md`文件中,并修改链接。 +将此代码复制粘贴到您的 `README.md` 文件中,并修改链接。 -Endpoint: `api/top-langs?username=anuraghazra` +端点: `api/top-langs?username=anuraghazra` ```md [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) ``` -### 隐藏特定语言 +### 隐藏指定语言 -可以使用`?hide=语言1,语言2`参数来隐藏指定的语言。 +可以使用 `?hide=language1,language2` 参数来隐藏指定的语言。 ```md -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide=语言1,语言2)](https://github.com/anuraghazra/github-readme-stats) +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide=javascript,html)](https://github.com/anuraghazra/github-readme-stats) ``` ### 紧凑的语言卡片布局 @@ -211,13 +236,13 @@ Endpoint: `api/top-langs?username=anuraghazra` --- -### 全部 Demo +### 全部 Demos - 默认 ![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra) -- 隐藏特定数据 +- 隐藏指定统计 ![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,issues) @@ -225,17 +250,25 @@ Endpoint: `api/top-langs?username=anuraghazra` ![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=issues&show_icons=true) +- 包含全部提交 + +![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&include_all_commits=true) + - 主题 -从 [默认主题](#主题) 中进行选择 +从[默认主题](#主题)中进行选择 ![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical) +- 渐变 + +![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&bg_color=30,e96443,904e95&title_color=fff&text_color=fff) + - 自定义统计卡片 ![Anurag's github stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&show_icons=true&title_color=fff&icon_color=79ff97&text_color=9f9f9f&bg_color=151515) -- 自定义代码库卡片 +- 自定义 repo 卡片 ![Customized Card](https://github-readme-stats.vercel.app/api/pin?username=anuraghazra&repo=github-readme-stats&title_color=fff&icon_color=f9f9f9&text_color=9f9f9f&bg_color=151515) @@ -245,7 +278,7 @@ Endpoint: `api/top-langs?username=anuraghazra` --- -### 提示 (对齐 Repo 卡片) +### 快速提示 (对齐 Repo 卡片) 你通常无法将图片靠边显示。为此,您可以使用以下方法: @@ -262,10 +295,9 @@ Endpoint: `api/top-langs?username=anuraghazra` #### [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107) -因为 GitHub 的 API 每个小时只允许 5 千次请求,我的 `https://github-readme-stats.vercel.app/api` 很有可能会触发限制 -如果你将其托管在自己的 Vercel 服务器上,那么你就不必为此担心。点击 deploy 按钮来开始你的部署! +因为 GitHub 的 API 每个小时只允许 5 千次请求,我的 `https://github-readme-stats.vercel.app/api` 很有可能会触发限制。如果你将其托管在自己的 Vercel 服务器上,那么你就不必为此担心。点击 deploy 按钮来开始你的部署! -注意: 从 [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) 开始,我们应该能够处理超过 5 千 的请求,并且不会出现宕机问题 :D +注意: 从 [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) 开始,我们应该能够处理超过 5 千次的请求,并且不会出现宕机问题 :D [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/anuraghazra/github-readme-stats) @@ -296,14 +328,16 @@ Endpoint: `api/top-langs?username=anuraghazra` 然而, 如果你正在使用这个项目并感觉良好,或只是想要支持我继续开发,你可以通过如下方式: -- 在你的 README 中使用 github-readme-stats 时,链接指向会这里 :D +- 在你的 readme 中使用 github-readme-stats 时,链接指向这里 :D - Star 并 分享这个项目 :rocket: -- [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - 你可以通过 PayPal 一次性捐款. 我多半会买一杯 ~~咖啡~~ 茶。:tea: +- [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - 你可以通过 PayPal 一次性捐款. 我多半会买一杯 ~~咖啡~~ 茶. :tea: 谢谢! :heart: --- +![https://vercel.com](https://res.cloudinary.com/anuraghazra/image/upload/v1597827714/powered-by-vercel_1_ug4uro.svg) + 欢迎贡献! <3 用 :heart: 发电,用 JavaScript 制作。