Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Simplified Chinese localization #204

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.fr.md
Expand Up @@ -78,7 +78,7 @@ Voir le fichier [CONTRIBUTING.md][contributing]

Ce README est disponible en :

[Anglais](README.md) • [Français](README.fr.md) • [Indonésien](README.id.md) • [Polonais](README.pl.md) • [Romain](README.ro.md)
[Anglais](README.md) • [Français](README.fr.md) • [Indonésien](README.id.md) • [Polonais](README.pl.md) • [Romain](README.ro.md) • [简体中文](README.zh-CN.md)

[![Propulsé par Vercel](public/powered-by-vercel.svg)][vercel]

Expand Down
2 changes: 1 addition & 1 deletion README.id.md
Expand Up @@ -78,7 +78,7 @@ Lihat [CONTRIBUTING.md][contributing]

README ini tersedia dalam bahasa:

[Inggris](README.md) • [Perancis](README.fr.md) • [Indonesia](README.id.md) • [Polandia](README.pl.md) • [Rumania](README.ro.md)
[Inggris](README.md) • [Perancis](README.fr.md) • [Indonesia](README.id.md) • [Polandia](README.pl.md) • [Rumania](README.ro.md) • [简体中文](README.zh-CN.md)

[![Powered by Vercel](public/powered-by-vercel.svg)][vercel]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -78,7 +78,7 @@ See [CONTRIBUTING.md][contributing]

This README is available in:

[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md)
[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md) • [简体中文](README.zh-CN.md)

[![Powered by Vercel](public/powered-by-vercel.svg)][vercel]

Expand Down
2 changes: 1 addition & 1 deletion README.pl.md
Expand Up @@ -78,7 +78,7 @@ See [CONTRIBUTING.md][contributing]

This README is available in:

[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md)
[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md) • [简体中文](README.zh-CN.md)

[![Powered by Vercel](public/powered-by-vercel.svg)][vercel]

Expand Down
2 changes: 1 addition & 1 deletion README.ro.md
Expand Up @@ -78,7 +78,7 @@ See [CONTRIBUTING.md][contributing]

This README is available in:

[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md)
[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md) • [简体中文](README.zh-CN.md)

[![Powered by Vercel](public/powered-by-vercel.svg)][vercel]

Expand Down
85 changes: 85 additions & 0 deletions README.zh-CN.md
@@ -0,0 +1,85 @@
# [giscus][giscus]

一个基于 [GitHub Discussions][discussions] 的评论系统。 通过 GitHub 让访问者留下评论和感受在你的网站上!受 [utterances][utterances] 的强烈启发开发本项目。

- [开源][repo]. 🌏
- 没有追踪,没有广告,永远免费。 📡 🚫
- 不需要数据库,所有数据存储在 GitHub Discussions。 :octocat:
- 支持 [自定义主题][creating-custom-themes]! 🌗
- 支持 [多种语言][multiple-languages]。 🌐
- [可扩展性的配置][advanced-usage]。 🔧
- 自动从 GitHub 获取新的评论和编辑。 🔃
- [可以 self-hosted][self-hosting]! 🤳

> **注意:**\
> giscus仍然在活跃开发中,GitHub 也仍然在活跃的开发 Discussions 和它的 API, 因此, giscus 的一些特性可能会随着时间的推移而被破坏或改变。

## 它是怎么运作的

当 gicus 加载时,[GitHub Discussions search API][search-api] 会基于选定的映射关系(URL、`pathname`, `<title>` 等)查找与页面相关联的 discussion。如果找不到匹配的 discussion,giscus bot 会在第一次留下评论或感受时自动创建 discussion。

要发表评论,访问者必须授权 [giscus app][giscus-app] 使用 GitHub OAuth 流[代表他们发表评论][authorization]。或者,访问者可以直接在 GitHub Discussion 评论,你可以在 GitHub 修改这些评论。

[giscus]: https://giscus.app
[discussions]: https://docs.github.com/en/discussions
[utterances]: https://github.com/utterance/utterances
[repo]: https://github.com/giscus/giscus
[advanced-usage]: https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md
[creating-custom-themes]: https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#data-theme
[multiple-languages]: https://github.com/giscus/giscus/blob/main/CONTRIBUTING.md#adding-localizations
[self-hosting]: https://github.com/giscus/giscus/blob/main/SELF-HOSTING.md
[search-api]: https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions#search
[giscus-app]: https://github.com/apps/giscus
[authorization]: https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps

<!-- configuration -->

如果你正在用 giscus, 请考虑给 [giscus][repo] 项目star🌟,并且添加 [`giscus`][giscus-topic] topic [到你的仓库][topic-howto]! 🎉

## 高级用法

你可以按照 [高级使用指南][advanced-usage] 添加其他的配置(例如:允许特定的 origins)。

要在 React,Vue,或者 Svelte 中使用 giscus, 请查看 [giscus component library][giscus-component]。

## 迁移

如果你之前使用过基于 GitHub Issues 的评论系统(例如:[utterances][utterances], [gitalk][gitalk]),你可以[将已有的 issues 转换为 discussions][convert]。转换之后,只需要确保 discussion 标题和页面之间的映射关系是正确的,giscus 会自动使用 discussions。

## 使用 giscus 的站点

- [laymonage.com][laymonage-website]
- [os.phil-opp.com][os-phil-opp]
- [Stats and R][statsandr]
- [Tech Debt Burndown Podcast][techdebtburndown]
- [**更多!**][giscus-topic]

## 贡献

查看 [CONTRIBUTING.md][contributing]

[giscus-component]: https://github.com/giscus/giscus-component
[repo]: https://github.com/giscus/giscus
[giscus-topic]: https://github.com/topics/giscus
[topic-howto]: https://docs.github.com/en/github/administering-a-repository/classifying-your-repository-with-topics
[advanced-usage]: https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md
[utterances]: https://github.com/utterance/utterances
[gitalk]: https://github.com/gitalk/gitalk
[convert]: https://docs.github.com/en/discussions/managing-discussions-for-your-community/moderating-discussions#converting-an-issue-to-a-discussion
[laymonage-website]: https://laymonage.com/posts/giscus
[os-phil-opp]: https://os.phil-opp.com
[statsandr]: https://statsandr.com
[techdebtburndown]: https://techdebtburndown.com
[contributing]: https://github.com/giscus/giscus/blob/main/CONTRIBUTING.md

<!-- end -->

---

README 有以下几种语言:

[English](README.md) • [French](README.fr.md) • [Indonesian](README.id.md) • [Polish](README.pl.md) • [Romanian](README.ro.md) • [简体中文](README.zh-CN.md)

[![Powered by Vercel](public/powered-by-vercel.svg)][vercel]

[vercel]: https://vercel.com/?utm_source=giscus&utm_campaign=oss
92 changes: 92 additions & 0 deletions locales/zh-CN/common.json
@@ -0,0 +1,92 @@
{
"reactions": {
"0": "{{count}} 感受",
"one": "{{count}} 感受",
"other": "{{count}} 感受"
},
"comment": "评论",
"comments": {
"0": "{{count}} 评论",
"one": "{{count}} 评论",
"other": "{{count}} 评论"
},
"reply": "回复",
"replies": {
"0": "{{count}} 回复",
"one": "{{count}} 回复",
"other": "{{count}}{{plus}} 回复"
},
"upvotes": {
"0": "{{count}} 赞同",
"one": "{{count}} 赞同",
"other": "{{count}} 赞同"
},
"hiddenItems": {
"0": "{{count}} 隐藏项",
"one": "{{count}} 隐藏项",
"other": "{{count}} 隐藏项"
},
"genericError": "发生了一个错误{{message}}",
"loadMore": "加载更多",
"loading": "加载中",
"loadingComments": "加载评论…",
"loadingPreview": "加载预览…",
"poweredBy": "– powered by <a>giscus</a>",
"showPreviousReplies": {
"0": "查看 {{count}} 条以前的回复",
"one": "查看 {{count}} 条以前的回复",
"other": "查看 {{count}} 条以前的回复"
},
"seePreviousRepliesOnGitHub": {
"0": "在GitHub上查看 {{count}} 条以前的回复",
"one": "在GitHub上查看 {{count}} 条以前的回复",
"other": "在GitHub上查看 {{count}} 条以前的回复"
},
"edited": "编辑",
"thisCommentWasDeleted": "该评论已被删除。",
"thisCommentWasMinimized": "该评论已被折叠。",
"thisCommentWasHidden": "该评论已被隐藏。",
"write": "写",
"preview": "预览",
"lastEditedAt": "最后编辑于 {{date}}",
"writeAComment": "说点什么",
"signInToComment": "登录 GitHub 留下评论",
"stylingWithMarkdownIsSupported": "支持 Markdown 语法",
"cancel": "取消",
"signInWithGitHub": "使用 GitHub 登陆",
"writeAReply": "写回复",

"upvote": "赞同",
"addReactions": "添加感受",
"pleaseWait": "请等待…",
"pickYourReaction": "选择你的感受",
"addTheReaction": "添加 {{reaction}} 感受",
"signInToAddYourReaction": "<a>登陆后</a> 添加你的感受。",
"youMustBeSignedInToAddReactions": "必须登陆才能添加感受。",
"peopleReactedWith": {
"0": "{{count}} 人添加了 {{reaction}} {{emoji}}",
"one": "{{count}} 人添加了 {{reaction}} {{emoji}}",
"other": "{{count}} 人添加了 {{reaction}} {{emoji}}"
},
"emoji": "emoji",
"nothingToPreview": "没什么可以预览的",

"THUMBS_UP": "+1",
"THUMBS_DOWN": "-1",
"LAUGH": "笑",
"HOORAY": "庆祝",
"CONFUSED": "困惑",
"HEART": "爱心",
"ROCKET": "火箭",
"EYES": "眼睛",

"COLLABORATOR": "合作人",
"CONTRIBUTOR": "贡献人",
"FIRST_TIMER": "初学者",
"FIRST_TIME_CONTRIBUTOR": "第一个贡献人",
"MANNEQUIN": "Mannequin",
"MEMBER": "成员",
"NONE": "None",
"OWNER": "博主",
"APP": "App"
}
89 changes: 89 additions & 0 deletions locales/zh-CN/config.json
@@ -0,0 +1,89 @@
{
"configuration": "配置",

"language": "语言",
"chooseLanguageGiscusDisplayed": "选择 giscus 将显示的语言,如果找不到你的语言,在 <a>Contribute</a> 添加本地化支持。",

"lang=en": "English",
"lang=fr": "French",
"lang=id": "Indonesian",
"lang=pl": "Polish",
"lang=ro": "Romanian",
"lang=zh-CN": "Simplified Chinese",

"repository": "仓库",
"chooseTheRepository": "选择 giscus 将要链接的仓库,确保满足以下条件:",
"theRepositoryIsPublic": "这个 <strong>仓库是 <a>公开的</a></strong>, 否则访问者将无法查看讨论内容。",
"theGiscusAppIsInstalled": "<strong><a>giscus</a> app 已安装</strong>, 否则访问者将无法评论和添加感受",
"theDiscussionsFeatureIsTurnedOn": "<strong>开启 Discussions 功能</strong> 通过该教程 <a>enabling it for your repository</a>.",
"repositoryLabel": "仓库名:",
"myusername/myrepo": "myusername/myrepo",
"cannotUseGiscusOnThisRepository": "无法在此仓库上使用 giscus,确保以上所有标准都满足了。",
"successRepositoryMeetsCriteria": "成功!该仓库满足上述所有条件。",
"aPublicGitHubRepository": "一个 <strong>公开的(public)</strong> GitHub 仓库. 这个 repo 是 discussions 将链接到的地方。",

"pageDiscussionsMapping": "网页 ↔️ Discussion 映射",
"chooseTheMapping": "选择网页与嵌入讨论之间的映射关系。",
"titleContainsPathname": "Discussion标题将会包含网页 <code>pathname</code>",
"titleContainsPathnameDesc": "giscus 将会搜索包含网页 <code>pathname</code> URL component 的 Discussion。",
"titleContainsURL": "Discussion 标题包含网页 <code>URL</code>",
"titleContainsURLDesc": "giscus 将会搜索标题含网页 URL 的 Discussion。",
"titleContainsTitle": "Discussion 标题包含网页 <code><title></code>",
"titleContainsTitleDesc": "giscus 将搜索标题包含网页 <title>HTML 标签 的 Discussion。",
"titleContainsOgTitle": "Discussion 标题包含网页 <code>og:title</code>",
"titleContainsOgTitleDesc": "giscus 将搜索标题包含网页 <aOgTitle><code><meta property=\"og:title\"></code></aOgTitle> HTML 标签的Discussion。",
"titleContainsSpecificTerm": "Discussion 标题包含特定关键词",
"titleContainsSpecificTermDesc": "giscus 将搜索标题包含特定关键词的Discussion。",
"enterTermHere": "输入关键词",
"specificDiscussionNumber": "指定 Discussion 编号",
"specificDiscussionNumberDesc": "giscus 将按编号加载特定 Discussion,此选项不支持自动创建 Discussion。",
"enterDiscussionNumberHere": "输入 discussion 编号",

"discussionCategory": "Discussion 类别",
"chooseTheDiscussionCategory": "选择 Discussion 被创建时的类别",
"categoryIsNotSupported": "如果你使用了 <strong>指定 Discussion 编号</strong> 映射, 将不能使用此功能。",
"recommendAnnouncementsCategory": "建议使用 <strong>Announcements</strong> 类别 ,以便新的讨论只能由维护者和 giscus 创建。",
"discussionCategoryLabel": "Discussion 类别",
"categoryNotSupportedOption": "不支持",
"pickACategoryOption": "选择一个类别",
"noCategoriesFoundOption": "未找到类别",
"onlySearchInThisCategory": "仅搜索此类别的 discussions",
"whenSearchingOnlyThisCategory": "搜索匹配的 discussion 时,giscus 只会搜索此类别。",

"features": "特性",
"chooseSpecificFeatures": "选择是否启用特定功能",
"enableReactionsMainPost": "为主要帖子启用感受",
"reactionsMainPostShownBeforeComments": "对主要帖子的感受将显示在评论之前。",
"emitDiscussionMetadata": "发送 discussion 元数据",
"discussionMetadataSentPeriodically": "Discussion 元数据将会定期发送到父级窗口 (潜入页面)。 为了演示,请启用此选项并在此页面上打开浏览器的控制台。有关更多详细信息,请参阅 <a>the documentation</a>",

"theme": "主题",
"chooseAThemeThatMatches": "选择与你的网站相匹配的主题。找不到合适的? <a>贡献</a> 一个新主题",
"URLToThemeCSS": "主题 CSS 文件链接:",
"warningExternalCSSUnsafe": "警告:加载外部 CSS 可能不安全。请确保你信任 CSS 文件的作者和提供者。",

"theme=light": "GitHub Light",
"theme=dark": "GitHub Dark",
"theme=dark_dimmed": "GitHub Dark Dimmed",
"theme=dark_high_contrast": "GitHub Dark High Contrast",
"theme=dark_protanopia": "GitHub Dark Colorblind",
"theme=light_protanopia": "GitHub Light Colorblind",
"theme=transparent_dark": "Transparent Dark",
"theme=preferred_color_scheme": "Preferred color scheme",
"theme=custom": "自定义 (实验性功能)",

"enableGiscus": "启用 giscus",
"addTheFollowingScriptTag": "将以下 <code><script></code> 标签 添加到你希望评论出现的网站模板中。 如果一个class值为 <code>giscus</code> 的元素存在, 评论将会被放在该元素那里。",
"copy": "复制",

"[enterRepoHere]": "[ENTER REPO HERE]",
"[enterRepoIDHere]": "[ENTER REPO ID HERE]",
"[enterCategoryHere]": "[ENTER CATEGORY NAME HERE]",
"[enterCategoryIDHere]": "[ENTER CATEGORY ID HERE]",
"[enterTermHere]": "[ENTER TERM HERE]",
"[enterNumberHere]": "[ENTER NUMBER HERE]",
"[enterThemeCSSURLHere]": "[ENTER THEME CSS URL HERE]",

"youCanCustomizeTheLayout": "你可以在嵌入页面中使用<code>.giscus</code>和<code>.giscus-frame</code>选择器自定义容器布局。",
"tryItOut": "试试吧"
}