# 参与贡献

感谢你有兴趣改进 Wagtail！

## 首次贡献者

1. 先读这份文档。
2. 我们不分配任务。你可以随意挑选任何尚未被别人着手处理的 issue / 任务。
3. **纯由 AI 生成的贡献不受欢迎。** 如果你打算使用 AI 辅助，请阅读[我们关于 AI 辅助贡献的政策](general_guidelines.html.md#use-of-generative-ai)。
4. 阅读[你的第一次贡献指南](first_contribution_guide.html.md)。

## Issue

为 Wagtail 做贡献最简单的方式，就是告诉我们该怎么改进它！首先，检查你的缺陷报告或功能请求是否已在 [github.com/wagtail/wagtail/issues](https://github.com/wagtail/wagtail/issues) 上提交过。如果已经提交，而你有能帮助我们处理它的补充信息，就在那条现有 issue 下留言。如果没有，请[新建一条](https://github.com/wagtail/wagtail/issues/new)，尽可能提供相关的上下文。例如，如果你在安装时遇到问题，请详细说明你的环境和已经采取的步骤。如果某些内容显示不正确，请告诉我们你用的浏览器，并在可能时附上截图。

如果你的缺陷报告是安全问题，**不要**通过 issue 报告。请阅读我们关于[报告安全问题](security.html.md)的指南。

请不要把 issue 追踪器用于技术支持提问——请使用 [Stack Overflow 上的 'wagtail' 标签](https://stackoverflow.com/questions/tagged/wagtail)（首选），或 [Wagtail Slack](https://github.com/wagtail/wagtail/wiki/Slack) 中的 [#support 频道](https://github.com/wagtail/wagtail/wiki/Slack#support)。

如果你想在提出某个想法之前先讨论它，请使用 [Wagtail Slack](https://github.com/wagtail/wagtail/wiki/Slack)或 [Discussions](https://github.com/wagtail/wagtail/discussions)。

关于 issue 是如何处理的更多信息，见 [Issue 跟踪](issue_tracking.html.md)。

## Pull Request

如果你刚开始做开发，从未为开源项目贡献过代码，我们建议你阅读[你的第一次贡献指南](first_contribution_guide.html.md)。如果你是一位自信的 Python 或 Django 开发者，[fork 它](https://github.com/wagtail/wagtail/)并阅读[开发文档](developing.html.md#developing-for-wagtail)，马上动手吧！

我们欢迎所有贡献，无论它们是解决你自己的特定问题，还是修复已有的 issue。如果你没有思路，可以从[issue 列表](https://github.com/wagtail/wagtail/issues?q=is%3Aopen)中挑一个——你也许可以先看看带 [good first issue](https://github.com/wagtail/wagtail/labels/good%20first%20issue) 标签的 issue。没必要问“请把这条 issue 分配给我”，但可以随意留言说明你的计划，让别人知道你正在处理它。

对于大规模改动，我们一般建议把它们拆成更小的 Pull Request，每个完成一个定义明确的单一任务，可以分别评审。如果这不可行，我们建议在 [Wagtail RFCs](https://github.com/wagtail/rfcs/) 仓库上开一个 Pull Request，这样社区就有机会在改动落地之前进行讨论。

## 翻译

Wagtail 支持国际化，所以如果你精通某种非英语语言，你可以通过本地化界面来贡献。

翻译工作应通过 [Transifex](https://explore.transifex.com/torchbox/wagtail/) 提交。关于如何开始，见 [翻译](translations.html.md#contributing-translations)。

## 代码评审

我们欢迎所有人参与代码评审，不过 Pull Request 要被合并，至少需要一位核心团队成员评审。总会有一批带 [status:Needs Review](https://github.com/wagtail/wagtail/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3A%22status%3ANeeds+Review%22) 标签的 Pull Request。

## issue 分流

我们欢迎你帮忙分流 issue 和 Pull Request。你可以通过以下方式帮忙：

- 给缺陷报告或功能请求补充更多细节或你自己的视角。
- 尝试复现带 [status:Unconfirmed](https://github.com/wagtail/wagtail/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Astatus%3AUnconfirmed) 标签的 issue，并分享你的发现。
- 评审 Pull Request 或以其他方式提供你的反馈。

更多信息见我们的 [issue 追踪指南](issue_tracking.html.md)。

## 无障碍测试

我们很想得到关于 Wagtail 无障碍性的反馈。如果你在测试 Wagtail 并想报告你的发现，请联系我们的[无障碍团队](https://github.com/wagtail/wagtail/wiki/Accessibility-team)，或者看看我们的[无障碍 issue 与改进待办清单](https://github.com/wagtail/wagtail/projects/5)。我们也记录了我们的[测试目标与已知问题](ui_guidelines.html.md#accessibility-targets)。

<a id="other-contributions"></a>

## 其他贡献方式

为 Wagtail 社区做贡献还有许多其他方式，无论是通过代码还是其他途径：

- 为 GitHub 上 Wagtail 的其他[核心项目](https://github.com/orgs/wagtail/repositories)之一做贡献。
- 为 [Wagtail Nest](https://github.com/wagtail-nest/) 上由社区维护的某个包做贡献。
- 为 [Wagtail 指南](https://guide.wagtail.org/en/contributing/)贡献面向用户的文档（包括翻译）。
- 在 GitHub 上给 [wagtail](https://github.com/wagtail/wagtail) 项目加星
- 在 [Wagtail StackOverflow 主题](https://stackoverflow.com/questions/tagged/wagtail)或 Slack 的 `#support` 中回答别人的问题。
- 在 [G2 上写一篇 Wagtail 的评测](https://www.g2.com/products/wagtail/reviews)。
- 在 [Wagtail discussions](https://github.com/wagtail/wagtail/discussions)上提供一些有见地的反馈。
- 向 [This Week in Wagtail 通讯](https://wagtail.org/newsletter/)、[Awesome Wagtail](https://github.com/springload/awesome-wagtail)或 [第三方教程](../advanced_topics/third_party_tutorials.html.md)投稿（或撰写）一篇教程或一个优秀的包。

## 为 Wagtail 开发包

创建和维护包是为 Django 和 Wagtail 生态做贡献的好方式。更多指引见我们的[包作者指南](../packages/index.html.md#packages-guide)。

## 更多信息

* [你的第一次贡献](first_contribution_guide.html.md)
  * [指南](first_contribution_guide.html.md#id3)
  * [常见问题](first_contribution_guide.html.md#id21)
  * [有用的链接](first_contribution_guide.html.md#id28)
* [搭建开发环境](developing.html.md)
  * [搭建 Wagtail 代码库](developing.html.md#wagtail)
  * [在 Windows 上开发](developing.html.md#development-on-windows)
  * [测试](developing.html.md#testing)
  * [编译静态资源](developing.html.md#id8)
  * [编译文档](developing.html.md#id9)
  * [代码检查与格式化](developing.html.md#linting-and-formatting)
  * [从 fork 安装](developing.html.md#developing-using-a-fork)
* [API 开发](api_development.html.md)
  * [OpenAPI 快照工作流](api_development.html.md#openapi)
  * [类型检查](api_development.html.md#id1)
  * [分页](api_development.html.md#id2)
  * [RFC 7807 错误](api_development.html.md#rfc-7807)
  * [Contrib 应用的端点](api_development.html.md#contrib)
  * [测试与可替换的页面模型](api_development.html.md#id3)
* [通用编码规范](general_guidelines.html.md)
  * [生成式 AI 的使用](general_guidelines.html.md#use-of-generative-ai)
  * [语言](general_guidelines.html.md#id4)
  * [文件名](general_guidelines.html.md#id5)
  * [命名惯例](general_guidelines.html.md#id6)
* [Python 编码规范](python_guidelines.html.md)
  * [PEP8](python_guidelines.html.md#pep8)
  * [Django 兼容性](python_guidelines.html.md#django)
  * [测试](python_guidelines.html.md#id1)
* [UI 编码指南](ui_guidelines.html.md)
  * [浏览器与设备支持](ui_guidelines.html.md#browser-and-device-support)
  * [无障碍目标](ui_guidelines.html.md#accessibility-targets)
  * [HTML 指南](ui_guidelines.html.md#html)
  * [CSS 指南](ui_guidelines.html.md#css)
  * [JavaScript 指南](ui_guidelines.html.md#javascript)
  * [Stimulus](ui_guidelines.html.md#ui-guidelines-stimulus)
  * [多语言支持](ui_guidelines.html.md#multilingual-support)
  * [图标](ui_guidelines.html.md#id13)
  * [图片](ui_guidelines.html.md#id15)
  * [UI 样式指南](ui_guidelines.html.md#styleguide)
  * [使用模式库](ui_guidelines.html.md#pattern-library)
* [文档编写指南](documentation_guidelines.html.md)
  * [写作风格指南](documentation_guidelines.html.md#writing-style-guide)
  * [格式建议](documentation_guidelines.html.md#id4)
  * [应避免的格式](documentation_guidelines.html.md#id25)
  * [代码示例的考量](documentation_guidelines.html.md#documentation-code-example-considerations)
* [编写文档](documentation_modes.html.md)
  * [选择写作模式](documentation_modes.html.md#choose-a-writing-mode)
  * [教程](documentation_modes.html.md#doc-mode-tutorial)
  * [操作指南](documentation_modes.html.md#doc-mode-how-to-guide)
  * [参考](documentation_modes.html.md#doc-mode-reference)
  * [解释](documentation_modes.html.md#doc-mode-explanation)
* [翻译](translations.html.md)
  * [翻译工作流](translations.html.md#id2)
  * [标记待翻译字符串](translations.html.md#id4)
  * [额外资源](translations.html.md#id6)
* [报告安全问题](security.html.md)
  * [提前通知](security.html.md#id2)
  * [受支持的版本](security.html.md#id3)
  * [漏洞赏金](security.html.md#id4)
  * [CVE ID](security.html.md#cve-id)
  * [Wagtail 如何披露安全问题](security.html.md#how-wagtail-discloses-security-issues)
  * [常见误报问题](security.html.md#id5)
* [Issue 跟踪](issue_tracking.html.md)
  * [Issue](issue_tracking.html.md#id1)
  * [Pull Request](issue_tracking.html.md#pull-request)
  * [发布计划](issue_tracking.html.md#id3)
* [提交代码](committing.html.md)
  * [在本地检出代码](committing.html.md#id2)
  * [Rebase 到 `main` 之上](committing.html.md#rebase-main)
  * [更新 `CHANGELOG.txt` 和发布说明](committing.html.md#changelog-txt)
  * [推送到 `main`](committing.html.md#main)
  * [当你犯了错误](committing.html.md#id3)
  * [向别人的 Pull Request 添加提交](committing.html.md#pull-request)
