You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2024/08/29 07:36:04 UTC
(incubator-answer-website) branch main updated: Translate introduction and Getting Started articles in i18n\zh-CN to Chinese (#242)
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 0fc6624ba Translate introduction and Getting Started articles in i18n\zh-CN to Chinese (#242)
0fc6624ba is described below
commit 0fc6624bad24c58770e996d49c18da3e2173d440
Author: Melody <10...@users.noreply.github.com>
AuthorDate: Thu Aug 29 15:36:01 2024 +0800
Translate introduction and Getting Started articles in i18n\zh-CN to Chinese (#242)
Co-authored-by: Zhu Xuanlyu <zh...@ones.cn>
---
.../current/getting-started/command-line.md | 116 ++++++++++-----------
.../current/getting-started/configfile.md | 34 +++---
.../current/getting-started/env.md | 40 +++----
.../current/getting-started/installation.md | 52 ++++-----
.../current/getting-started/plugins.md | 96 ++++++++---------
.../current/getting-started/upgrade.md | 22 ++--
.../current/introduction.md | 51 ++++++---
7 files changed, 218 insertions(+), 193 deletions(-)
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 ebdb585a4..8cad0dbaa 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,116 +2,116 @@
slug: /command-line
---
-# Command Line
+# 命令行指南
:::tip
-Apache Answer binary support some command-line options
+Apache Answer 二进制文件支持一些命令行选项。
:::
-## Usage
+## 用法
-`answer command [command or global options] [arguments...]`
+`answer command [命令或全局选项] [参数...]`
```shell
-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]
-
-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
+要运行 Answer,请使用以下命令:
+ - 'answer init' 初始化所需环境
+ - 'answer run' 启动应用程序
+ - 'answer upgrade' 升级应用程序
+
+用法:
+ answer [命令]
+
+可用命令:
+ build 用于构建包含插件的 Answer
+ check 检查所需环境
+ dump 备份数据
+ help 获取关于任意命令的帮助
+ init 初始化 Answer 应用程序
+ plugin 打印二进制文件中打包的所有插件
+ run 运行应用程序
+ upgrade 升级 Apache Answer 版本
Flags:
- -C, --data-path string data path, eg: -C ./data/ (default "/data/")
- -h, --help help for answer
- -v, --version version for answer
+ -C, --data-path string 数据路径,例如:-C ./data/ (默认 "/data/")
+ -h, --help 获取 Answer 的帮助信息
+ -v, --version 获取 Answer 的版本信息
-Use "answer [command] --help" for more information about a command.
+使用 "answer [命令] --help" 来获取关于该命令的更多信息。
```
-## 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/)
+- `--help`, `-h`: 显示帮助文本并退出。可选。
+- `--version`, `-v`: 显示版本并退出。可选。
+- `--data-path` 路径, -C 路径:数据保存路径。可选。(默认: /data/)
-## Commands
+## 命令
### init
-> init command will initialize the application required environment, contains: default config-file, data directory, initialize database etc.
+> init 命令将初始化应用程序所需的环境,包括:默认配置文件、数据目录、初始化数据库等。
-- Examples
+- 示例
- `answer init -C ./data/`
-- 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.
+- 注意事项
+ - 如果 Answer 已经初始化,此命令将不会执行。例如,如果配置文件已存在,则不会被创建或覆盖。
+ - 如果 Answer 初始化失败,则无法执行 run 命令。
### 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.
+> check 命令将检查应用程序是否可以运行。检查配置文件是否存在,检查数据库是否可以建立连接等。
-- Examples
+- 示例
- `answer check -C ./data/`
### run
-> run command will run the application.
+> run 命令将运行应用程序。
-- Examples
+- 示例
- `answer run -C ./data/`
### upgrade
-> upgrade command will upgrade the application.
+> upgrade 命令将升级应用程序。
-- Options
- - `-f` version: Upgrade from the specified version. Optional.
-- Examples
+- 选项
+ - `-f` 版本:从指定版本升级。可选。
+- 示例
- `answer upgrade -C ./data/`
- `answer upgrade -f v1.1.0 -C ./data/`
### dump
-> dump command will dump the database data to sql file.
+> dump 命令将数据库数据转储为 SQL 文件。
-- Options
- - `--path` path, `-p` path: dump data path. Optional. (default: ./)
-- Examples
+- 选项
+ - `--path` 路径,`-p` 路径:数据转储路径。可选。(默认: ./)
+- 示例
- `answer dump -p /tmp/`
### build
-> build a new Apache Answer with plugins.
+> 构建包含插件的 Apache Answer。
-- Options
- - `--with` the field name of plugin. Required.
-- Examples
+- 选项
+ - `--with` 插件字段名称。必需。
+- 示例
- `answer build --with plugin1 --with plugin2`
### plugin
-> prints all plugins packed in the binary.
+> 打印二进制文件中打包的所有插件。
-- Examples
+- 示例
- `answer plugin`
### config
-> restore some config value to default.
+> 将某些配置值恢复为默认值。
-- Options
- - `--with` the field name of config. Required.
-- Examples
+- 选项
+ - `--with` 配置字段名称。必需。
+- 示例
- `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 7d5c948e0..62163305e 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,39 +2,39 @@
slug: /configfile
---
-# Config File
+# 配置文件
:::tip
-We use `yaml` configuration file. It will be created automatically after `answer init` command. The default path is `/data/conf/config.yaml`
+我们使用 `yaml` 配置文件。它会在执行 `answer init` 命令后自动创建。默认路径为 `/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.
+`ui` 配置用于设置 React 的环境变量,通常情况下无需更改,除非你需要配置 CDN 或将项目部署到子目录下。
:::
-## config.yaml description
+## config.yaml 描述
```yaml title="/data/conf/config.yaml"
server:
http:
- addr: 0.0.0.0:80 # Project access port number
+ addr: 0.0.0.0:80 # 项目访问端口号
data:
database:
- driver: "mysql" # Default database driver is mysql
- connection: root:root@tcp(127.0.0.1:3306)/answer # MySQL database connection address
+ driver: "mysql" # 默认数据库驱动为 mysql
+ connection: root:root@tcp(127.0.0.1:3306)/answer # MySQL 数据库连接地址
cache:
- file_path: "/tmp/cache/cache.db" # Cache file storage path
+ file_path: "/tmp/cache/cache.db" # 缓存文件存储路径
i18n:
- bundle_dir: "/data/i18n" # Internationalized file storage directory
+ bundle_dir: "/data/i18n" # 国际化文件存储目录
swaggerui:
- 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
+ show: true # 是否显示 swaggerapi 文档,地址为 /swagger/index.html
+ protocol: http # swagger 协议头
+ host: 127.0.0.1 # 可访问的 IP 地址或域名
+ address: ':80' # 可访问的端口号
service_config:
- upload_path: "/data/uploads" # upload directory
+ upload_path: "/data/uploads" # 上传目录
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
+ public_url: '/' # 静态资源路径
+ api_url: '/' # ajax 请求的 api url
+ base_url: '' # 默认部署在根目录下,当部署在子目录时需要修改此值
```
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 ddd977839..dc21376b8 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`: 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.
+- `INSTALL_PORT`: 指定安装时启动的端口,默认为 `80`。
+- `AUTO_INSTALL`: 如果设置为 `true`,将通过环境变量自动完成安装。
-### For auto install
+### 自动安装相关配置
-- `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
+- `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`: 网站网址,`https://answer.apache.org`
+- `CONTACT_EMAIL`: 联系邮箱
+- `ADMIN_NAME`: 管理员姓名
+- `ADMIN_PASSWORD`: 管理员密码
+- `ADMIN_EMAIL`: 管理员邮箱
## Log
-- `LOG_LEVEL`: log level support [`DEBUG` `INFO` `WARN` `ERROR`]
-- `LOG_PATH`: log storage location
+- `LOG_LEVEL`: 日志级别,支持 [`DEBUG` `INFO` `WARN` `ERROR`]
+- `LOG_PATH`: 日志存储位置
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 89c35c746..c90bedcf8 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,23 +2,23 @@
slug: /installation
---
-# Installation
+# 安装
-## Start Apache Answer
+## 启动 Apache Answer
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-There are multiple ways to start Apache Answer, you can choose the one that suits you best.
+有多种方式启动 Apache Answer,你可以选择最适合你的方式。
<Tabs>
<TabItem value="docker-compose" label="Docker compose" default>
-We recommend using Docker Compose to run Apache Answer. This is the easiest way to get started with Apache Answer.
+我们推荐使用 Docker Compose 来运行 Apache Answer。这是开始使用 Apache Answer 的最简单方法。
:::tip
-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.
+如果你在 Windows 或 Mac 上使用 [Docker Desktop](https://www.docker.com/products/docker-desktop),docker-compose 已经包含在其中。如果你使用的是 Linux,则需要单独安装 docker-compose。
:::
@@ -26,37 +26,37 @@ If you are using [Docker Desktop](https://www.docker.com/products/docker-desktop
curl -fsSL https://raw.githubusercontent.com/apache/incubator-answer/main/docker-compose.yaml | docker compose -p answer -f - up
```
-The default port for Apache Answer is `9080`. You can access it at http://localhost:9080.
+Apache Answer 的默认端口是 `9080`,你可以通过 http://localhost:9080 访问它。
</TabItem>
<TabItem value="docker" label="Docker">
-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.
+你可以在 [Docker Hub](https://hub.docker.com/r/apache/answer/tags) 上找到所有可用的 Docker 镜像。`latest` 标签指的是 Apache Answer 的最新稳定版本。
```bash
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:latest
```
-After running the command, heading to http://localhost:9080/install to continue installation.
+运行该命令后,前往 http://localhost:9080/install 继续安装。
:::tip
-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.
+如果无法访问安装页面,可以使用命令 `docker logs answer` 查看日志。这可能有助于你找到具体问题。
:::
</TabItem>
<TabItem value="binary" label="Binary">
-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).
+作为一个 Go 项目,Apache Answer 可以编译为二进制文件。你可以从[发布页面](https://github.com/apache/incubator-answer/releases)下载与你的操作系统匹配的二进制文件。
```bash
INSTALL_PORT=80 ./answer init -C ./answer-data/
```
-After running the command, heading to http://localhost:80/install to continue installation.
+运行该命令后,前往 http://localhost:80/install 继续安装。
-Follow the [Install Steps](#install-steps) to complete the installation. **After that** run the following command to start the answer again.
+按照[安装步骤](#install-steps)完成安装。**之后**再次运行以下命令启动 Answer。
```bash
./answer run -C ./answer-data/
@@ -64,49 +64,49 @@ Follow the [Install Steps](#install-steps) to complete the installation. **After
:::note
-You can specify the port on which to start the installation by specifying the environment variable `INSTALL_PORT`, default is 80.
+你可以通过指定环境变量 `INSTALL_PORT` 来指定启动安装的端口,默认端口是 80。
-We use `-C` flag to indicate the directory where saved answer data.
+我们使用 `-C` 标志来指示保存 Answer 数据的目录。
:::
</TabItem>
</Tabs>
-## Install steps
+## 安装步骤
-> After you start the answer, you can follow the steps below to complete the initialization about the basic configuration.
+> 启动 Answer 后,你可以按照以下步骤完成基本配置的初始化。
-### Step 1: Choose the language
+### 步骤 1: 选择语言

-### Step 2: Config database
+### 步骤 2: 配置数据库
:::tip
-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.
+Apache Answer 支持 MySQL、PostgreSQL 和 SQLite 作为数据库后端。最小的环境是 SQLite,它不需要任何额外配置。如果您想使用 MySQL 或 PostgreSQL,则需要首先设置数据库,然后在此步骤中配置数据库连接。我们建议首次体验使用 sqlite3。
:::

-### Step 3: Create configuration file
+### 步骤 3: 创建配置文件
-Click Next button to create the configuration file.
+点击下一步按钮创建配置文件。

-### Step 4: Fill in basic information
+### 步骤 4: 填写基本信息
:::caution
-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}
+站点 URL 是你安装后将用来访问 Apache Answer 的浏览器地址。如果你部署在子目录中,站点 URL 需要包括子目录的路径,例如: https://yourdomain/{subdirectory}
-**Don't forget the admin Email and password.**
+**请务必记住管理员的 Email 和密码。**
:::

-### Step 5: Complete
+### 步骤 5: 完成
-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 e13cef891..293b926a1 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
-When we need to extend Apache Answer's functionality, such as adding OAuth login, we can design plugins to implement these features.
+当我们需要扩展 Apache Answer 的功能时,例如添加 OAuth 登录,我们可以设计插件来实现这些功能。
:::
-## Introduction
+## 介绍
-### Official Plugins
+### 官方插件
-You can find a list of officially supported plugins for Apache Answer [here](https://github.com/apache/incubator-answer-plugins).
+你可以在[这里](https://github.com/apache/incubator-answer-plugins)找到 Apache Answer 官方支持的插件列表。
-## Build
+## 构建
-The Apache Answer binary supports packaging different required plugins into the binary.
+Apache Answer 的二进制文件支持将不同的所需插件打包到二进制文件中。
-### Prerequisites
+### 前置要求
-- Original Apache Answer binary
+- 原始的 Apache Answer 二进制文件
- [Go](https://go.dev/) `>=1.18`
- [Node.js](https://nodejs.org/) `>=16.17`
- [pnpm](https://pnpm.io/) `>=7`
-### Binary Build
+### 二进制构建
:::tip
-We use the `build` command provided with the Apache Answer binary to rebuild a version of Apache Answer with the plugin.
+我们使用 Apache Answer 二进制文件提供的 `build` 命令来重新构建包含插件的 Apache Answer 版本。
:::
-For example, let's see how to build an Apache Answer binary that includes the GitHub third-party login plugin.
+例如,以下是如何构建包含 GitHub 第三方登录插件的 Apache Answer 二进制文件。
-#### Using Official Plugins
+#### 使用官方插件
-You can specify the plugins to use with the `--with` parameter:
+你可以使用 `--with` 参数来指定要使用的插件:
```shell
-# Build Answer with the GitHub connector plugin
+# 构建包含 GitHub 连接器插件的 Answer
$ ./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
+# 构建包含 GitHub 连接器插件版本 1.0.0 的 Answer
$ ./answer build --with github.com/apache/incubator-answer-plugins/connector-github@1.0.0 --output ./new_answer
```
-You can use multiple plugins at the same time:
+你可以同时使用多个插件:
```shell
$ ./answer build \
@@ -61,25 +61,25 @@ $ ./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/connector-github@1.0.0=/my-local-space
```
-#### Cross Compilation
+#### 交叉编译
-You can use the following command to build a Linux-amd64 binary on macOS:
+你可以使用以下命令在 macOS 上构建 Linux-amd64 二进制文件:
```shell
$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./answer build --with github.com/apache/incubator-answer-plugins/connector-github
```
-#### Specifying the Answer Version
+#### 指定 Answer 版本
-You can use the `ANSWER_MODULE` environment variable to specify the Answer version:
+你可以使用 `ANSWER_MODULE` 环境变量来指定 Answer 版本:
```shell
$ ANSWER_MODULE=github.com/apache/incubator-answer@v1.2.0-RC1 ./answer build --with github.com/apache/incubator-answer-plugins/connector-github
@@ -87,21 +87,21 @@ $ ANSWER_MODULE=github.com/apache/incubator-answer@v1.2.0-RC1 ./answer build --w
:::tip
-You can use the `plugin` command to list the current binary containing plugins.
+你可以使用 `plugin` 命令列出当前二进制文件中包含的插件。
:::
```shell
$ ./new_answer plugin
-# Output:
+# 输出:
# github connector[0.0.1] made by answerdev
# google connector[0.0.1] made by answerdev
```
-### Docker Build
+### Docker 构建
-#### build with plugin from answer base image
+#### 从 answer 基础镜像构建包含插件的版本
```dockerfile title="Dockerfile"
FROM apache/answer as answer-builder
@@ -150,59 +150,59 @@ EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
```
-> You can update the --with parameter to add more plugins that you need.
+> 你可以更新 --with 参数来添加更多你需要的插件。
```shell
-# Create a Dockerfile and copy the content above
+# 创建一个 Dockerfile 并复制以上内容
$ vim Dockerfile
$ 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. **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.
+1. **保持代码更新**:确保你的本地代码与官方仓库同步,至少与 v1.3.5 版本保持一致。
+2. **添加所需插件**:将你需要的插件仓库添加到根目录的 `/script/plugin_list` 文件中,每行一个。
```
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. **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.
+3. **构建 Docker 镜像**:运行 `docker build -t <name[:tag]> . ` 命令开始构建镜像。
+4. **验证镜像构建**: 运行 `docker run -d -p 9080:80 -v answer-data:/data --name <container_name> <image_name>` 命令启动容器,并在本地验证镜像是否构建成功。
-## Usage
+## 使用
-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.
+带插件版本的 Apache Answer 的使用方式与之前相同。你可以在管理页面找到插件的配置。

-## 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).
+如果你从非插件版本升级到插件版本,还需要执行升级命令(这也被视为一次升级)。
:::
-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.
+你需要使用新插件版本构建新的 Apache Answer 二进制文件,然后将旧的 Apache Answer 二进制文件替换为新的。与普通升级一样,根据部署方式的不同,你需要执行不同的[升级步骤](./upgrade)。例如,如果你使用的是二进制部署,则需要执行 `upgrade` 命令。
-## Third-party Plugin
+## 第三方插件
:::tip
-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.
+我们推荐使用[官方插件](https://github.com/apache/incubator-answer-plugins)。如果你想使用第三方插件,请参考以下内容。
:::
-- 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
+## 开发与贡献
-Please refer to [the documentation](/docs/development) for details.
+请参考[文档](/docs/development)获取详细信息。
-## Design & Principle
+## 设计与原理
-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
+由于 Go 是静态语言,没有友好的插件机制。我们采用重新编译的方式来进行部署,而非动态方式。详情请参考[博客](/blog/2023/07/22/why-the-answer-plugin-system-was-designed-this-way)。
\ 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 2eeabd808..b00dd5f14 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,23 +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>
-If you use docker-compose to install answer, it is very easy to upgrade.
+如果你是使用docker-compose来安装answer,升级起来非常简单。
```bash
docker-compose pull
@@ -29,7 +29,7 @@ docker-compose up -d
</TabItem>
<TabItem value="docker" label="Docker">
-If you are using docker to install answer, the upgrade steps are as follows.
+如果你使用docker来安装answer,升级步骤如下:
```bash
docker pull apache/answer:latest
@@ -41,12 +41,12 @@ docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:latest
</TabItem>
<TabItem value="binary" label="Binary">
-If you are using a binary installation of answer, the upgrade steps are as follows.
+如果你使用的是 answer 的二进制安装版本,升级步骤如下:
-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/`
+1. 下载适用于你系统的[最新二进制版本](https://github.com/apache/incubator-answer/releases)。
+2. 停止旧版本。
+3. 执行升级命令`./answer upgrade -C ./answer-data/`。
+4. 运行最新版本`./answer run -C ./answer-data/`。
</TabItem>
@@ -54,6 +54,6 @@ If you are using a binary installation of answer, the upgrade steps are as follo
:::tip
-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.
+当出现其他意外情况,如升级异常时,我们提供了一个命令来手动强制升级 Apache Answer。使用 `answer upgrade -f v1.1.0` 命令可以从指定版本强制升级,即使你的 Apache Answer 已经是最新版本。如果遇到升级异常,可以尝试执行这个命令,或者重新拉取最新的 Docker 镜像,并在容器内执行该命令。
:::
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/introduction.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/introduction.md
index af4b94429..c49f15f9e 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/introduction.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/introduction.md
@@ -6,22 +6,47 @@ slug: /
Apache Answer 可帮助你在用户或团队之间建立问答社区。你可以在这里分享知识并帮助用户解决问题。
-主要功能:
+
-- **提问和回答** - 提出问题并从你的用户和团队那里获得答案。
-- **组织内容** - 将你的内容组织为分类和标签。
-- **集成** - 与你现有的工具和服务集成。
-- **游戏化** - 奖励用户的贡献。
-- **现代用户界面** - 现代且响应式的用户界面。
-- **可扩展** - 使用插件扩展 Apache Answer。
-- **开源** - 免费且开源。
+## 功能一览
-## 架构
+### 问答体验,简洁流畅
-### 前后端分离
+- **提问与回答**:轻松提交和回答问题。
+- **实时 Markdown 预览**:使用 Markdown 编辑内容的同时,可同步预览样式,兼容 CommonMark。
+- **邀请回答**:邀请社区中相关领域的专家用户,以便更快速地获得回复。
+- **高级搜索**:通过过滤选项、标签、用户名、答案评分等快速找到您需要的内容。
+- **实时建议**:在输入时,发现相关问题,并直接跳转到该问题。
-Apache Answer 是一个单体库,包含前端和后端。
+### 社区管理,轻松高效
-## 用户界面预览
+- **管理员/版主/用户**:通过多种社区角色管理用户访问级别,实现最佳控制。
+- **批量添加用户**:一次性添加多个用户,高效扩大社区。
+- **标签系统**:使用标签组织内容,实现高效分类和便捷导航。
+- **开放编辑与协作**:每个人都可以编辑现有的问题、答案和标签,以确保内容的准确性和时效性。
+- **透明的修订历史记录**:记录和存储每次编辑操作,用户可以查看内容的演变过程。
-
+### 社区氛围,蓬勃发展
+
+- **投票机制**:社区建设,人人参与。点赞优质答案,点踩不合适的答案。
+- **声望值体系**:通过贡献获得认可和对应的声望值,解锁社区特权。
+- **通知**:不错过新评论、答案、邀请、投票等通知。
+- **关注标签**:关注你喜欢的标签,随时掌握相关问答动态。
+- **用户主页**:自豪地向社区展示你的专业知识、兴趣和对社区的贡献。
+
+### 个性化定制和插件
+
+- **主题与布局**:自定义线上社区,符合你的社区定位。
+- **插件**:通过社区构建的插件增强你的 Apache Answer,例如第三方登录、缓存、搜索等。
+
+### 隐私与安全
+
+- **登录访问控制**:通过管理注册、登录方式和允许的电子邮件域名,为社区创建一个安全的环境。
+- **内容访问控制**:设置成仅社区成员可以访问,确保社区讨论的安全性。
+
+### 更多内容
+
+- **多语言版本**:使用来自社区志愿者翻译的多语言版本,开始搭建和管理社区。
+- **响应式布局**:在任何设备上,随时加入社区讨论中。
+- **夜间模式**:个性化社区体验以保持专注。
+- **前端和后端分离**:Apache Answer 是一个单体库,包含前端和后端。