This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git
The following commit(s) were added to refs/heads/main by this push:
new e30abb02 fix: delete duplicate files
e30abb02 is described below
commit e30abb026a7065f364e1f814acfa71af57e49f3d
Author: shuai <[email protected]>
AuthorDate: Tue Jul 9 10:40:03 2024 +0800
fix: delete duplicate files
---
.../current/blog-post.md | 132 ------------
.../current/contributing.md | 90 --------
.../current/how-to-release.md | 230 ---------------------
.../current/issues.md | 60 ------
.../current/pull-request.md | 78 -------
.../current/translation.md | 17 --
.../current/development/api.md | 48 +++++
.../current/development/contributing/backend.md | 209 -------------------
.../development/contributing/contributing.md | 51 -----
.../current/development/contributing/frontend.md | 120 -----------
.../{getting-started => development}/database.md | 84 ++++----
.../current/development/extending/plugin-config.md | 137 ------------
.../current/development/extending/plugin-for-ui.md | 175 ----------------
.../development/extending/plugin-translation.md | 128 ------------
.../current/development/guide.md | 117 +++++++++++
.../current/development/plugins/plugin-config.md | 134 ++++++++++++
.../development/plugins/plugin-translation.md | 128 ++++++++++++
.../development/{extending => plugins}/plugins.md | 0
.../current/getting-started/command-line.md | 122 ++++++-----
.../current/getting-started/configfile.md | 35 ++--
.../current/getting-started/env.md | 42 ++--
.../current/getting-started/installation.md | 61 +++---
.../current/getting-started/plugins.md | 98 ++++-----
.../current/getting-started/upgrade.md | 35 ++--
.../current/guides/deploy-subdirectory.md | 63 ++++++
.../current/guides/deployment.md | 63 ------
.../current/guides/flags.md | 6 +-
.../current/guides/moderation.md | 4 +
.../current/guides/permission.md | 66 +++---
.../current/guides/questions.md | 13 ++
.../current/guides/reputation.md | 38 ++--
.../current/guides/review.md | 7 +
.../current/guides/settings.md | 4 +
.../current/guides/tags.md | 7 +
.../current/guides/users.md | 90 ++++++++
35 files changed, 921 insertions(+), 1771 deletions(-)
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/blog-post.md
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/blog-post.md
deleted file mode 100644
index 7e3fae31..00000000
--- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/blog-post.md
+++ /dev/null
@@ -1,132 +0,0 @@
----
-sidebar_label: Blog Post
-slug: /blog-post
----
-
-# 贡献一篇博客文章
-
-博客是[参与](/community/contributing#get-involved) Apache Answer
的最简单方法之一。这也是与他人分享你的知识和经验的好方法。
-
-如果你用 Apache Answer 构建了自己的问答社区,或者 Apache Answer 帮助你解决了问题,我们很想听听你的故事。我们还鼓励你分享使用
Apache Answer 的技巧和窍门,或写下如何为项目做出贡献。
-
-要开始,只需阅读我们的博客指南并开始写作!
-
-## 存储库地址
-
-- [GitHub](https://github.com/apache/incubator-answer-website): 撰写和存储博客文章。
-- [Crowdin](https://crowdin.com/project/answer-website):
将博客文章翻译成多种语言,使更广泛的受众更容易访问。
-
-## 博客目录
-
-博客目前有两种语言版本:英语(默认)和中文。如果你要提交中文博客,你需要手动将其复制到 /blog
目录,以防止编译错误。如果你只提交英语博客,你不需要做其他任何事情。
-
-- 英文博客: `/blog`
-- 中文博客: `/i18n/docusaurus-plugin-content-blog`
-
-我们与 Crowdin 集成,它会自动同步需要翻译的文件。这使得社区贡献者更容易参与翻译。
-
-## 博客类别
-
-我们当前的博客类别是:
-
-- Community
-- Best Practices
-- Tutorials
-- Insights
-- Releases
-- Tech
-
-除了提交新博客外,还可以通过识别和纠正任何不正确或不清晰的语言,或更新内容以反映最新信息来帮助维护现有的博客内容。
-
-## 提交博客
-
-### 环境设置
-
-项目预览和运行取决于 [node](https://nodejs.org) 和 [pnpm](https://pnpm.io) 。请提前安装好。
-
-### 添加作者信息
-
-所有作者信息都存储在以下文件中:
-
-- `/blog/authors.yml`
-- `/i18n/docusaurus-plugin-content-blog/authors.yml`
-
-你可以在这些文件中添加有关自己的信息以显示。这里有一个例子:
-
-```yaml title="/blog/authors.yml"
-Anne:
- name: Anne Zhu
- title: Product Marketing Manager
- url: https://github.com/PrimmaAnna
- image_url: https://avatars.githubusercontent.com/u/131739771?v=4
-
-# Use in the blog's frontMeta
----
-authors: [Anne] # separate with commas [Anne, others]
----
-```
-
-### 过程
-
-1. 确保将新的博客文档放在正确的路径上。
-
- - **对于英语博客**: 在`/blog`目录中创建一个新的 Markdown 文件。
- - **对于中文博客**: 在`/i18n/zh-CN/docusaurus-plugin-content-blog/`目录中创建一个新的
Markdown 文件。
-
-2. 为了确保最终文章 URL 遵循`/blog/2023/06/01/hello-world`,我们为每个文章文件建立了以下命名约定:
-
- - **纯文本**
- - 在`/blog`目录中直接创建一个名为`2023-06-01-hello-world.md`的文件。
- - **富文本**
- - 在`/blog`目录中创建一个名为`/2023-06-01-foo-bar`的目录。
- - 在`/2023-06-01-foo-bar`目录里创建一个`index.md`文件。
- - 图像和其他多媒体内容也应放置在此目录中。
-
- 为了保持语义和独特的文章 URL
,我们建议在命名文件或文件夹时在日期后使用博客标题。将标题转换为小写,并将单词与连字符连接起来。这消除了对页面上的弹头字段的担忧。除非绝对必要,否则避免指定弹头字段。
-
- 例如,如果博客的标题是`Hello World`,该文件可以命名为`2023-06-01-hello-world`,这将生成 URL
`/blog/2023-06-01/hello-world`。
-
- ```shell
- blog
- ├── 2023-06-01-foo-bar # Use directory for images.
- │ ├── index.md
- │ ├── sample.png
- │ └── ...
- ├── 2023-06-01-hello-world.md # Use file for plain text.
- └── ...
- ```
-
- 为了确保跨平台的文件兼容性,避免在文件名中使用特殊字符`/ ? * : | \ < > & #`。
-
-3. 在 [Docusaurus Markdown](https://docusaurus.io/docs/markdown-features) 中学习
Markdown 语法。如果包含图像,请确保图像和博客位于同一目录中。
-
- 除了标准元数据字段外,我们还引入了一些自定义字段及其用法,例如“封面图像”(图像)和“特色帖子”(特色)。
-
- 封面图像需要遵守我们的视觉风格指南,以便你可以专注于撰写博客文章。提交后,我们将根据你的内容自动生成封面图片。
-
- “特色”字段决定你的博客文章是否出现在[博客](/blog)主页上。要突出你的博客文章,请将“特色”字段设置为“真实”。
-
- 查看以下示例。
-
- ```yaml
- title: The What, Why Using Tags for Online Community
- authors: [Anne]
- category: Insights // value reference in blog type
- featured: true
- image: [email protected] // Note: place it in the /static/img/blog
directory.
- description: "Discover more about tags, benefits, and how vital they are
for organizing content in online community."
- ```
-
-4. 在提交代码之前,请确保运行无错误。你可以通过运行以下命令来检查它。
-
- ```shell
- # Preview locally
- pnpm start # to preview the Chinese docs, run pnpm start:zh)
-
- # Locally compile to ensure no errors before submitting
- pnpm build # no errors when display [SUCCESS] Generated static files in
"build/zh-CN"
- ```
-
-## 其他
-
-对于代码提交,您可能还需要学习 [Git](https://git-scm.com/)
和[拉取请求](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/contributing.md
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/contributing.md
deleted file mode 100644
index a924df37..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/contributing.md
+++ /dev/null
@@ -1,90 +0,0 @@
----
-slug: /contributing
----
-
-# 贡献
-
-感谢你有兴趣为 Apache Answer 做出贡献,希望本文档能明确做出贡献的过程。
-
-[开源指南网站](https://opensource.guide/)为想要学习如何运行开源项目并为其做出贡献的个人、社区和公司提供了资源集合。以下指南将会对贡献者和开源新手特别有用:
-
-- [如何为开源做出贡献](https://opensource.guide/how-to-contribute/)
-- [建立欢迎社区](https://opensource.guide/building-community/)
-
-## 行为规范
-
-Apache Answer
通过了一项行为准则,我们希望项目参与者遵守该准则。请阅读[全文](https://www.apache.org/foundation/policies/conduct.html),以便你了解哪些行动是可以容忍的,哪些是不能容忍的。
-
-## 参与进来
-
-Apache Answer 是一个由热情的用户、贡献者和PMC成员构建的开源项目。我们致力于创建一个开放和包容的社区,我们欢迎每个人加入我们,接收
Apache 的方式,共同构建开源。
-
-任何人都可以为 Apache Answer 做出贡献。除了贡献代码外,还有许多其他参与方式,例如:
-
-##### 使用 Apache Answer
-
-- 开始使用Apache Answer很容易。只需遵循我们的[入门指南](/docs/installation),看看是否一切正常运行。
-- 如果没有,你可以。[创建一个问题](/community/issues)来报告错误或提出改进建议。
-
-##### 分类问题和拉取请求
-
-- 如果你认为[问题](/community/issues)没有提供解决它所需的所有细节,请询问更多信息。
-- 表明[标签](https://github.com/apache/incubator-answer/labels)有助于对问题进行分类。
-- 标记过时或应该关闭的问题。
-- 询问测试计划和审查代码。
-
-##### 贡献代码
-
-- 如果你找到可以解决的问题,请认领问题。创建一个[拉取请求](/community/pull-request)来提交你的更改。
-- 标记为[`good first
issue`](https://github.com/apache/incubator-answer/labels/good%20first%20issue)的问题非常适合作为开始。
-
-##### 改进文档
-
-- 如果你在阅读我们的[文档](/docs)时发现任何错别字、语法或错误,只需单击“编辑此页面”并在GitHub上进行编辑。
-
-##### 开发插件
-
-- 使用插件扩展 Apache Answer 的功能。
-- 一些用户期待的功能,可以通过[开发和提交](/docs/development/plugins)去声明或创建你的需求。
-
-##### 帮助版本发布
-
--
通过测试新的候选版本并在[[email protected]](https://lists.apache.org/[email protected])上投票,帮助我们让
Apache Answer 变得更好。
-- 如果你没有发现任何问题,可以投`+1 (non-binding)`赞成票。
-- 如果你发现了问题,可以投 `-1 (non-binding)`反对票。
-
-##### 贡献翻译
-
-- 如果你能流利地使用英语以外的语言,你可以使用 [Crowdin](https://crowdin.com/project/answer) 帮助我们将
Apache Answer 翻译成其他语言。
-- 想要获得更多信息,可以参阅[贡献翻译指南](/community/translation)。
-
-##### 帮助支持
-
-- 通过在 [Apache Answer Meta](https://meta.answer.dev)上帮助其他用户可以为我们提供很大的帮助。
-- 回复并解决[邮箱列表](/community/support/#mailing-list)中的问题。
-
-##### 推广 Apache Answer
-
-- 在社交媒体上分享 Apache Answer 。
-- 在 Apache Answer 上把你的故事分享给更多人。
-- 加入我们的聚会、论坛等。
-
-##### 其他
-
-- 有新想法吗?非常欢迎所有贡献。
-- - 如果你认为你需要帮助来规划你的贡献,请[联系我们](/community/support/#others),并告诉我们你正在寻找什么样的帮助。
-
-## 开发过程
-
-Apache Answer
使用[GitHub](https://github.com/apache/incubator-answer)作为其真实版本的来源。核心团队将直接在那里工作。所有的更改从一开始就会是公开的。
-
-所有拉取请求都将由持续集成系统GitHub操作进行检查。有单元测试,还有更多。
-
-### 分支组织
-
-提交PR时应选择哪个分支?
-
-- `main`分支对应于**最新版本**的 answer。如果你正在为最新版本**修复**问题,请选择主分支。
-- `dev`分支用于**下一个版本**的开发。因此,如果你正在开发**新功能**,请切换到开发分支,并为其提交PR。
-
-通常,我们在问题上标记里程碑来跟踪问题应该在哪个版本中修复。因此,你可以根据里程碑确定应该提交到哪个版本。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-release.md
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-release.md
deleted file mode 100644
index 7093c3ad..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-release.md
+++ /dev/null
@@ -1,230 +0,0 @@
----
-slug: /how-to-release
----
-
-# 如何发布
-
-所有 Apache 项目都必须遵循 [Apache Release
Policy](https://www.apache.org/legal/release-policy.html) 。这可以帮助你了解政策以及如何在
Apache 上发布项目。
-
-## 发布过程
-
-1. 准备所有发布工件。
-2. 将发布工件上传到 svn 存储库。
-3. 证实发布工件。
-4. 对发布进行投票。
-5. 宣布投票结果并发布。
-
-## 准备所有发布工件
-
-1. 在 git 存储库中创建 RC 标签,并编写发布说明。
-2. 建立发布工件(捆绑包、源档案等)。
-3. 在发布工件上签名。
-4. 为发布工件创建校验和。
-
-### 签署发布工件
-
-1. 如果你没有 GPG 密钥,创建一个 GPG 密钥。
-2. 将 GPG 密钥添加到 KEYS 文件中。
-3. 使用 GPG 密钥签署发布工件。**小心检查二进制文件是否完整,以避免大小为0。**
-
-```shell
-# create a GPG key, after executing this command, select the first one RSA 和
RSA
-$ gpg --full-generate-key
-
-# list the GPG keys
-$ gpg --keyid-format SHORT --list-keys
-
-# upload the GPG key to the key server, xxx is the GPG key id
-# eg: pub rsa4096/4C21E346 2024-05-06 [SC], 4C21E346 is the GPG key id;
-$ gpg --keyserver keyserver.ubuntu.com --send-key xxx
-
-# append the GPG key to the KEYS file the svn repository
-# [IMPORTANT] Don't replace the KEYS file, just append the GPG key to the KEYS
file.
-$ svn co https://dist.apache.org/repos/dist/release/incubator/answer/
-$ (gpg --list-sigs [email protected] && gpg --export --armor [email protected]) >>
KEYS
-$ svn ci -m "add gpg key"
-
-# sign the release artifacts, xxxx is [email protected]
-$ for i in *.tar.gz; do echo $i; gpg --local-user xxxx --armor --output $i.asc
--detach-sig $i ; done
-```
-
-### 为发布的工件创建校验和
-
-```shell
-# create the checksums
-$ for i in *.tar.gz; do echo $i; sha512sum $i > $i.sha512 ; done
-```
-
-## 将发布工件上传到 svn 存储库
-
-1. 在 svn 存储库中为发布工件创建一个目录。
-2. 将发布工件上传到 svn 存储库。
-3. 发布版本格式: 1.3.1-incubating
-
-发布工件应上传到`https://dist.apache.org/repos/dist/dev/incubator/answer/{release-version}`目录。
-
-
-```shell
-$ svn co https://dist.apache.org/repos/dist/dev/incubator/answer/
-$ cp /path/to/release/artifacts/* ./{release-version}/
-$ svn add ./{release-version}/*
-$ svn commit -m "add Apache Answer release artifacts for {release-version}"
-```
-
-**重要!**完成后,请访问链接`https://dist.apache.org/repos/dist/dev/incubator/answer/{release-version}`检查文件上传是否正确。
-
-
-
-
-## 验证发布工件
-
-以下是发布工件的基本检查项。
-
-- [ ] 下载链接是有效的。
-- [ ] 校验和与 PGP 签名是有效的。
-- [ ] 源代码发行版具有与当前版本匹配的正确名称。
-- [ ] 许可证和通知文件对每个 Apache Answer repo 都是正确的。
-- [ ] 如有必要,所有文件都有许可证标头。
-- [ ] 源档案中没有捆绑未经许可的编译档案。
-
-### 如何验证签名
-
-```shell
-# download KEYS
-$ curl https://dist.apache.org/repos/dist/release/incubator/answer/KEYS > KEYS
-
-# import KEYS and trust the key, please replace the email address with the one
you want to trust.
-$ gpg --import KEYS
-$ gpg --edit-key [email protected]
-gpg> trust
-gpg> 5
-gpg> y
-gpg> quit
-
-# enter the directory where the release artifacts are located
-$ cd /path/to/release/artifacts
-
-# verify the signature
-$ for i in *.tar.gz; do echo $i; gpg --verify $i.asc $i ; done
-
-# if you see 'Good signature' in the output, it means the signature is valid.
-```
-
-### 如何验证校验和
-
-```shell
-# verify the checksums
-$ for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done
-```
-
-## 对发布进行投票
-
-1. 发送投票电子邮件至[email protected]。孵化器需要首先对他们的开发列表进行投票,该投票需要**Apache Answer
PPMC成员至少3+1**。
-2. 等待**至少72小**或直到达到必要的票数。
-3. 在开发名单上宣布投票结果。
-4. 如果开发投票通过,请发送电子邮件至 [email protected]
,要求在总名单上投票。孵化器投票需要**项目管理委员会成员至少3+1**(具有约束力的投票)。
-5. 等待**至少72小**或直到达到必要的票数。
-6. 在开发名单上宣布投票结果。
-
-### 投票电子邮件模板
-
-**注意!**直接复制电子邮件内容将导致格式不正确。建议将电子邮件复制到`.txt`
文件。写完内容后,将其复制到您正在使用的电子邮件工具中。在开发的第一轮投票中,不需要 `The vote tread` 和 `Vote Result` 。
-
-如何获取投票线程的链接:
-1. 从 Apache 邮件列表中找到你发送的电子邮件。
-2. 单击电子邮件下方的链接按钮以获取你需要的链接。
-
-
-
-
-
-```text
-[VOTE] Release Apache Answer (Incubating) {release-version}
-
-Hello,
-
- This is a call for vote to release Apache Answer (Incubating) version
{release-version}.
-
- The vote thread:
- https://lists.apache.org/thread/{id}
-
- Vote Result:
- https://lists.apache.org/thread/{id}
-
- The release candidates:
-
https://dist.apache.org/repos/dist/dev/incubator/answer/{release-version}/
-
- Release notes:
-
https://github.com/apache/incubator-answer/releases/tag/{release-version}
-
- Git tag for the release:
-
https://github.com/apache/incubator-answer/releases/tag/{release-version}
-
- Git commit id for the release:
- https://github.com/apache/incubator-answer/commit/{id}
-
- Keys to verify the Release Candidate:
- https://downloads.apache.org/incubator/answer/KEYS
-
- The vote will be open for at least 72 hours or until the necessary number
of votes are reached.
-
- Please vote accordingly:
-
- [ ] +1 approve
- [ ] +0 no opinion
- [ ] -1 disapprove with the reason
-
- Checklist for reference:
-
- [ ] Download links are valid.
- [ ] Checksums and PGP signatures are valid.
- [ ] Source code distributions have correct names matching the current
release.
- [ ] LICENSE and NOTICE files are correct for each Apache Answer repo.
- [ ] All files have license headers if necessary.
- [ ] No unlicensed compiled archives bundled in source archive.
-
- To compile from the source, please refer to:
-
- https://github.com/apache/incubator-answer#building-from-source
-
-Thanks,
-<YOUR NAME>
-```
-
-### 宣布电子邮件模板
-
-```text
-Hello everyone,
-
-The Apache Answer (Incubating) {release-version} has been released!
-
-Apache Answer is a Q&A platform software for teams at any scale.
-Whether it's a community forum, help center, or knowledge management platform,
you can always count on Apache Answer.
-
-Download Links: https://downloads.apache.org/incubator/answer/
-
-Release Notes:
https://github.com/apache/incubator-answer/releases/tag/{release-version}
-
-Website: https://answer.apache.org/
-
-Resources:
-- Issue: https://github.com/apache/incubator-answer/issues
-- Mailing list: [email protected]
-
-Thanks,
-<YOUR NAME>
-```
-
-## 将发布工件迁移到发布Apache SVN
-
-在宣布投票结果之前,你需要将发布工件从开发 Apache SVN 迁移到发布 Apache SVN
。发布工件应上传到`https://dist.apache.org/repos/dist/release/incubator/answer/{release-version}`目录。
-
-```shell
-$ svn mv
https://dist.apache.org/repos/dist/dev/incubator/answer/{release-version}
https://dist.apache.org/repos/dist/release/incubator/answer/{release-version}
-m "transfer packages for answer {release-version}"
-```
-
-## 笔记
-### RC 标签
-当你想发布新版本时,你需要先在git存储库中创建一个新的RC标签。标签名称应该是`v{release-version}-rc{rc-version}`。这具有避免删除标签的优势。
-
-例如,如果你想发布`1.2.0`版本,则需要创建一个名为`v1.2.0-RC1`的标签。RC的意思是释放候选人。发布投票通过后,你需要根据RC标签创建一个名为`v1.2.0-RC2`的新标签。但是,如果投票未通过,你可以解决问题,并创建一个新的RC标签,如`v1.2.0-RC2`,然后开始新的投票。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/issues.md
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/issues.md
deleted file mode 100644
index 8f552a92..00000000
--- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/issues.md
+++ /dev/null
@@ -1,60 +0,0 @@
----
-slug: /issues
----
-
-# 问题
-
-Apache Answer项目中有一些仓库,你可以为不同的仓库提出你的问题。
-
-| 仓库 | 描述 | 问题 |
-| --- | --- | --- |
-| Apache Answer | Apache Answer 核心代码 |
[问题](https://github.com/apache/incubator-answer/issues) |
-| Apache Answer 插件 | Apache Answer 插件代码 |
[问题](https://github.com/apache/incubator-answer-plugins/issues) |
-| Apache Answer 网页 | Apache Answer 网页代码 |
[问题](https://github.com/apache/incubator-answer-website/issues) |
-
-打开新问题时,请务必填写问题模板。**这一步非常重要!**
不这样做可能会导致你的问题无法及时管理。如果发生这种情况,请不要将此视为个人问题,一旦你收集了模板所需的所有信息,请随时打开新问题。
-
-**请不要使用 GitHub 问题跟踪器提问。**相反,你可以在上提问,我们将尽最大努力为你提供需要的答案。 [Apache Answer
Meta](https://meta.answer.dev) 上提问,我们将尽最大努力为你提供需要的答案。
-
-## 程序错误
-
-如果你发现程序错误,首先要做的是搜索问题,看看是否有人已经报告了。如果是这样,请添加任何其他信息作为对现有问题的评论。
-
-如果不存在现有问题,请打开新问题并完整填写问题模板。你提供的信息越多,你的问题就越有可能迅速得到解决。最好在每个问题中包含以下内容:
-
-- 对问题的清晰描述
-- 问题的屏幕截图(如果适用)
-- 重现问题的步骤
-- 正在使用的 Apache Answer 版本
-- 正在使用的部署方法(例如Docker,二进制,源)
-- 浏览器的版本(如果问题与前端相关)
-- 正在使用的操作系统(如果问题与后端相关)
-- 认为相关的任何其他细节
-
-## 安全程序错误
-
-如果你发现了安全漏洞,考虑到这一点,请不要提交公共问题。你可以按照[安全政策](https://github.com/apache/incubator-answer/security/policy)中的说明进行私下报告。
-
-## 功能请求
-
-我们感谢你的反馈和想法。如果你有功能请求,可以完整填写问题模板,并搜索问题,看看是否有人已经请求了相同的功能。
-
-如果我们认为功能请求是一个好主意,我们会将其添加到路线图中并设置里程碑。如果你想实施它,请评论这个问题,我们会将其分配给你。
-
-## 问题标签
-
-我们用标签对问题进行分类。
-
-| 标签 | 描述 |
-| --- | --- |
-| `bug` | 表示意外问题或意外行为 |
-| `documentation` | 表明需要对文档进行改进或添加 |
-| `duplicate` | 表示相似对问题、合并请求或讨论 |
-| `feature` | 意味着新的功能请求 |
-| `enhancement` | 表示增强请求 |
-| `good first issue` | 表明适合初次贡献者的好问题 |
-| `help wanted` | 意味着维护者需要在某个问题或拉取请求上得到帮助 |
-| `invalid` | 表示某个问题、拉取请求或讨论已不再相关 |
-| `question` | 表明某个问题、拉取请求或讨论需要更多信息 |
-| `wontfix` | 表示在某个问题、拉取请求或讨论上工作将不会继续 |
-| `security` | 意味着一个关于安全的问题 |
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/pull-request.md
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/pull-request.md
deleted file mode 100644
index 7cb75a44..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/pull-request.md
+++ /dev/null
@@ -1,78 +0,0 @@
----
-slug: /pull-request
----
-
-# 拉取请求
-
-我们感谢你抽出时间做出贡献!在提交拉取请求之前,我们要求你创建一个解释错误或功能请求的问题,并告诉我们你计划为它创建拉取请求。如果问题已经存在,请对该问题发表评论,让我们知道你想提交拉取请求。这有助于我们跟踪拉取请求,并确保没有重复的工作量。
-
-## 语义化的提交消息
-
-在提交消息时,遵循以下格式可以令你成为更好的程序员。
-
-```txt
-<type>(<scope>): <subject>
-```
-
-- `type`
-
- - `feat`: 一个新功能。
- - `fix`: 一个程序错误修复。
- - `docs`: 仅文档更改。
- - `style`: 不影响代码含义的更改(空白、格式、缺少分号等)。
- - `refactor`: 既不修复错误也不添加功能的代码更改。
- - `perf`: 提高性能的代码更改。
- - `test`: 添加缺失的测试。
- - `chore`: 对构建过程或辅助工具和库(如文档生成)的更改。
-
-- `scope`
-
- - 范围可以是任何指定提交更改地点的东西。
-
-- `subject`
- - 该主题包含对变化的简要描述。
- - 使用命令式、现在时: "change" 而不是 "changed" 也不是"changes"。
- - 首字母不要大写。
- - 不要在末尾放置`.`。
- - 提交消息的整个长度不得超过50个字符。
- - 描述提交的具体操作,而不是它涉及或修复的问题。
- - 简洁但具有描述性 - 通过阅读主题,我们应该能够清楚地理解提交的操作。
-## 许可
-
-通过向 Answer 做出贡献,你同意你的贡献将根据 Apache-2.0 许可证获得许可。将此复制并粘贴到新文件的顶部:
-
-```go
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
- ```
-
-## 贡献者许可协议(CLA)
-
-Apache CLA 是 Apache 贡献者许可协议的缩写,本协议的目的是明确定义知识产权向 ASF
贡献的条款,从而允许我们在未来某个时候在软件发生法律争议时为该项目辩护。在个人获得任何 ASF 项目的提交权之前,需要将已签名的 ICLA 存档。
-
-对于由单个原始作者贡献的更大贡献,我们可能会要求你提交[个人贡献者许可协议(ICLA)](https://www.apache.org/licenses/contributor-agreements.html)表格。你的代码的版权仍将属于你,但
ICLA 有助于保护 Apache Answer 的用户。所有项目委员会也都签署了这份表格。
-
-如果你已经签署了 Apache ICLA ,则无需发送电子邮件。由于你已经以你的公共名称提交了 ICLA ,因此无需重新提交。如果你从未签署过 ICLA
,请在电子邮件中注明,PMC可以直接申请此帐户。
-
-
-## 开发和贡献
-
-有关详细信息,请参阅[文档](/docs/development)。
-
-
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/translation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/translation.md
deleted file mode 100644
index 5f19cfd8..00000000
--- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/translation.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-slug: /translation
----
-
-# Translation
-
-我们的项目与[crowdin](https://crowdin.com/)翻译有关;我们建议通过Crowdin提供翻译。
-
-翻译项目列表:
-
-- [crowdin-apache-answer](https://crowdin.com/project/answer)
-- [crowdin-apache-answer-website](https://crowdin.com/project/answer-website)
-
-## 为什么推荐 crowdin
-
-1. 通过 crowdin ,翻译人员只需要专注于翻译工作本身, crowdin 将提供非常方便的提示;
-2. 不需要额外的操作,例如 git 命令。我们的 apache-answer gi项目语言文件使用 yaml
。一些贡献者可能会错误地格式化缩进或操作,导致一些格式化错误;
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/api.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/api.md
new file mode 100644
index 00000000..487988f0
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/api.md
@@ -0,0 +1,48 @@
+---
+slug: /api
+---
+
+# API Document
+
+:::tip
+
+Apache Answer using swagger to generate API document automatically. Swagger
can display the API document in a friendly way, and can also provide a
convenient way to test the API.
+
+:::
+
+## Where is the API document?
+
+### Quick Look
+
+If you want to quickly view the API document, you can visit the following link:
+https://meta.answer.dev/swagger/index.html
+
+### View your own API document
+
+If you already have an Apache Answer instance, you can view the API document
of your own instance by visiting the following link:
+`https://example.com/swagger/index.html`
+
+If you can't access the above link, please check the following configuration
items whether they are configured correctly.
+
+```yaml title="/data/conf/config.yaml"
+swaggerui:
+ show: true
+ protocol: http
+ host: 127.0.0.1
+ address: ':9080' # leave blank to use the 80 port number
+```
+
+## Generate API document
+
+Apache Answer using [swag](https://github.com/swaggo/swag) to generate API
document json/yaml file automatically according to the comments in the code.
You can use the following steps to generate API document.
+
+```bash
+# install swag cli
+$ go install github.com/swaggo/swag/cmd/swag@latest
+
+# enter the project root directory and execute the following command
+$ cd script
+$ ./gen-api.sh
+
+# the generated documentation is in the docs/api directory
+```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/backend.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/backend.md
deleted file mode 100644
index b86e4ab9..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/backend.md
+++ /dev/null
@@ -1,209 +0,0 @@
----
-slug: /contributing/backend
----
-
-# 后端开发指南
->
-> 下面将说明如何配置环境来进行项目的后端开发工作
-
-## 如何设置开发环境
-
-### 先决条件
-
-- [Golang](https://go.dev/) `>=1.18`
-- 数据库依赖
- - MySQL `(>=5.7)`
- - PostgreSQL `(>=10)`
- - SQLite3
-- [wire](https://github.com/google/wire)
-
-### 工具
-
-#### wire
-
-我们使用 `wire` 来生成依赖关系。
-
-```shell
-go get github.com/google/wire/cmd/wire@latest
-go generate ./...
-go mod tidy
-```
-
-或者你可以使用 `make generate`。
-
-#### swag
-
-我们使用 `swag` 来生成 Swagger 文档。
-
-```shell
-swag init --generalInfo ./cmd/answer/main.go
-```
-
-或者你可以进入 `script` 目录并使用 `./gen-api.sh`。
-
-### 构建
-
-:::note
-如果这是你第一次启动 Apache Answer,请先编译前端项目,以确保你可以更轻松地测试它。
-一旦你熟悉了 Apache Answer,也可以使用 Swagger 进行测试。
-:::
-
-```shell
-# 前端编译(推荐)。如果遇到问题,请参考与前端相关的文档
-$ make ui
-# 进入目录
-$ cd cmd/answer/
-# 编译
-$ go build .
-```
-
-### 运行
-
-#### 安装
->
-> 如果这是你第一次启动 Apache Answer,请按照以下步骤进行安装。如果不是,则可以跳过此步骤。
-
-```shell
-# 初始化环境
-$ ./answer init -C ./answer-data/
-```
-
-前往 <http://localhost:80/install> 访问安装页面。
-
-请参考 [安装文档](/docs/installation) 进行安装步骤。
-
-#### 启动
-
-```shell
-./answer run -C ./answer-data/
-```
-
-前往 <http://localhost:80/> 使用 Apache Answer。
-
-### Debug
-
-我们使用 Swagger 测试 API 接口。Swagger 文档默认可用。前往
[http://localhost:80/swagger/index.html](http://127.0.0.1:8080/swagger/index.html)
访问 Swagger 页面。
-
-你可以使用 Swagger 进行更方便的调试。
-
-## 项目说明
-
-### 包结构
-
-```
-.
-├── cmd (main binary)
-├── configs (default configuration)
-├── docs (swagger documentation)
-├── i18n (International translation)
-├── internal
- ├── base (Basic component without service attributes)
- ├── conf (Configuration)
- ├── constant (constant)
- ├── data (database/cache)
- ├── handler (request/response handler)
- ├── middleware (http middleware)
- ├── pager (Pagination)
- ├── reason (error reason key use to translator)
- ├── server (http server)
- ├── translator (translator for translate international)
- └── validator (validator for validate request)
- ├── cli (binary commands)
- ├── controller (request handler controller for user)
- ├── controller_backyard (request handler controller for admin)
- ├── entity (all entity about database table)
- ├── install (installation related)
- ├── migrations (upgrade related)
- ├── repo (database/cache operations)
- ├── router (http router)
- ├── schema (request/response schema)
- └── service (business logic)
-├── pkg (tools or third party)
-└── ui (frontend)
-```
-
-### 包之间的依赖关系
-
-对于大多数 API,流程图非常简单,如下所示。
-
-```
-router -> middleware -> controller(use schema) -> service -> repo(use entity)
-```
-
-如果你想开发新的 API,可以按照以下步骤进行操作。
-
-1. 在 router 中添加路由规则 (GET/POST/PUT...)。
-2. 添加用于处理程序请求的 controller。该请求应在 controller 中进行验证。
-3. 添加一个 service 来处理业务。
-4. 添加用于保存或查询数据库或缓存中的数据的 repo 操作。
-5. 重新生成 swagger 文档并测试 API。
-
-## 代码规范
-
-### 基本的
-
-我们使用 [uber 的 Golang](https://github.com/uber-go/guide) 来检查代码规范。
-
-### 代码规范检查
-
-`golangci-lint` 是一个快速的 Go 代码规范检查工具。我们使用
[golangci-lint](https://github.com/golangci/golangci-lint) 来检查代码规范。
-
-你可以使用以下命令检查你的代码格式。
-
-```bash
-go install github.com/golangci/golangci-lint/cmd/[email protected]
-golangci-lint run
-```
-
-## 我们需要你的贡献
-
-### 修复 Bug
-
-如果你发现了 Bug,请不要犹豫 [提交 issue](https://github.com/apache/incubator-answer/issues)
给我们。如果你可以修复它,请在提交 issue 时附上说明。如果问题已被确认是 Bug,你可以提交 PR,这将确保你不会做无用的工作。
-
-### 代码审查和注释
-
-在我们的开发过程中,有些代码可能不是很合乎逻辑。如果你发现了这些问题,请不要犹豫,向我们提交
PR。同样,有些函数可能没有注释。如果你可以帮助我们补充注释,我们将不胜感激。
-
-### 单元测试(非常需要)
-
-我们当前的单元测试覆盖率如下所示。显然,我们还需要添加更多的单元测试,因此我们非常欢迎你的贡献。
-
-<img
-src={require('/img/repo-unit-test-coverage-rate.png').default}
-alt="repo-unit-test-coverage-rate"
-width="300"
-/>
-
-### 翻译
-
-我们所有的翻译都放在 `i18n`目录中。
-
-1. 如果你发现你正在使用的语言中对应的键没有翻译,请提交你的翻译。
-2. 如果你想提交新的语言翻译,请将你的语言添加到 `i18n.yaml` 文件中。
-
-### 新功能或插件
-
-1. 我们根据 [路线图](https://github.com/apache/incubator-answer/projects)
开发计划开发功能。如果你有新功能的建议,请确认它们是否已经计划中。
-2. 插件将在未来发布,敬请期待。
-
-## 注意事项
-
-### 修改数据库表结构非常困难
-
-通常,我们不希望修改数据库表中已经存在的字段。如果需要更改,请遵循以下规则:
-
-1. 添加字段比修改字段更好。
-2. 修改任何字段都需要考虑对现有数据的影响。
-3. 修改数据库表结构需要测试对不同类型的数据库的影响,并为不同类型的数据库提供不同的 `SQL` 语句。对于
`MySQL/PostgreSQL/sqlite3`。
-
-## 构建工具
-
-Apache Answer 应用的后端使用以下组件/库构建:
-
-- [pacman](https://github.com/segmentfault/pacman) - 快速构建 Go 应用程序的工具包。
-- [gin](https://github.com/gin-gonic/gin/) - 路由器。
-- [validator](https://github.com/go-playground/validator/) - 验证。
-- [xorm](https://xorm.io/) - ORM.
-- [cobra](https://github.com/spf13/cobra) - CLI 应用程序。
-- [swag](https://github.com/swaggo/swag) - 生成 Swagger 文档。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/contributing.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/contributing.md
deleted file mode 100644
index f0f4e910..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/contributing.md
+++ /dev/null
@@ -1,51 +0,0 @@
----
-slug: /contributing
----
-
-# 贡献指南
->
-> 感谢你对 Apache Answer 的贡献兴趣!
-
-## 如何贡献
->
-> 你可以通过提交 PR 直接贡献到 GitHub 仓库中。
-
-## 创建问题
-
-- 如果你有任何问题,请随时提问。
-
-## 创建 Pull Request
-
-- 我们感谢你抽出时间做出贡献!在提交 Pull Request 之前,请创建一个解释错误或功能请求的问题,并告诉我们你计划为其创建 Pull
Request。如果问题已经存在,请在该问题上发表评论,让我们知道你想要为其提交 Pull Request。这有助于我们跟踪 Pull Request
并确保没有重复的工作。
-
-## 提交信息准则
-
-```
-<type>(<scope>): <subject>
-```
-
-### type
-
-- feat: 新特性
-- fix: 修复 bug
-- docs: 仅文档更改
-- style: 不影响代码含义的更改(空格,格式,缺少分号等)
-- refactor: 既不修复 bug 也不添加特性的代码更改
-- perf: 提高性能的代码更改
-- test: 添加缺失的测试
-- chore: 构建过程或辅助工具和库(例如文档生成)的更改
-
-### scope
-
-scope 可以是指明提交更改的位置的任何内容。
-
-### subject
-
-subject 包含对更改的简洁描述:
-
-- 使用命令式,现在时:"change" 而非 "changed" 或 "changes"
-- 不要大写第一个字母
-- 不要在末尾放置句号
-- 整个提交消息的长度不得超过 50 个字符
-- 描述提交的内容,而不是它所涉及或修复的问题
-- 简要但具有描述性 - 通过阅读主题,我们应该对提交的内容有很好的理解
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/frontend.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/frontend.md
deleted file mode 100644
index aacf204b..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/contributing/frontend.md
+++ /dev/null
@@ -1,120 +0,0 @@
----
-slug: /contributing/frontend
----
-
-# 前端开发指南
-
-## ⚙️ 先决条件
-
-- [Node.js](https://nodejs.org/) `>=16.17`
-- [pnpm](https://pnpm.io/) `>=7`
-
-在构建 Apache Answer 项目时需要 pnpm。使用以下命令安装 pnpm 工具:
-
-```bash
-corepack enable
-corepack prepare [email protected] --activate
-```
-
-使用 Node.js v16.17 或更新版本,可以通过指定标签来安装最新版本的 pnpm:
-
-```bash
-corepack prepare pnpm@latest --activate
-```
-
-## 🔨 开发
-
-在本地克隆仓库并在终端中运行以下命令:
-
-```shell
-git clone [email protected]:apache/incubator-answer.git answer
-cd answer/ui
-pnpm install
-pnpm start
-```
-
-现在,你的浏览器应该自动打开并加载 `http://localhost:3000`。你也可以手动访问它。
-
-## 👷 工作流
-
-克隆仓库并运行 pnpm install 初始化依赖项后,你可以使用以下项目命令:
-
-- `pnpm start` 在本地运行 Apache Answer 网站。
-- `pnpm build` 为生产环境构建 Apache Answer。
-- `pnpm lint` 检查和修复代码风格。
-
-## 🌍 I18n(多语言)
-
-如果你需要添加或编辑语言条目,只需转到 `/i18n/en_US.yaml` 文件,所有前端语言条目都放在 `ui` 字段下。
-
-如果想帮助我们进行 i18n 翻译,请访问 [Apache Answer at
Crowdin](https://crowdin.com/translate/answer) 。
-
-## 💡 项目说明
-
-```
-.
-├── cmd
-├── configs
-├── docs
-├── i18n
- ├── en_US.yaml (basic language file)
- ├── i18n.yaml (language list)
-├── internal
-├── ...
-└── ui (front-end project starts here)
- ├── build (built results directory, usually without concern)
- ├── public (html template for public)
- ├── scripts (some scripting tools on front-end project)
- ├── src (almost all front-end resources are here)
- ├── assets (static resources)
- ├── common (project information/data defined here)
- ├── components (all components of the project)
- ├── hooks (all hooks of the project)
- ├── i18n (Initialize the front-end i18n)
- ├── pages (all pages of the project)
- ├── router (Project routing definition)
- ├── services (all data api of the project)
- ├── stores (all data stores of the project)
- ├── utils (all utils of the project)
- ├── plugins (UI Plugin Development & Debugging Directory)
-```
-
-## 🤝 贡献
-
-#### 修复 Bug
-
-如果你发现了一个 bug,请不要犹豫地 [提交
issue](https://github.com/apache/incubator-answer/issues)。如果你能修复它,请在提交 issue
时附上说明。如果它确实是一个 bug,你可以在我们确认后提交 PR,这将确保你不会做任何无用的工作。
-
-#### 代码审查 & 注释
-
-在我们的开发中,有些代码不太合逻辑。如果你发现了它,请不要犹豫地向我们提交 PR。同样,一些函数没有注释。如果你能帮助我们补充它,我们将不胜感激。
-
-#### 翻译
-
-我们所有的翻译都放在 `i18n` 目录下。
-
-1. 如果你发现你正在使用的语言中对应的键没有翻译,你可以提交你的翻译。
-2. 如果你想提交新的语言翻译,请将你的语言添加到 `i18n.yaml` 文件中。
-
-#### 功能或插件
-
-1. 我们根据 [roadmap](https://github.com/apache/incubator-answer/projects)
制定计划开发功能。如果你有新功能的建议,请确认它们是否已经计划。
-2. 插件将来会推出,敬请期待。
-
-## 📱环境支持
-
-| [<img
src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png"
alt="Edge" width="24px" height="24px"
/>](http://godban.github.io/browsers-support-badges/)<br />Edge | [<img
src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png"
alt="Firefox" width="24px" height="24px"
/>](http://godban.github.io/browsers-support-badges/)<br />Firefox | [<img
src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/ [...]
-|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
[...]
-| 最近 2 个版本
| 最近 2 个版本
| 最近 2 个版本
[...]
-
-## ⭐ 使用了以下工具
-
-- [TypeScript](https://www.typescriptlang.org/) - 强类型 JavaScript。
-- [React.js](https://reactjs.org/) - 我们的前端是一个 React.js 应用程序。
-- [React Router](https://reactrouter.com/en/main) - 路由库。
-- [Bootstrap](https://getbootstrap.com/) - UI 库。
-- [React Bootstrap](https://react-bootstrap.github.io/) - UI 库(为 React 重新构建)。
-- [axios](https://github.com/axios/axios) - 请求库。
-- [SWR](https://swr.bootcss.com/) - 请求库。
-- [react-i18next](https://react.i18next.com/) - 国际化库。
-- [zustand](https://github.com/pmndrs/zustand) - 状态管理库。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/database.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/database.md
similarity index 94%
rename from
i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/database.md
rename to
i18n/zh-CN/docusaurus-plugin-content-docs/current/development/database.md
index c6f4babb..ddccbb9d 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/database.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/database.md
@@ -2,17 +2,17 @@
slug: /database
---
-# 数据库介绍
+# Database
:::note
-不同的数据库具有不同的数据类型。下表以 mysql/mariadb 为例。
+Different databases have different data types. The following table presumes
use of mysql/mariadb as an example.
:::
## activity
->
-> `activity` 表记录用户的各种行为,如投票等。
+
+> `activity` table records various actions of users, such as votes, etc.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|--------------------|------------|----------|-----|---------|-----------------------------------------------------------------------------|
@@ -31,8 +31,8 @@ slug: /database
| revision_id | bigint(20) | NO | | 0 | revision id
|
## answer
->
-> `answer` 表记录回答信息。
+
+> `answer` table records the answer info.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT |
COMMENT |
|-------------------|------------|----------|-----|-------------------|-----------------------------------------|
@@ -51,8 +51,8 @@ slug: /database
| revision_id | bigint(20) | NO | | 0 |
revision id |
## collection
->
-> `collection` 表记录用户对任何对象的收藏信息。
+
+> `collection` table records user collection about any object.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT
| COMMENT |
|----------------------------|--------------|------------|-------|---------------------|----------------------------|
@@ -75,8 +75,8 @@ slug: /database
| default_group | int(11) | NO | | 1 | mark this
group is default, default 1 |
## comment
->
-> `comment` 表记录有关问题或回答的评论。
+
+> `comment` table records the comment about question or answer.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|------------------|------------|----------|-----|---------|------------------------------------------|
@@ -94,8 +94,8 @@ slug: /database
| parsed_text | mediumtext | NO | | | parsed comment
content |
## config
->
-> `config` 表记录站点配置。
+
+> `config` records the site configuration.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|--------|--------------|----------|-----|---------|----------------------------------------------------|
@@ -104,8 +104,8 @@ slug: /database
| value | text | YES | | | the config value, custom
data structures and types |
## meta
->
-> `meta` 表记录对象的一些额外信息。
+
+> `meta` records some extra information about the object.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|------------|--------------|----------|-----|-------------------|--------------|
@@ -117,8 +117,8 @@ slug: /database
| value | mediumtext | NO | | | value
|
## notification
->
-> `notification` 表记录用户收到的通知。
+
+> `notification` table records the notification that user received.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|------------|------------|----------|-----|---------|-------------------------------------------|
@@ -133,8 +133,8 @@ slug: /database
| status | int(11) | NO | | 1 | notification
status(normal: 1;delete 2) |
## power
->
-> `power` 表记录所有权限。
+
+> `power` table records all permissions
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|---------------|----------------|------------|-------|-----------|-------------|
@@ -146,8 +146,8 @@ slug: /database
| description | varchar(200) | NO | | |
description |
## question
->
-> `question` 表记录问题信息。
+
+> `question` table records the question info.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT |
COMMENT |
|--------------------|--------------|----------|-----|-------------------|-------------------------------------------|
@@ -172,8 +172,8 @@ slug: /database
| revision_id | bigint(20) | NO | | 0 |
revision id |
## report
->
-> `report` 表记录用户举报的内容。
+
+> `report` table records the content of user reports
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|------------------|------------|----------|-----|---------|------------------------------------------|
@@ -191,8 +191,8 @@ slug: /database
| status | int(11) | NO | | 1 | status(normal: 1;
pending:2; delete: 10) |
## revision
->
-> `revision` 表记录历史修订和版本内容。
+
+> `revision` table records the object revision and the content of the version.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|----------------|--------------|----------|-----|---------|---------------------------------------------|
@@ -209,8 +209,8 @@ slug: /database
| review_user_id | bigint(20) | NO | | 0 | review user id
|
## role
->
-> `role` 表记录所有角色。
+
+> `role` table records all roles
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|---------------|----------------|------------|-------|-----------|-------------|
@@ -221,8 +221,8 @@ slug: /database
| description | varchar(200) | NO | | |
description |
## role_power_rel
->
-> `role_power_rel` 表记录角色和权限之间的关系。
+
+> `role_power_rel` records the relationship between roles and powers
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|--------------|----------------|------------|-------|-----------|-------------|
@@ -233,8 +233,8 @@ slug: /database
| power_type | varchar(200) | NO | | | power
|
## site_info
->
-> `site_info` 表记录与界面或其他相关内容有关的站点信息。
+
+> `site_info` table records the site information about interface or something
related
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|------------|-------------|----------|-----|---------|--------------------------------------------|
@@ -246,8 +246,8 @@ slug: /database
| status | int(11) | NO | | 1 | site info
status(available: 1;deleted: 10) |
## tag
->
-> `tag` 表记录标签信息。
+
+> `tag` table records the tag information.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|--------------------|-------------|----------|-----|---------|--------------------------------------|
@@ -266,8 +266,8 @@ slug: /database
| revision_id | bigint(20) | NO | | 0 | revision id
|
## tag_rel
->
-> `tag_rel` 表记录对象和标签之间的关系。
+
+> `tag_rel` table records the relationship between objects and tags
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT |
COMMENT |
|----------------|----------------|--------------|---------|-------------|---------------------------------------------|
@@ -279,8 +279,8 @@ slug: /database
| status | int(11) | NO | | 1 |
tag_list_status(available: 1;deleted: 10) |
## uniqid
->
-> `uniqid` 表记录可以唯一标识对象的对象 ID。
+
+> `uniqid` table recorded the object_id that can uniquely identify an object.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT |
|-------------|------------|----------|-----|---------|-------------|
@@ -288,8 +288,8 @@ slug: /database
| uniqid_type | int(11) | NO | | 0 | uniqid_type |
## user
->
-> `user` 表记录用户的基本信息。
+
+> The user table recorded basic information about the user.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT
|
|-----------------|--------------|----------|-----|---------|----------------------------------------|
@@ -321,8 +321,8 @@ slug: /database
| is_admin | int(11) | NO | | 0 | admin
flag(deprecated) |
## user_role_rel
->
-> `user_role_rel` 表记录用户和角色之间的关系。
+
+> The `user_role_rel` table records the relationship between users and roles.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT |
|--------------|--------------|------------|-------|-----------|-------------|
@@ -333,8 +333,8 @@ slug: /database
| role_id | int(11) | NO | | 0 | role id |
## version
->
-> 当前 Apache Answer 的版本记录在版本表中以进行升级。
+
+> The version of the current answer is recorded in version table for upgrade.
| COLUMN | DATA TYPE | NULLABLE | KEY | DEFAULT | COMMENT |
|----------------|-----------|----------|-----|---------|----------------|
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-config.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-config.md
deleted file mode 100644
index 2383b025..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-config.md
+++ /dev/null
@@ -1,137 +0,0 @@
----
-sidebar_label: 插件配置架构
-slug: /plugins/plugin-config
----
-
-# 插件配置架构
-
-## 功能
->
-> 对于插件,我们通常需要一些配置项来记录插件所需的信息。
->
-> 例如,OAuth 插件需要配置密钥。
->
-> 这些配置需要由开发人员描述并由用户使用。
->
-> 因此,以下内容介绍如何描述插件所需的配置。
-
-### 后端和插件开发人员
-
-:::note
-
-对于后端或插件开发人员,我们使用以下结构来描述插件配置。
-
-作为插件开发人员,你只需要构建一个 `[]ConfigField` 结构并填写配置内容,以描述插件所需的配置。
-
-:::
-
-```go
-type ConfigField struct {
- Name string `json:"name"`
- Type ConfigType `json:"type"`
- Title Translator `json:"title"`
- Description Translator `json:"description"`
- Required bool `json:"required"`
- Value string `json:"value"`
- UIOptions ConfigFieldUIOptions `json:"ui_options"`
- Options []ConfigFieldOption `json:"options,omitempty"`
-}
-
-type ConfigFieldUIOptions struct {
- Placeholder Translator `json:"placeholder,omitempty"`
- Rows string `json:"rows,omitempty"`
- InputType InputType `json:"input_type,omitempty"`
-}
-
-type ConfigFieldOption struct {
- Label Translator `json:"label"`
- Value string `json:"value"`
-}
-```
-
-### 前端
-
-:::note
-
-在前端,我们使用 JSON 描述和呈现插件的配置项。
-
-:::
-
-```json
-{
- "name": "应该在插件中唯一的此配置的键",
- "type": "此配置的类型",
- "title": "将显示的此配置的标签",
- "description": "将显示的配置说明",
- "options,omitempty": [{"label": "Apple", "value": "apple"}],
- "required": true,
- "ui_options": {
- "input_type": "输入类型",
- "placeholder": "占位符",
- "rows": "用于 textarea 的行数"
- },
- "value": "将保存的此配置的值"
-}
-```
-
-### GitHub 连接器插件配置示例
-
-```json
-[
- {
- "name": "client_id",
- "type": "input",
- "title": "ClientID",
- "description": "GitHub 应用程序的客户端 ID。",
- "required": true,
- "ui_options": {
- "input_type": "text"
- }
- },
- {
- "name": "client_secret",
- "type": "input",
- "title": "ClientSecret",
- "description": "GitHub 应用程序的客户端密钥。",
- "required": true,
- "ui_options": {
- "input_type": "text"
- }
- }
-]
-```
-
-以下是在管理页面上所展现的情况。
-
-
-### 支持的配置类型
->
-> 不同的类型将呈现为不同的 UI。
-
-- input
-- textarea
-- checkbox
-- radio
-- select
-- upload
-- timezone
-- switch
-
-### 支持的配置输入类型
->
-> 支持不同格式的输入类型
-
-- text
-- color
-- date
-- datetime-local
-- email
-- month
-- number
-- password
-- range
-- search
-- tel
-- time
-- url
-- week
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-for-ui.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-for-ui.md
deleted file mode 100644
index f9bb0116..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-for-ui.md
+++ /dev/null
@@ -1,175 +0,0 @@
----
-sidebar_label: 开发 UI 插件
-slug: /plugins/plugin-for-ui
----
-
-# 开发 UI 插件
-
-UI 插件与 [标准插件](/docs/plugins) 或 React 组件并没有太大的区别,只需要一些配置和包装即可。
-
-在学习了上述文档中的标准插件开发,并且理解了 React 组件之后,让我们来看一下开发 UI 插件的逐步指南。
-
----
-
-## 开发阶段
-
-* 进入 `ui/src/plugins` 目录并创建一个 React 组件,例如 `Demo`。
-
-* 为 `Demo` 组件创建入口文件 `index.tsx`。
-
-* 在入口文件旁创建插件信息文件 `info.yaml`。常用字段如下
-
-```yaml
-# info.yaml
-slug_name: ui_plugin_demo
-version: 0.0.1
-author: Apache Answer
-```
-
-* 在 `index.tsx` 文件中编写所需的任何 React 组件,并导出如下
-
-```ts
-// plugins/index.ts
-export default {
- info: pluginInfo,
- component: memo(Index),
-};
-```
-
-:::caution
-
-* 必须以这种方式导出。`pluginInfo` 的类型定义可以在下面的 [类型定义](#type-definitions) 部分中找到。
-
-* 文件名必须为 `index.tsx` 和 `info.yaml`,否则会影响组件的使用。
-:::
-
-* 在插件列表文件 `plugins/index.ts` 中导出你刚刚定义的插件
-
-```ts
-export { default as Demo } from './Demo';
-```
-
-* 现在,你可以在需要它的地方使用 `PluginRender` 组件来渲染刚刚定义的插件!
-
-```tsx
-<PluginRender slug_name="ui_plugin_demo" />
-```
-
-通过以上步骤,如果你的插件功能已经完成,那么你准备进入发布阶段了。
-
-## 发布阶段
-
-* F 首先,为组件定义发布注册文件。以 `Demo` 为例,我们编写一个 `demo.go`
-
-```go
-// demo.go
-package demo
-
-import "github.com/apache/incubator-answer/plugin"
-
-type DemoPlugin struct {
-}
-
-func init() {
- plugin.Register(&DemoPlugin{})
-}
-
-func (d DemoPlugin) Info() plugin.Info {
- return plugin.Info{
- Name: plugin.MakeTranslator("i18n.demo.name"),
- SlugName: "demo_plugin",
- Description: plugin.MakeTranslator("i18n.demo.description"),
- Author: "answerdev",
- Version: "0.0.1",
- }
-}
-```
-
-:::info
-有关详细定义,请参见 [插件](/docs/plugins) 部分。
-:::
-
-* 然后,将整个 `Demo`
目录移动到[官方插件存储库](https://github.com/apache/incubator-answer-plugins)
中,提交合并请求即可发布插件。
-
----
-
-## 插件的国际化
-
-* 在 `Demo` 目录下创建一个 `i18n` 目录,并添加一个语言文件,格式为 `yaml`,例如 `en_US.yaml`。
- * `plugin` 和 `ui` 字段是固定的,并且必须使用这两个名称。
- * `ui_plugin_demo` 部分是插件的 `slug_name`,它是在 `info.yaml` 中定义的 `slug_name` 字段的值。
-
-```yaml
-# en_US.yaml
-plugin:
- ui_plugin_demo:
- ui:
- msg: UI Plugin Demo
-```
-
-* 在 `i18n` 目录中创建 `index.ts` 文件,并使用 `pluginKit` 工具初始化语言资源。
-
-```ts
-import pluginKit from '@/utils/pluginKit';
-
-import en_US from './en_US.yaml';
-import zh_CN from './zh_CN.yaml';
-
-pluginKit.initI18nResource({
- en_US,
- zh_CN,
-});
-```
-
-* 在插件的 `index.tsx` 文件中导入语言资源文件,并使用 `pluginKit` 初始化 `t`函数。然后你可以像正常的 `t` 函数一样使用
`t` 函数。
-
-```tsx
-import pluginKit, { PluginInfo } from '@/utils/pluginKit';
-import './i18n';
-
-const Index: FC = () => {
- const { t } = useTranslation(pluginKit.getTransNs(), {
- keyPrefix: pluginKit.getTransKeyPrefix(pluginInfo),
- });
-
- return <div>{t('msg')}</div>;
-};
-```
-
-详细信息请参考 [示例](#example) 部分
-
-## 类型定义
-
-```ts
-export type PluginType = 'Connector';
-
-export interface PluginInfo {
- slug_name: string;
- type?: PluginType;
- name?: string;
- description?: string;
-}
-
-export interface Plugin {
- info: PluginInfo;
- component: NamedExoticComponent | FC;
-}
-
-interface I18nResource {
- [lng: string]: {
- plugin: {
- [slug_name: string]: {
- ui: any;
- };
- };
- };
-}
-```
-
-## 示例
-
-完成 `Demo` 插件开发后的最终目录结构如下图所示。
-
-
-
-你还可以查看 Demo [Demo
示例代码](https://github.com/apache/incubator-answer/tree/main/ui/src/plugins/Demo)
以获取更多信息。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-translation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-translation.md
deleted file mode 100644
index 4703f4d4..00000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugin-translation.md
+++ /dev/null
@@ -1,128 +0,0 @@
----
-sidebar_label: 插件翻译
-slug: /plugins/plugin-translation
----
-
-# 插件翻译
-
-## 如何使你的插件支持多语言?
->
-> 由于 Answer 支持多语言,因此插件也需要支持多语言。以下是如何使你的插件支持多语言的示例。
-
-## 翻译结构
->
-> 在某些插件接口中,你可以看到 Translator 结构,用于支持多种语言。
-
-例如,`ConfigField` 结构具有类型为 `Translator` 的 `Title` 字段。
-
-```go
-type ConfigField struct {
- Name string `json:"name"`
- Type ConfigType `json:"type"`
- Title Translator `json:"title"`
- Description Translator `json:"description"`
- Required bool `json:"required"`
- Value string `json:"value"`
- UIOptions ConfigFieldUIOptions `json:"ui_options"`
- Options []ConfigFieldOption `json:"options,omitempty"`
-}
-```
-
-构建 `Translator` 结构很容易,就像这样:
-
-```go
-import (
- "github.com/apache/incubator-answer/plugin"
-)
-
-plugin.MakeTranslator("plugin.github_connector.backend.name")
-```
-
-其中 `plugin.github_connector.backend.name` 是翻译文件的 key,稍后将介绍。
-
-因此,第一步是为需要翻译的每个字段构建 `Translator` 结构。
-
-## 翻译文件
-
-在插件的根目录中创建 `i18n` 目录,然后在其中创建名为 `en_US.yaml` 的文件。
-
-`en_US.yaml` 文件用于存储插件的英文翻译其内容如下:
-
-```yaml
-plugin:
- github_connector:
- backend:
- name:
- other: GitHub
- info:
- name:
- other: GitHub Connector
- description:
- other: Connect to GitHub for third-party login
- config:
- client_id:
- title:
- other: ClientID
- description:
- other: Client ID of your GitHub application
- client_secret:
- title:
- other: ClientSecret
- description:
- other: Client secret of your GitHub application
- ui:
- login:
- title: Login with GitHub
- description: Login with GitHub
-```
-
-- `plugin` 是翻译文件的根节点。
-- `github_connector` 是插件的名称。
-- `backend` 是后端的翻译。键结尾的 `other` 仅用于
[go-i18n](https://github.com/nicksnyder/go-i18n) 识别翻译文件。
-- `ui` 是前端的翻译。
-
-你可以使用类似于 `plugin.github_connector.backend.name` 或
`plugin.github_connector.ui.login.title` 的键进行翻译。
-
-在插件的根目录中创建一个 `i18n.go` 文件,然后添加以下代码:
-
-```go
-package i18n
-
-const (
- ConnectorName = "plugin.github_connector.backend.name"
- InfoName = "plugin.github_connector.backend.info.name"
- InfoDescription =
"plugin.github_connector.backend.info.description"
- ConfigClientIDTitle =
"plugin.github_connector.backend.config.client_id.title"
- ConfigClientIDDescription =
"plugin.github_connector.backend.config.client_id.description"
- ConfigClientSecretTitle =
"plugin.github_connector.backend.config.client_secret.title"
- ConfigClientSecretDescription =
"plugin.github_connector.backend.config.client_secret.description"
-)
-```
-
-`i18n.go` 文件用于存储翻译文件的键。
-
-最后,插件的目录结构如下:
-
-```bash
-.
-├── README.md
-├── github.go
-├── go.mod
-├── go.sum
-└── i18n
- ├── en_US.yaml
- ├── translation.go
- └── zh_CN.yaml
-```
-
-## 后端翻译
-
-你只需要使用翻译文件的键返回 `Translator` 结构即可。
-
-```go
-func (g *GitHubConnector) ConnectorName() plugin.Translator {
- return plugin.MakeTranslator(i18n.ConnectorName)
-}
-```
-
-`Answer` 将自动将翻译文件的键翻译为相应的语言。
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/guide.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/guide.md
new file mode 100644
index 00000000..78f61b16
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/guide.md
@@ -0,0 +1,117 @@
+---
+slug: /development
+---
+# Development Guide
+
+This guide will help you get started with the development of the project.
+
+## Frontend
+
+### Installation
+
+
+1. Ensure you have [node](https://nodejs.org/en) and
[pnpm](https://pnpm.io/installation) installed.
+2. After cloning the repository, run the following command. This will install
all dependencies as well as build all local packages.
+
+ ```shell
+ cd ./ui
+ pnpm install
+ ```
+
+3. To start a development server, run `pnpm start`. now, your browser should
already open automatically, and autoload `http://localhost:3000`. you can also
manually visit it.
+4. To switch API, you can modify the `ui/.env.development` file and then
re-run pnpm start. If you're just using it yourself, we recommend creating a
`.env.development.local` file that defines the address of the api you're going
to use.
+
+### Code conventions
+
+- **Most important: Look around.** Match the style you see used in the rest of
the project. This includes formatting, naming files, naming things in code,
naming things in documentation, etc.
+- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most
stylistic problems. If you are working locally, you can run `pnpm lint` and
`pnpm prettier` to fix most code formatting.
+- **No runtime errors** Before submitting the code, please ensure that there
will be no errors when running locally. This will greatly reduce the workload
of review.
+
+<details>
+ <summary>frontend package structure</summary>
+ <div>
+ ```
+.
+├── cmd
+├── configs
+├── ...
+└── ui (front-end project starts here)
+ ├── build (built results directory, usually without concern)
+ ├── public (html template for public)
+ ├── scripts (some scripting tools on front-end project)
+ ├── src (almost all front-end resources are here)
+ ├── assets (static resources)
+ ├── common (project information/data defined here)
+ ├── components (all components of the project)
+ ├── hooks (all hooks of the project)
+ ├── i18n (Initialize the front-end i18n)
+ ├── pages (all pages of the project)
+ ├── router (Project routing definition)
+ ├── services (all data api of the project)
+ ├── stores (all data stores of the project)
+ ├── utils (all utils of the project)
+ ├── plugins (UI Plugin Development & Debugging Directory)
+```
+ </div>
+</details>
+
+## Backend
+
+### Installation
+
+1. Ensure you have [golang](https://go.dev/doc/install) installed.
+2. After cloning the repository, run the following command for build.
+
+ ```shell
+ go mod download
+ go run cmd/answer/main.go init -C ./answer-data
+ ```
+
+3. Visit `http://localhost` to see the installation page and complete the
installation.
+
+4. Run the following command to start the server.
+
+ ```shell
+ go run cmd/answer/main.go run -C ./answer-data
+ ```
+
+### Code conventions
+
+We recommend that you follow [uber's Golang
Guidelines](https://github.com/uber-go/guide) code style.
+
+<details>
+ <summary>backend package structure</summary>
+ <div>
+ ```
+.
+├── cmd (main binary)
+├── configs (default configuration)
+├── docs (swagger documentation)
+├── i18n (International translation)
+├── internal
+ ├── base (Basic component without service attributes)
+ ├── conf (Configuration)
+ ├── constant (constant)
+ ├── data (database/cache)
+ ├── handler (request/response handler)
+ ├── middleware (http middleware)
+ ├── pager (Pagination)
+ ├── reason (error reason key use to translator)
+ ├── server (http server)
+ ├── translator (translator for translate international)
+ └── validator (validator for validate request)
+ ├── cli (binary commands)
+ ├── controller (request handler controller for user)
+ ├── controller_backyard (request handler controller for admin)
+ ├── entity (all entity about database table)
+ ├── install (installation related)
+ ├── migrations (upgrade related)
+ ├── repo (database/cache operations)
+ ├── router (http router)
+ ├── schema (request/response schema)
+ └── service (business logic)
+├── pkg (tools or third party)
+└── ui (frontend)
+```
+ </div>
+</details>
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugin-config.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugin-config.md
new file mode 100644
index 00000000..79f01595
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugin-config.md
@@ -0,0 +1,134 @@
+---
+sidebar_label: Plugin Configuration Schema
+slug: /development/plugins/plugin-config
+---
+
+# Plugin Configuration Schema
+
+## Feature
+
+For plugins, we often need some configuration items to record the information
necessary for the plugin.
+
+For example, OAuth plugins require secret key configuration. These
configurations need to be described by the developer and used by the user. So,
the following is about how to describe the configuration required for a plugin.
+
+### Backend & plugin developer
+
+:::note
+
+For backend or plugin developers, we use the following structure to describe
the plugin configuration.
+
+As a plugin developer, you only need to build a structure `[]ConfigField` and
fill in the configuration contents to describe the required configuration of a
plugin.
+
+:::
+
+```go
+type ConfigField struct {
+ Name string `json:"name"`
+ Type ConfigType `json:"type"`
+ Title Translator `json:"title"`
+ Description Translator `json:"description"`
+ Required bool `json:"required"`
+ Value string `json:"value"`
+ UIOptions ConfigFieldUIOptions `json:"ui_options"`
+ Options []ConfigFieldOption `json:"options,omitempty"`
+}
+
+type ConfigFieldUIOptions struct {
+ Placeholder Translator `json:"placeholder,omitempty"`
+ Rows string `json:"rows,omitempty"`
+ InputType InputType `json:"input_type,omitempty"`
+}
+
+type ConfigFieldOption struct {
+ Label Translator `json:"label"`
+ Value string `json:"value"`
+}
+```
+
+### Frontend
+
+:::note
+
+On the frontend we use JSON to describe and render the plugin's configuration
items.
+
+:::
+
+```json
+{
+ "name": "the key of this configuration that should be unique in the plugin",
+ "type": "the type of this configuration",
+ "title": "the label of this configuration that will be displayed",
+ "description": "configuration description that will be displayed",
+ "options,omitempty": [{"label": "Apple", "value": "apple"}],
+ "required": true,
+ "ui_options": {
+ "input_type": "the type of input",
+ "placeholder": "placeholder",
+ "rows": "the number of rows that will be used for textarea"
+ },
+ "value": "the value of this configuration that will be saved"
+}
+```
+
+### GitHub Connector Plugin Configuration Example
+
+```json
+[
+ {
+ "name": "client_id",
+ "type": "input",
+ "title": "ClientID",
+ "description": "Client ID of your GitHub application.",
+ "required": true,
+ "ui_options": {
+ "input_type": "text"
+ }
+ },
+ {
+ "name": "client_secret",
+ "type": "input",
+ "title": "ClientSecret",
+ "description": "Client secret of your GitHub application.",
+ "required": true,
+ "ui_options": {
+ "input_type": "text"
+ }
+ }
+]
+```
+
+The following is what looks like on the Admin Page.
+
+
+
+### Supported config types
+
+Different types will be rendered as different UI.
+
+- input
+- textarea
+- checkbox
+- radio
+- select
+- upload
+- timezone
+- switch
+
+### Supported config input types
+
+Different formats are supported for the input type.
+
+- text
+- color
+- date
+- datetime-local
+- email
+- month
+- number
+- password
+- range
+- search
+- tel
+- time
+- url
+- week
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugin-translation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugin-translation.md
new file mode 100644
index 00000000..593af2c7
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugin-translation.md
@@ -0,0 +1,128 @@
+---
+slug: /development/plugins/plugin-translation
+---
+
+# Plugin Translation
+
+Since answer supports multiple languages, the plugin also needs to support
multiple languages.
+The following is an example of how to make your plugin support multiple
languages.
+
+## Translator structure
+
+In some plugins interface, you can see the `Translator` structure, which is
used to support multiple languages.
+
+For example, the `ConfigField` structure has a `Title` field of type
`Translator`.
+
+```go
+type ConfigField struct {
+ Name string `json:"name"`
+ Type ConfigType `json:"type"`
+ Title Translator `json:"title"`
+ Description Translator `json:"description"`
+ Required bool `json:"required"`
+ Value string `json:"value"`
+ UIOptions ConfigFieldUIOptions `json:"ui_options"`
+ Options []ConfigFieldOption `json:"options,omitempty"`
+}
+```
+
+It's easy to build a `Translator` structure, just like this:
+
+```go
+import (
+ "github.com/apache/incubator-answer/plugin"
+)
+
+plugin.MakeTranslator("plugin.github_connector.backend.name")
+```
+
+The `plugin.github_connector.backend.name` is the key of the translation file,
which will be introduced later.
+
+So, the first step is build a `Translator` structure for each field that needs
to be translated.
+
+## Translation file
+
+Make directory `i18n` in the root directory of your plugin, and then create a
file named `en_US.yaml` in it.
+
+The `en_US.yaml` file is used to store the English translation of the plugin.
+
+The content of the `en_US.yaml` file is as follows:
+
+```yaml
+plugin:
+ github_connector:
+ backend:
+ name:
+ other: GitHub
+ info:
+ name:
+ other: GitHub Connector
+ description:
+ other: Connect to GitHub for third-party login
+ config:
+ client_id:
+ title:
+ other: ClientID
+ description:
+ other: Client ID of your GitHub application
+ client_secret:
+ title:
+ other: ClientSecret
+ description:
+ other: Client secret of your GitHub application
+ ui:
+ login:
+ title: Login with GitHub
+ description: Login with GitHub
+```
+
+- The `plugin` is the root key of the translation file.
+- The `github_connector` is the name of the plugin.
+- The `backend` is translation for the backend. The end of key like `other` is
just for [go-i18n](https://github.com/nicksnyder/go-i18n) to recognize the
translation file.
+- The `ui` is translation for the frontend.
+
+You can use the key like `plugin.github_connector.backend.name` or
`plugin.github_connector.ui.login.title` for translation.
+
+Create a `i18n.go` file in the root directory of your plugin, and then add the
following code:
+
+```go
+package i18n
+
+const (
+ ConnectorName = "plugin.github_connector.backend.name"
+ InfoName = "plugin.github_connector.backend.info.name"
+ InfoDescription =
"plugin.github_connector.backend.info.description"
+ ConfigClientIDTitle =
"plugin.github_connector.backend.config.client_id.title"
+ ConfigClientIDDescription =
"plugin.github_connector.backend.config.client_id.description"
+ ConfigClientSecretTitle =
"plugin.github_connector.backend.config.client_secret.title"
+ ConfigClientSecretDescription =
"plugin.github_connector.backend.config.client_secret.description"
+)
+```
+
+The `i18n.go` file is used to store the key of the translation file.
+
+Finally, the directory structure of the plugin is as follows:
+
+```bash
+.
+├── README.md
+├── github.go
+├── go.mod
+├── go.sum
+└── i18n
+ ├── en_US.yaml
+ ├── translation.go
+ └── zh_CN.yaml
+```
+
+## Backend translation
+
+You just need to return `Translator` structure with the key of the translation
file.
+
+```go
+func (g *GitHubConnector) ConnectorName() plugin.Translator {
+ return plugin.MakeTranslator(i18n.ConnectorName)
+}
+```
+
+The `Answer` will automatically translate the key of the translation file into
the corresponding language.
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugins.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugins.md
similarity index 100%
rename from
i18n/zh-CN/docusaurus-plugin-content-docs/current/development/extending/plugins.md
rename to
i18n/zh-CN/docusaurus-plugin-content-docs/current/development/plugins/plugins.md
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/command-line.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/command-line.md
index e906c0c3..ebdb585a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/command-line.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/command-line.md
@@ -2,108 +2,116 @@
slug: /command-line
---
-# 命令行
+# Command Line
:::tip
-Apache Answer 二进制文件支持一些命令行选项
+Apache Answer binary support some command-line options
:::
-## 用法
+## Usage
`answer command [command or global options] [arguments...]`
```shell
-运行 answer 的方法如下:
- - 使用 'answer init' 初始化所需的环境。
- - 使用 'answer run' 启动应用程序。
- - 使用 'answer upgrade' 升级应用程序。
+To run answer, use:
+ - 'answer init' to initialize the required environment.
+ - 'answer run' to launch the application.
+ - 'answer upgrade' to upgrade the application
-用法:
+Usage:
answer [command]
-可用命令:
- build 使用插件构建 answer
- check 检查所需环境
- dump 备份数据
- help 获取任一命令的帮助信息
- init 初始化 answer 应用程序
- plugin 打印打包在二进制文件中的所有插件
- run 运行应用程序
- upgrade 升级 Apache Answer 版本
-
-选项:
- -C, --data-path string 数据路径,例如:-C ./data/(默认值为 "/data/")
- -h, --help answer 的帮助信息
- -v, --version answer 的版本信息
-
-使用 "answer [command] --help" 获取有关命令的更多信息。
+Available Commands:
+ build used to build answer with plugins
+ check checking the required environment
+ dump back up data
+ help Help about any command
+ init init answer application
+ plugin prints all plugins packed in the binary
+ run Run the application
+ upgrade upgrade Apache Answer version
+
+Flags:
+ -C, --data-path string data path, eg: -C ./data/ (default "/data/")
+ -h, --help help for answer
+ -v, --version version for answer
+
+Use "answer [command] --help" for more information about a command.
```
-## 全局选项
-所有全局选项都可以放置在命令级别。
-- `--help`,`-h`:显示帮助文本并退出。可选。
-- `--version`,`-v`:显示版本信息并退出。可选。
-- `--data-path` 路径,`-C` 路径:数据保存路径。可选(默认值为 /data/)。
+## Global options
+
+All global options can be placed at the command level.
+
+- `--help`, `-h`: Show help text and exit. Optional.
+- `--version`, `-v`: Show version and exit. Optional.
+- `--data-path` path, `-C` path: data saved path. Optional. (default: /data/)
+
+## Commands
-## 命令
### init
-> init 命令将初始化应用程序所需的环境,包括:默认配置文件、数据目录、初始化数据库等。
-- 示例
+> init command will initialize the application required environment, contains:
default config-file, data directory, initialize database etc.
+
+- Examples
- `answer init -C ./data/`
-- 注意
- - 如果 answer 已经初始化,此命令将不会执行。例如,如果配置文件已经存在,则不会创建或覆盖它。
- - 如果 answer 初始化失败,则无法执行 run 命令。
+- Notes
+ - if answer already initialized, this command will not be executed. For
example, if config file is already exist so it will not be created or
overwritten.
+ - if answer initialized failed, run command can not be executed.
### check
-> check 命令将检查应用程序是否可以运行。检查配置文件是否存在,检查数据库是否可以建立连接等。
-- 示例
+> check command will check the application whether it can run or not. check
the config file if exist. check the database if connection can be established
etc.
+
+- Examples
- `answer check -C ./data/`
### run
-> run 命令将运行应用程序。
-- 示例
+> run command will run the application.
+
+- Examples
- `answer run -C ./data/`
### upgrade
-> upgrade 命令将升级应用程序。
-- 选项
- - `-f` 版本:从指定版本升级。可选。
-- 示例
+> upgrade command will upgrade the application.
+
+- Options
+ - `-f` version: Upgrade from the specified version. Optional.
+- Examples
- `answer upgrade -C ./data/`
- `answer upgrade -f v1.1.0 -C ./data/`
### dump
-> dump 命令将数据库数据转储到 SQL 文件。
-- 选项
- - `--path` 路径,`-p` 路径:转储数据的路径。可选(默认值为 ./)。
-- 示例
+> dump command will dump the database data to sql file.
+
+- Options
+ - `--path` path, `-p` path: dump data path. Optional. (default: ./)
+- Examples
- `answer dump -p /tmp/`
### build
-> 构建一个新的 Apache Answer 包含指定插件。
+> build a new Apache Answer with plugins.
-- 选项
- - `--with` 插件的字段名。必需。
-- 示例
+- Options
+ - `--with` the field name of plugin. Required.
+- Examples
- `answer build --with plugin1 --with plugin2`
### plugin
-> 打印打包在二进制文件中的所有插件。
+> prints all plugins packed in the binary.
-- 示例
+- Examples
- `answer plugin`
### config
-> 将某些配置值恢复为默认值。
+> restore some config value to default.
-- 选项
- - `--with` 配置的字段名。必需。
-- 示例
+- Options
+ - `--with` the field name of config. Required.
+- Examples
- `answer config -C ./data/ --with allow_password_login`
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/configfile.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/configfile.md
index be84ae4f..7d5c948e 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/configfile.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/configfile.md
@@ -2,34 +2,39 @@
slug: /configfile
---
-# 配置文件
+# Config File
:::tip
-我们使用 `yaml` 配置文件。它将在执行 `answer init` 命令后自动生成。默认路径为 `/data/conf/config.yaml`。
+We use `yaml` configuration file. It will be created automatically after
`answer init` command. The default path is `/data/conf/config.yaml`
+
+The `ui` configuration first is used to configure React's environment
variables, which generally don't need to be changed unless you want to
configure a CDN or deploy the project in a subdirectory.
:::
-## config.yaml 描述
+## config.yaml description
-```yaml
+```yaml title="/data/conf/config.yaml"
server:
http:
- addr: 0.0.0.0:80 # 项目访问端口号
+ addr: 0.0.0.0:80 # Project access port number
data:
database:
- driver: "mysql" # 默认数据库驱动是 mysql
- connection: root:root@tcp(127.0.0.1:3306)/answer # MySQL 数据库连接地址
+ driver: "mysql" # Default database driver is mysql
+ connection: root:root@tcp(127.0.0.1:3306)/answer # MySQL database
connection address
cache:
- file_path: "/tmp/cache/cache.db" # 缓存文件存储路径
+ file_path: "/tmp/cache/cache.db" # Cache file storage path
i18n:
- bundle_dir: "/data/i18n" # 国际化文件存储目录
+ bundle_dir: "/data/i18n" # Internationalized file storage directory
swaggerui:
- show: true # 是否显示 swaggerapi 文档,地址为 /swagger/index.html
- protocol: http # swagger 协议头
- host: 127.0.0.1 # 可访问的 IP 地址或域名
- address: ':80' # 可访问的端口号
+ show: true # Whether to display the swaggerapi documentation, address
/swagger/index.html
+ protocol: http # swagger protocol header
+ host: 127.0.0.1 # An accessible IP address or domain name
+ address: ':80' # accessible port number
service_config:
- upload_path: "/data/uploads" # 上传目录
-
+ upload_path: "/data/uploads" # upload directory
+ui:
+ public_url: '/' # static resource path
+ api_url: '/' # api url for ajax requests
+ base_url: '' # the default deployment is in the root directory, you need to
change this value when deploying in a subdirectory
```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/env.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/env.md
index 47e167a0..ddd97783 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/env.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/env.md
@@ -2,30 +2,30 @@
slug: /env
---
-# 环境变量
+# Environment Variables
-## 安装
+## Installation
-- INSTALL_PORT:指定安装时启动的端口,默认为 80。
-- AUTO_INSTALL:如果设置为 `true`,则安装将通过环境变量自动完成。
+- `INSTALL_PORT`: specifies the port to boot when installation, default is
`80`.
+- `AUTO_INSTALL`: if set to `true`, the installation will be completed
automatically by environment variable.
-### 对于自动安装
+### For auto install
-- DB_TYPE:数据库类型,支持 [`sqlite3` `mysql` `postgres`]。
-- DB_USERNAME:数据库用户名。
-- DB_PASSWORD:数据库密码。
-- DB_HOST:数据库主机,如 `127.0.0.1:3306`。
-- DB_NAME:数据库名称。
-- DB_FILE:数据库文件路径,仅适用于 sqlite3。
-- LANGUAGE:语言,如 `en-US`。
-- SITE_NAME:站点名称 `Apache Answer`。
-- SITE_URL:站点 URL,`https://answer.apache.org`。
-- CONTACT_EMAIL:联系人电子邮件。
-- ADMIN_NAME:管理员名称。
-- ADMIN_PASSWORD:管理员密码。
-- ADMIN_EMAIL:管理员电子邮件。
+- `DB_TYPE`: database type, support [`sqlite3` `mysql` `postgres`]
+- `DB_USERNAME`: database username
+- `DB_PASSWORD`: database password
+- `DB_HOST`: database host, like `127.0.0.1:3306`
+- `DB_NAME`: database name
+- `DB_FILE`: database file path, only for sqlite3
+- `LANGUAGE`: language, like `en-US`
+- `SITE_NAME`: site name `Apache Answer`
+- `SITE_URL`: site url, `https://answer.apache.org`
+- `CONTACT_EMAIL`: contact email
+- `ADMIN_NAME`: admin name
+- `ADMIN_PASSWORD`: admin password
+- `ADMIN_EMAIL`: admin email
-## 日志
+## Log
-- LOG_LEVEL:日志级别,支持 [`DEBUG` `INFO` `WARN` `ERROR`]
-- LOG_PATH:日志存储位置。
+- `LOG_LEVEL`: log level support [`DEBUG` `INFO` `WARN` `ERROR`]
+- `LOG_PATH`: log storage location
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/installation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/installation.md
index 7c1982c4..89c35c74 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/installation.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/installation.md
@@ -2,57 +2,61 @@
slug: /installation
---
-# 安装流程
+# Installation
-## 🚀 启动 Apache Answer
+## Start Apache Answer
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-有多种方法可以启动 Apache Answer,你可以选择最适合你的一种。
+There are multiple ways to start Apache Answer, you can choose the one that
suits you best.
<Tabs>
- <TabItem value="docker-compose" label="Docker Compose" default>
+ <TabItem value="docker-compose" label="Docker compose" default>
-我们推荐使用 Docker Compose 运行 Apache Answer。这是开始使用 Apache Answer 的最简单方法。
+We recommend using Docker Compose to run Apache Answer. This is the easiest
way to get started with Apache Answer.
:::tip
-如果你在 Windows 或 Mac 上使用 [Docker
Desktop](https://www.docker.com/products/docker-desktop),则已经包含了
docker-compose。如果你使用的是 Linux,则需要单独安装 docker-compose。
+
+If you are using [Docker
Desktop](https://www.docker.com/products/docker-desktop) on Windows or Mac,
docker-compose is already included. If you are using Linux, you will need to
install docker-compose separately.
+
:::
```bash
curl -fsSL
https://raw.githubusercontent.com/apache/incubator-answer/main/docker-compose.yaml
| docker compose -p answer -f - up
```
-Apache Answer 的默认端口为 `9080`。你可以在 http://localhost:9080 访问它。
+The default port for Apache Answer is `9080`. You can access it at
http://localhost:9080.
</TabItem>
<TabItem value="docker" label="Docker">
-你可以在 [Docker Hub](https://hub.docker.com/r/apache/answer/tags) 上找到所有可用的 Docker
镜像。`latest` 标签指的是 Apache Answer 的最新稳定版本。
+You can find all the available Docker images on [Docker
Hub](https://hub.docker.com/r/apache/answer/tags). The `latest` tag refers to
the latest stable version of Apache Answer.
```bash
docker run -d -p 9080:80 -v answer-data:/data --name answer
apache/answer:latest
```
-运行该命令后,请前往 http://localhost:9080/install 继续安装流程。
+After running the command, heading to http://localhost:9080/install to
continue installation.
:::tip
-如果你无法访问安装页面,可以使用命令 `docker logs answer` 查看日志。它可能有助于你找到具体的问题
+
+If you can't access the installation page, you can use the command `docker
logs answer` to view the logs. It may help you find the specific problem.
+
:::
</TabItem>
<TabItem value="binary" label="Binary">
-作为一个 golang 项目,Apache Answer 可以编译成一个二进制文件。你可以从 [release
page](https://github.com/apache/incubator-answer/releases) 下载与你的操作系统匹配的二进制文件。
+As a golang project, Apache Answer can be compiled into a binary file. You can
download the binary file that matches your operating system from the [release
page](https://github.com/apache/incubator-answer/releases).
```bash
INSTALL_PORT=80 ./answer init -C ./answer-data/
```
-运行该命令后,请前往 http://localhost:80/install 继续安装流程。
+After running the command, heading to http://localhost:80/install to continue
installation.
-按照 [安装步骤](#install-steps) 完成安装。**之后**运行以下命令再次启动 Apache Answer。
+Follow the [Install Steps](#install-steps) to complete the installation.
**After that** run the following command to start the answer again.
```bash
./answer run -C ./answer-data/
@@ -60,46 +64,49 @@ INSTALL_PORT=80 ./answer init -C ./answer-data/
:::note
-你可以通过指定环境变量 `INSTALL_PORT`来指定启动安装的端口,默认为 80。
+You can specify the port on which to start the installation by specifying the
environment variable `INSTALL_PORT`, default is 80.
-我们使用 `-C` 标志来指示保存 Apache Answer 数据的目录。
+We use `-C` flag to indicate the directory where saved answer data.
:::
</TabItem>
</Tabs>
-## 安装步骤
+## Install steps
-> 在你启动 Apache Answer 后,你可以按照以下步骤完成有关基本配置的初始化。
+> After you start the answer, you can follow the steps below to complete the
initialization about the basic configuration.
-### 第一步:选择语言
+### Step 1: Choose the language

-### 第二步:配置数据库
+### Step 2: Config database
:::tip
-Apache Answer 支持 MySQL、PostgreSQL 和 SQLite 作为数据库后端。最小的环境是
SQLite,不需要任何额外的配置。如果你想使用 MySQL 或 PostgreSQL,则需要先设置数据库,然后在此步骤中配置数据库连接。在这里,我们建议使用
SQLite3 完成你的第一次体验。
+Apache Answer supports MySQL, PostgreSQL, and SQLite as the database backend.
The smallest environment is SQLite, which does not require any additional
configuration. If you want to use MySQL or PostgreSQL, you need to setup the
database first and then configure the database connection in this step. Here we
recommend using sqlite3 to complete your first experience.
:::

-### 第三步:创建配置文件
+### Step 3: Create configuration file
-单击“下一步”按钮以创建配置文件。
+Click Next button to create the configuration file.

-### 第四步:填写基本信息
+### Step 4: Fill in basic information
:::caution
-站点 URL 是你在安装后用于访问 Apache Answer 的浏览器地址。
-**不要忘记管理员电子邮件和密码**。
+Site URL is the browser address you will use to access answers after
installation. If you are deploying a subdirectory, the site url needs to
include the subdirectory's path, eg: https://yourdoamin/{subdirectory}
+
+**Don't forget the admin Email and password.**
:::
+

-### 第五步:完成
+### Step 5: Complete
+
+Congratulations, you can click the done button to start your answer journey!
-🎉 恭喜你,单击“完成”按钮即可开始 Apache Answer 之旅!

diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/plugins.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/plugins.md
index 16c486fd..e13cef89 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/plugins.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/plugins.md
@@ -2,58 +2,58 @@
slug: /plugins
---
-# 使用插件
+# Using Plugins
-:::提示
+:::tip
-当我们需要扩展 Apache Answer 的功能时,例如添加 OAuth 登录,我们可以设计插件来实现这些功能。
+When we need to extend Apache Answer's functionality, such as adding OAuth
login, we can design plugins to implement these features.
:::
-## 介绍
+## Introduction
-### 官方插件
+### Official Plugins
-你可以在这里找到官方支持的 Apache Answer 插件列表。
+You can find a list of officially supported plugins for Apache Answer
[here](https://github.com/apache/incubator-answer-plugins).
-## 构建
+## Build
-Apache Answer 二进制文件支持将不同的所需插件打包到二进制文件中。
+The Apache Answer binary supports packaging different required plugins into
the binary.
-### 先决条件
+### Prerequisites
-- 原始的 Apache Answer 二进制文件
+- Original Apache Answer binary
- [Go](https://go.dev/) `>=1.18`
- [Node.js](https://nodejs.org/) `>=16.17`
- [pnpm](https://pnpm.io/) `>=7`
-### 二进制构建
+### Binary Build
-:::提示
+:::tip
-我们使用 Apache Answer 二进制文件提供的`build`命令来使用插件重建 Apache Answer 的版本。
+We use the `build` command provided with the Apache Answer binary to rebuild a
version of Apache Answer with the plugin.
:::
-例如,让我们看看如何构建包含 GitHub 第三方登录插件的 Apache Answer 二进制文件。
+For example, let's see how to build an Apache Answer binary that includes the
GitHub third-party login plugin.
-#### 使用官方插件
+#### Using Official Plugins
-你可以指定与`--with`参数一起使用的插件:
+You can specify the plugins to use with the `--with` parameter:
```shell
# Build Answer with the GitHub connector plugin
$ ./answer build --with
github.com/apache/incubator-answer-plugins/connector-github
```
-你还可以指定插件版本:
+You can also specify the plugin version:
```shell
# Build Answer with the GitHub connector plugin version 1.0.0
$ ./answer build --with
github.com/apache/incubator-answer-plugins/[email protected] --output
./new_answer
```
-你可以同时使用多个插件:
+You can use multiple plugins at the same time:
```shell
$ ./answer build \
@@ -61,33 +61,33 @@ $ ./answer build \
--with github.com/apache/incubator-answer-plugins/connector-google
```
-#### 使用本地插件
+#### Using Local Plugins
-如果你需要使用本地插件,你可以使用以下命令:
+If you need to use a local plugin, you can use the following command:
```shell
$ ./answer build --with
github.com/apache/incubator-answer-plugins/[email protected]=/my-local-space
```
-#### 交叉编译
+#### Cross Compilation
-你可以使用以下命令在 macOS 上构建 Linux-amd64 二进制文件:
+You can use the following command to build a Linux-amd64 binary on macOS:
```shell
$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./answer build --with
github.com/apache/incubator-answer-plugins/connector-github
```
-#### 指定答案版本
+#### Specifying the Answer Version
-你可以使用`ANSWER_MODULE`环境变量来指定 Answer 版本:
+You can use the `ANSWER_MODULE` environment variable to specify the Answer
version:
```shell
$ ANSWER_MODULE=github.com/apache/[email protected] ./answer build
--with github.com/apache/incubator-answer-plugins/connector-github
```
-:::提示
+:::tip
-你可以使用`plugin`命令列出当前包含插件的二进制文件。
+You can use the `plugin` command to list the current binary containing plugins.
:::
@@ -99,9 +99,9 @@ $ ./new_answer plugin
# google connector[0.0.1] made by answerdev
```
-### Docker 构建
+### Docker Build
-#### 使用答案基础图像的插件构建
+#### build with plugin from answer base image
```dockerfile title="Dockerfile"
FROM apache/answer as answer-builder
@@ -150,7 +150,7 @@ EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
```
-> 你可以更新带有--的参数,以添加更多你需要的插件。
+> You can update the --with parameter to add more plugins that you need.
```shell
# Create a Dockerfile and copy the content above
@@ -159,50 +159,50 @@ $ docker build -t answer-with-plugin .
$ docker run -d -p 9080:80 -v answer-data:/data --name answer
answer-with-plugin
```
-#### 使用本地代码的插件构建
+#### build with plugin from local code
-1. **让你的代码保持在最新状态**: 确保你的本地代码与官方存储库同步,或至少与v1.3.5版本同步。
-2. **添加所需的插件**: 将所需的插件存储库添加到根目录中的`/script/plugin_list`文件中,每行一个。
+1. **keep your code up-to-date**: Make sure your local code is synchronized
with the official repositories, or at least with the v1.3.5 version.
+2. **add required plugins**: Add your required plugin repositories to the
`/script/plugin_list` file in the root directory, one per line.
```
github.com/apache/incubator-answer-plugins/connector-basic@latest
github.com/apache/incubator-answer-plugins/reviewer-basic@latest
github.com/apache/incubator-answer-plugins/captcha-basic@latest
github.com/apache/incubator-answer-plugins/editor_formula@latest
```
-3. **构建Docker映像**: 运行`docker build -t <name[:tag]> . `命令开始构建映像。
-4. **verify image construction**: 运行`docker run -d -p 9080:80 -v
answer-data:/data --name <container_name> <image_name>`命令以启动容器,并在本地验证映像是否构建成功。
+3. **build the Docker image**: Run the `docker build -t <name[:tag]> . `
command to start building the image.
+4. **verify image construction**: Run the `docker run -d -p 9080:80 -v
answer-data:/data --name <container_name> <image_name>` command to start the
container and locally verify whether the image is built successfully.
-## 惯例
+## Usage
-带有插件版本的 Apache Answer 的使用方式与以前相同。你可以在管理页面中找到插件的配置。
+The Apache Answer with the plugin version is used in the same way as before.
You can find the plugin's configuration in the admin page.

-## 升级
+## Upgrade
-:::警告
+:::caution
-请注意,如果你要从非插件版本升级到插件版本,你还需要执行升级命令(也被视为升级)。
+Note that if you are upgrading from a non-plugin version to a plugin version,
you also need to execute the upgrade command (also considered as an upgrade).
:::
-你需要使用新的插件版本构建一个新的Apache Answer二进制文件,然后用新的替换旧的Apache
Answer二进制文件。与正常升级一样,你需要根据部署方法执行不同的[升级步骤](./upgrade)。例如,如果你正在使用二进制部署,则需要执行`upgrade`命令。
+You need to build a new Apache Answer binary with the new plugin version, then
replace the old Apache Answer binary with the new one. As with normal upgrades,
you need to execute different [upgrade steps](./upgrade) depending on the
deployment method. For example, if you are using binary deployment, you need to
execute the `upgrade` command.
-## 第三方插件
+## Third-party Plugin
-:::提示
+:::tip
-我们建议使用[官方插件](https://github.com/apache/incubator-answer-plugins)。如果你想使用第三方插件,请参考以下内容。
+We recommend the use of [official
plugins](https://github.com/apache/incubator-answer-plugins). If you want to
use third-party plugins, refer to the following.
:::
-- 如果第三方插件是公开可用的,你可以像官方插件一样使用它构建。
-- 如果第三方插件是私有的,你需要下载它,然后用它构建。
+- If the third-party plugin is publicly available, you can build with it like
official plugins.
+- If the third-party plugin is private, you need to download it and then build
with it.
-## 开发和贡献
+## Develop and Contribute
-可以在[文档](/docs/development)找到更多相关细节。
+Please refer to [the documentation](/docs/development) for details.
-## 设计与原则
+## Design & Principle
-由于 Go
是一种静态语言,因此没有友好的插件机制。我们使用重新编译进行部署,而不是动态方法。可以在[博客](/blog/2023/07/22/why-the-answer-plugin-system-was-designed-this-way)找到更多相关细节。
+Since Go is a static language, there is no friendly plugin mechanism. Instead
of a dynamic approach, we use recompilation for deployment. Please refer to
[the blog](/blog/2023/07/22/why-the-answer-plugin-system-was-designed-this-way)
for details.
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/upgrade.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/upgrade.md
index 35e9b851..2eeabd80 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/upgrade.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/getting-started/upgrade.md
@@ -2,19 +2,23 @@
slug: /upgrade
---
-# 升级
+# Upgrade
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
:::caution
-我们建议在升级之前备份数据库和配置文件。通常情况下,我们保证升级不会影响现有数据。
-备份数据意味着即使升级失败或者你不想使用高级版本,你也有回滚的选择。
+
+We recommend that you back up database and configuration files before
upgrading. Generally, we guarantee that the upgrade does not affect the
existing data.
+
+To back up data means that you have the option to roll back even if the
upgrade fails, or you do not want the advanced version.
+
:::
<Tabs>
<TabItem value="docker-compose" label="Docker Compose" default>
-如果你使用 Docker Compose 安装 Apache Answer,升级非常简单。
+
+If you use docker-compose to install answer, it is very easy to upgrade.
```bash
docker-compose pull
@@ -22,10 +26,10 @@ docker-compose down
docker-compose up -d
```
-</TabItem>
-
+ </TabItem>
<TabItem value="docker" label="Docker">
-如果你使用 Docker 安装 Apache Answer,升级步骤如下。
+
+If you are using docker to install answer, the upgrade steps are as follows.
```bash
docker pull apache/answer:latest
@@ -35,20 +39,21 @@ docker run -d -p 9080:80 -v answer-data:/data --name answer
apache/answer:latest
```
</TabItem>
-
<TabItem value="binary" label="Binary">
- 如果你使用二进制安装的 Apache Answer,升级步骤如下。
- 1. 下载适用于你的系统的最新二进制版本。
[https://github.com/apache/incubator-answer/releases](https://github.com/apache/incubator-answer/releases)
- 2. 停止旧版本
- 3. 执行升级命令 `./answer upgrade -C ./answer-data/`
- 4. 运行最新版本 `./answer run -C ./answer-data/`
+If you are using a binary installation of answer, the upgrade steps are as
follows.
+
+1. Download the [latest binary
version](https://github.com/apache/incubator-answer/releases) for your system.
+2. Stop old version
+3. Execute the upgrade command `./answer upgrade -C ./answer-data/`
+4. Run the latest version `./answer run -C ./answer-data/`
-</TabItem>
+
+ </TabItem>
</Tabs>
:::tip
-当出现升级异常等其他的意外情况,我们提供了手动强制升级 Apache Answer 的命令。`answer upgrade -f v1.1.0`
执行该命令会强制从指定版本开始升级,即使你当前的 Apache Answer 已经是最新版本。如果遇到升级异常可尝试执行该命令或重新拉取最新 docker
镜像后并进入容器内执行该命令。
+When there are other unexpected cases such as upgrade exceptions, we provide a
command to manually force the upgrade of Apache Answer. `answer upgrade -f
v1.1.0` Executing this command will force upgrade from the specified version,
even if your Apache Answer is already up to date. If you encounter an upgrade
exception, you can try to execute this command or pull the latest docker image
again and execute this command inside the container.
:::
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/deploy-subdirectory.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/deploy-subdirectory.md
new file mode 100644
index 00000000..f97e5e4f
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/deploy-subdirectory.md
@@ -0,0 +1,63 @@
+---
+slug: /deploy-subdirectory
+---
+
+# Deploy subdirectory
+
+This function is implemented based on react-router's
[basename](https://reactrouter.com/en/main/router-components/memory-router#basename),
so it is not applicable to subdirectories implemented through `nginx`
configuration deploy.
+
+Apache Answer supports subdirectory deployment as of version 1.3.5. This
configuration allows you to set a route prefix for your application, e.g., if
you have routes `/` and `/questions`, and you set `base_url` to /foo, you can
access the previous routes via `/foo` and `/foo/questions`.
+
+
+:::warning
+
+The configuration must be set at build time and cannot be changed without a
rebuild because the value is inlined in the client package. This means that it
is necessary for the user to modify the configuration file and then compile it
themselves in order to complete the build of the project.
+
+:::
+
+
+### Steps
+
+1. Modify the configuration file `/configs/config.yaml`。
+2. Run the command to build the project `make ui` `make build`。
+3. Run the command `INSTALL_PORT=80 . /answer init -C . /answer-data/`
Initialize the project, note that you need to add your base_url
(http://localhost:80/{base_url}/install/) to the access path here to see if the
configuration is successful.
+4. Packaging into docker or releasing the above binary directly, see
[here](/docs/plugins#build)
+
+### Configuration file introduction
+
+In order to unify the management of configuration-related variables, starting
from v1.3.5, the environment variables in the ui directory are unified into
`/configs/config.yaml` in the root directory, and the configurations here will
be generated into `/ui/.env.production` by scripts, so as to realize the
injection of environment variables.
+
+Note: This only affects variables in the production environment, for
development mode please continue to refer [here](/docs/development). For more
information on configuration files, please refer to [here](/docs/configfile).
+
+
+```
+...
+ui:
+ public_url: '/'
+ api_url: '/'
+ base_url: ''
+
+```
+
+### base_url
+
+The path of the subdirectory. The default value is `''`, which means it is
deployed in the root directory. If the value is modified, for example `
base_url: '/foo''`, all access paths of the page will be added with this prefix.
+
+Normally, if this value is modified, `public_url` should also remain
consistent.
+
+### public_url
+
+The path of static resources. The default value is `'/'`. If the website uses
CDN to host static resources, this value can be set to the URL of CDN. If
`base_url` is modified and CDN is not used, then this value also needs to be
Same value as `base_url`.
+
+### api_url
+
+The default value is `''`, which is normally not adjusted. However, if your
project uses nginx to proxy subpaths, you need to match the value of `base_url`.
+
+:::tip
+The KEY written to the `.env` file will be converted to:
+```
+PUBLIC_URL=/
+REACT_APP_API_URL=/
+REACT_APP_BASE_URL=
+```
+:::
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/deployment.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/deployment.md
deleted file mode 100644
index 0a43715a..00000000
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/deployment.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-slug: /deploy-subdirectory
----
-
-# Deploy subdirectory
-
-该功能是基于 react-router 的
[basename](https://reactrouter.com/en/main/router-components/memory-router#basename)
来实现的,所以不适用通过 `nginx` 配置实现的子目录部署。
-
-Apache Answer 从 1.3.5 版本开始支持子目录部署的配置,配置允许你为应用程序设置路由前缀, 比如有路由 `/` 和
`/questions`,设置 `base_url` 为 /foo 后就可通过 `/foo` 和 `/foo/questions` 访问到之前的路由。
-
-
-:::warning
-
-base 配置必须在构建时设置,并且不能在不重新构建的情况下更改,因为该值内联在客户端包中。也就是说需要用户修改配置文件后自己进行编译,以完成项目的构建。
-
-:::
-
-
-### Steps
-
-1. 修改配置文件 `/configs/config.yaml`。
-2. 运行命令构建项目 `make ui` `make build`。
-3. 运行命令 `INSTALL_PORT=80 ./answer init -C ./answer-data/`
初始化项目,注意这里访问路径需要添加上你的 base_url(http://localhost:80/{base_url}/install/ )
查看是否配置成功。
-4. 打包成 docker 或者直接将上面的二进制文件发布, 过程可以参考[这里](/docs/plugins#build)
-
-### Configuration file introduction
-
-为了统一管理配置相关的变量,从 v1.3.5 版本开始, ui 目录下的环境变量统一放到 根目录下的 `/configs/config.yaml`
内,这里的配置会通过脚本生成到 `/ui/.env.production` 内,从而实现环境变量的注入。
-
-注意:这只会影响 production
环境的变量,开发模式请继续参考[这里](/community/development)。更多配置文件信息参考[这里](/docs/configfile)。
-
-
-```
-...
-ui:
- public_url: '/'
- api_url: '/'
- base_url: ''
-
-```
-
-### base_url
-
-子目录的路径,默认值是 `''` 表示部署在根目录,如果修改了该值 例如 ` base_url: '/foo'`, 页面所有的访问路径都会添加上该前缀。
-
-通常情况下,修改了该值, 那么 `public_url` 也应该保持一致。
-
-### public_url
-
-静态资源的路径,默认值是 `'/'`, 如果网站采用了 CDN 托管静态资源,可以将该值设置为 CDN 的 url. 如果修改了 `base_url`,
并且没有采用 CDN, 那么该值也需要和 `base_url` 的值一致。
-
-### api_url
-
-接口请求地址,默认值是 `''`, 通常情况下这里不需要调整。但是当你的项目使用了 nginx 来代理了子路径的时候,这里需要跟 `base_url`
的值一致。
-
-:::tip
-写入 `.env` 文件后的 KEY 会转换为
-```
-PUBLIC_URL=/
-REACT_APP_API_URL=/
-REACT_APP_BASE_URL=
-```
-:::
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/flags.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/flags.md
index aa6aa6f9..304d04d3 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/flags.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/flags.md
@@ -2,6 +2,6 @@
slug: /flags
---
-# 举报
->
-> 用户可以通过举报来举报非法内容。
+# Flags
+
+User can flag the spam post.
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/moderation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/moderation.md
index 62d18a13..1e265019 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/moderation.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/moderation.md
@@ -1,3 +1,7 @@
---
slug: /moderation
---
+
+# Moderation
+
+TODO
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/permission.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/permission.md
index b581e52f..dc054ba0 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/permission.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/permission.md
@@ -2,42 +2,42 @@
slug: /permission
---
-# 权限
+# Permission
-## 权限
+## Privileges
-数字表示所需的最低声望等级。社区中有三个选项可用。你可以在管理设置中更改此设置。
+The number is the minimum reputation required for a privilege. There are three
options available for your community. You can change this in Admin settings.
-| 权限 | 级别 1 | 级别 2(默认) | 级别 3 |
+| Privileges | Level 1 | Level 2 (default) | Level 3 |
| ----- | ----- | ----- | ----- |
-| 描述 | 个人团队、群组所需的较低声望。 | 创业社区所需的较低声望。 | 成熟社区所需的较高声望。 |
-| 提问 | 1 | 1 | 1 |
-| 写回答 | 1 | 1 | 1 |
-| 写评论 | 1 | 1 | 1 |
-| 举报 | 1 | 1 | 1 |
-| 点赞评论 | 1 | 1 | 1 |
-| 同时发布超过 2 个链接 | 1 | 10 | 10 |
-| 点赞问题 | 1 | 1 | 15 |
-| 点赞回答 | 1 | 1 | 15 |
-| 编辑标签描述(需要审核) | 1 | 50 | 100 |
-| 踩问题 | 125 | 125 | 125 |
-| 踩回答 | 125 | 125 | 125 |
-| 编辑他人的问题(需要审核) | 1 | 100 | 200 |
-| 编辑他人的回答(需要审核) | 1 | 100 | 200 |
-| 邀请回答 | 1 | 500 | 1000 |
-| 创建新标签 | 1 | 750 | 1500 |
-| 无需审核即可编辑他人的问题 | 1 | 1000 | 2000 |
-| 无需审核即可编辑他人的回答 | 1 | 1000 | 2000 |
-| 审核问题编辑 | 1 | 1000 | 2000 |
-| 审核回答编辑 | 1 | 1000 | 2000 |
-| 审核标签编辑 | 1 | 2500 | 5000 |
-| 无需审核即可编辑标签描述 | 1 | 10000 | 20000 |
-| 管理标签同义词 | 1 | 10000 | 20000 |
+| Description | Less reputation required for private team, group. | Low
reputation required for startup community. | High reputation required for
mature community. |
+| Ask question | 1 | 1 | 1 |
+| Write answer | 1 | 1 | 1 |
+| Write comment | 1 | 1 | 1 |
+| Flag | 1 | 1 | 1 |
+| Upvote comment | 1 | 1 | 1 |
+| Post more than 2 links at a time | 1 | 10 | 10 |
+| Upvote question | 1 | 8 | 15 |
+| Upvote answer | 1 | 8 | 15 |
+| Edit tag description (need to review) | 1 | 50 | 100 |
+| Downvote question | 125 | 125 | 125 |
+| Downvote answer | 125 | 125 | 125 |
+| Edit other's question (need to review) | 1 | 100 | 200 |
+| Edit other's answer (need to review) | 1 | 100 | 200 |
+| Invite to answer | 1 | 500 | 1000 |
+| Create new tag | 1 | 750 | 1500 |
+| Edit other's question without review | 1 | 1000 | 2000 |
+| Edit other's answer without review | 1 | 1000 | 2000 |
+| Review question edits | 1 | 1000 | 2000 |
+| Review answer edits | 1 | 1000 | 2000 |
+| Review tag edits | 1 | 2500 | 5000 |
+| Edit tag description without review | 1 | 10000 | 20000 |
+| Manage tag synonyms | 1 | 10000 | 20000 |
-## 用户角色
+## User roles
-| 权限 \ 角色 | 用户 | 版主 | 管理员 |
-|------------------|---|---|---|
-| 默认无特殊访问权限 | ✓ | ✓ | ✓ |
-| 除站点管理界面外可以访问所有帖子 | - | ✓ | ✓ |
-| 具有访问站点的全部权限 | - | - | ✓ |
+| Permission \ Roles | User | Moderator | Admin |
+|---|---|---|---|
+| Default with no special access | ✓ | ✓ | ✓ |
+| Has access to all posts except site admin | - | ✓ | ✓ |
+| Have the full power to access the site | - | - | ✓ |
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/questions.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/questions.md
new file mode 100644
index 00000000..d1f2dcdf
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/questions.md
@@ -0,0 +1,13 @@
+---
+slug: /questions
+---
+
+# Questions
+
+## Question status
+
+
+
+## Apache Answer status
+
+
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/reputation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/reputation.md
index 40c45c1d..34f3e133 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/reputation.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/reputation.md
@@ -2,28 +2,28 @@
slug: /reputation
---
-# 声望
+# Reputation
-声望用于自动化社区生态管理。
+Reputation used to automate the management of community ecology.
-## 声望变化规则
+## Reputation change rules
-| 条件 | 变化 |
+| Condition | Change |
|---|---|
-| 有人点赞你的问题 | +10 |
-| 有人点赞你的回答 | +10 |
-| 有人接受了你的回答 | +15 |
-| 你接受了某人的回答 | +2 |
-| 你的提议被采纳 | +2 |
-| 你踩了某人的回答 | -1 |
-| 你的问题被踩 | -2 |
-| 你的回答被踩 | -2 |
+| Someone upvote your question | +10 |
+| Someone upvote your answer | +10 |
+| Someone accept your answer | +15 |
+| You accept someone's answer | +2 |
+| Your proposed was accepted | +2 |
+| You downvote someone's answer | -1 |
+| Your question was downvoted | -2 |
+| Your answer was downvoted | -2 |
-## 额外规则
+## Additional rules
-- 初始声望为 0,激活后声望变为 1。
-- 如果有某项操作导致用户的声望 `< 1`,那么任何后续降低声望的操作都不会降低用户的声望。
-- 每天最多获得 200 声望。
-- 如果某项操作导致用户一天内获得 `> 200` 声望,那么任何后续增加声望的操作都不会增加用户的声望。
-- 接受回答获得的声望不受 200 声望限制。
-- 自己接受的回答不会获得声望。
+- The initial reputation is `0`, after activation the reputation becomes `1`
+- If there is an action that causes the user's reputation to be `< 1`, any
subsequent actions that reduce the reputation will not reduce the user's
reputation
+- Maximum of `200` reputation per day
+- If an action results in a user gaining `> 200` reputation for the day, any
subsequent actions that increase reputation will not increase the user's
reputation.
+- The reputation gained from accepted answers is not limited by the `200` cap
+- No reputation gained for accepting your own answer
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/review.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/review.md
new file mode 100644
index 00000000..4fa4090b
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/review.md
@@ -0,0 +1,7 @@
+---
+slug: /review
+---
+
+# Review
+
+TODO
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/settings.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/settings.md
index 045a3bd4..0038bb7d 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/settings.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/settings.md
@@ -1,3 +1,7 @@
---
slug: /settings
---
+
+# Settings
+
+TODO
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/tags.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/tags.md
new file mode 100644
index 00000000..ffcf13ac
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/tags.md
@@ -0,0 +1,7 @@
+---
+slug: /tags
+---
+
+# Tags
+
+TODO
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/users.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/users.md
new file mode 100644
index 00000000..f052e6d6
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/guides/users.md
@@ -0,0 +1,90 @@
+---
+slug: /users
+---
+
+# Users
+
+## User status
+
+
+
+## Top users
+
+Show top users in the platform.
+
+- **Users with the highest reputation scores this week**
+ - Users who increased the most reputation this week
+ - Show top 20 users with their increased reputation (ordered)
+- **Users who voted the most this week**
+ - Number of votes cast for others
+ - Show top 20 users with their number of votes (ordered)
+- **Our community staff**
+ - Show all moderators, administrators
+ - Ordered by reputation
+
+## Sign up
+
+A user sign up process with email.
+
+
+
+- Display name (abbreviated as "name"):
+ - Less than 30 characters.
+- Username:
+ - Unique.
+ - Less than 30 characters.
+ - Can only contain `0-9`, lowercase letters `a-z`, symbols `- . _`.
+ - Generated based on the display name, spaces are replaced with symbols `-`.
+ - If there is a repetition, add 4 random characters at the end, e.g.
`joe-x7k2`.
+ - Reserve keywords are not allowed.
+- Record the time of registration and the IP address.
+- The activation link is valid for 14 days.
+
+## Log in
+
+A user wants to log in. The user's login permissions are related to the status.
+
+| User status | Normal | Inactive | Suspended | Deleted |
+|---|---|---|---|---|
+| Log in | Allowed | Denied | Denied | Denied |
+
+### Log in with email and password
+
+- Fill email and password to log in.
+ - If the user does not exist, the message "Invalid email or password" is
displayed to prevent the account from being attacked.
+ - When an inactive user logs in, go to the page that asks for activation.
+ - When an suspended user logs in, go to the ban prompt page.
+- Login status is remembered for 14 days by default.
+- Click "Forgot password" to reset password if someone forgot their password.
+
+### Log in from thridy-party OAuth
+
+
+
+## Reset password
+
+TODO
+
+## Notification
+
+TODO
+
+### Inbox
+
+TODO
+
+### Achievement
+
+TODO
+
+## Profile
+
+TODO
+
+## Settings
+
+TODO
+
+### Unsubscribe email
+
+TODO