Skip to content

Commit 1972383

Browse files
BetaCat0techknowlogick
authored andcommitted
ZH-CN translation of Usage part (#5086)
1 parent 25def0a commit 1972383

File tree

6 files changed

+188
-2
lines changed

6 files changed

+188
-2
lines changed

docs/content/doc/usage.zh-cn.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
date: "2016-12-27T16:00:00+02:00"
3+
title: "使用指南"
4+
slug: "usage"
5+
weight: 35
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "使用指南"
11+
weight: 35
12+
identifier: "usage"
13+
---

docs/content/doc/usage/backup-and-restore.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: "2018-06-06T09:33:00+08:00"
3-
title: "使用: 备份与恢复"
3+
title: "使用备份与恢复"
44
slug: "backup-and-restore"
55
weight: 11
66
toc: true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
date: "2018-05-10T16:00:00+02:00"
3+
title: "使用:Issue 和 Pull Request 模板"
4+
slug: "issue-pull-request-templates"
5+
weight: 15
6+
toc: true
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "usage"
11+
name: "Issue 和 Pull Request 模板"
12+
weight: 15
13+
identifier: "issue-pull-request-templates"
14+
---
15+
16+
# 使用 Issue 和 Pull Request 模板
17+
18+
对于一些项目,在创建 issue 或 pull request 时有一个标准的询问列表需要提交者填写。Gitea 支持添加此类模板至 repository 的主分支,以便提交者在创建 issue 或 pull request 时可以自动生成一个需要完成的表单,这么做可以减少一些前期关于 issue 抑或 pull request 细节上的沟通成本。
19+
20+
以下罗列了一些可供参考的 issue 模板:
21+
22+
* ISSUE_TEMPLATE.md
23+
* issue_template.md
24+
* .gitea/ISSUE_TEMPLATE.md
25+
* .gitea/issue_template.md
26+
* .github/ISSUE_TEMPLATE.md
27+
* .github/issue_template.md
28+
29+
30+
以下罗列了一些可供参考的 PR 模板:
31+
32+
* PULL_REQUEST_TEMPLATE.md
33+
* pull_request_template.md
34+
* .gitea/PULL_REQUEST_TEMPLATE.md
35+
* .gitea/pull_request_template.md
36+
* .github/PULL_REQUEST_TEMPLATE.md
37+
* .github/pull_request_template.md
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
date: "2018-06-01T19:00:00+02:00"
3+
title: "使用:Pull Request"
4+
slug: "pull-request"
5+
weight: 13
6+
toc: true
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "usage"
11+
name: "Pull Request"
12+
weight: 13
13+
identifier: "pull-request"
14+
---
15+
16+
# Pull Request
17+
18+
## 在 pull requests 使用“Work In Progress”标记
19+
20+
您可以通过在一个进行中的 pull request 的标题上添加前缀 `WIP:` 或者 `[WIP]`(此处大小写敏感)来防止它被意外合并,具体的前缀设置可以在配置文件 `app.ini` 中找到:
21+
22+
```
23+
[repository.pull-request]
24+
WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
25+
```
26+
27+
列表的第一个值将用于 helpers 程序。
28+
29+
## Pull Request 模板
30+
31+
有关 pull request 模板的更多信息请您移步 : [Issue and Pull Request templates](../issue-pull-request-templates)

docs/content/doc/usage/reverse-proxies.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration
8181

8282
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
8383

84-
## Using Caddy with a Sub-path as a reverse proxy
84+
## Using Caddy as a reverse proxy
8585

8686
If you want Caddy to serve your Gitea instance you can add the following server block to your Caddyfile:
8787

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
date: "2018-05-22T11:00:00+00:00"
3+
title: "使用:反向代理"
4+
slug: "reverse-proxies"
5+
weight: 17
6+
toc: true
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "usage"
11+
name: "反向代理"
12+
weight: 16
13+
identifier: "reverse-proxies"
14+
---
15+
16+
## 使用 Nginx 作为反向代理服务
17+
18+
如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server``http` 部分:
19+
20+
```
21+
server {
22+
listen 80;
23+
server_name git.example.com;
24+
25+
location / {
26+
proxy_pass http://localhost:3000;
27+
}
28+
}
29+
```
30+
31+
## 使用 Nginx 作为反向代理服务并将 Gitea 路由至一个子路径
32+
33+
如果您已经有一个域名并且想与 Gitea 共享该域名,您可以增加以下 `nginx.conf` 配置中 `server``http` 部分,为 Gitea 添加路由规则:
34+
35+
```
36+
server {
37+
listen 80;
38+
server_name git.example.com;
39+
40+
location /git/ { # Note: Trailing slash
41+
proxy_pass http://localhost:3000/; # Note: Trailing slash
42+
}
43+
}
44+
```
45+
46+
然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`
47+
48+
## 使用 Apache HTTPD 作为反向代理服务
49+
50+
如果您想使用 Apache HTTPD 作为 Gitea 的反向代理服务,您可以为您的 Apache HTTPD 作如下配置(在 Ubuntu 中,配置文件通常在 `/etc/apache2/httpd.conf` 目录下):
51+
52+
```
53+
<VirtualHost *:80>
54+
...
55+
ProxyPreserveHost On
56+
ProxyRequests off
57+
ProxyPass / http://localhost:3000/
58+
ProxyPassReverse / http://localhost:3000/
59+
</VirtualHost>
60+
```
61+
62+
注:必须启用以下 Apache HTTPD 组件:`proxy``proxy_http`
63+
64+
## 使用 Apache HTTPD 作为反向代理服务并将 Gitea 路由至一个子路径
65+
66+
如果您已经有一个域名并且想与 Gitea 共享该域名,您可以增加以下配置为 Gitea 添加路由规则(在 Ubuntu 中,配置文件通常在 `/etc/apache2/httpd.conf` 目录下):
67+
68+
```
69+
<VirtualHost *:80>
70+
...
71+
<Proxy *>
72+
Order allow,deny
73+
Allow from all
74+
</Proxy>
75+
76+
ProxyPass /git http://localhost:3000 # Note: no trailing slash after either /git or port
77+
ProxyPassReverse /git http://localhost:3000 # Note: no trailing slash after either /git or port
78+
</VirtualHost>
79+
```
80+
81+
然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`
82+
83+
注:必须启用以下 Apache HTTPD 组件:`proxy``proxy_http`
84+
85+
## 使用 Caddy 作为反向代理服务
86+
87+
如果您想使用 Caddy 作为 Gitea 的反向代理服务,您可以在 `Caddyfile` 中添加如下配置:
88+
89+
```
90+
git.example.com {
91+
proxy / http://localhost:3000
92+
}
93+
```
94+
95+
## 使用 Caddy 作为反向代理服务并将 Gitea 路由至一个子路径
96+
97+
如果您已经有一个域名并且想与 Gitea 共享该域名,您可以在您的 `Caddyfile` 文件中增加以下配置,为 Gitea 添加路由规则:
98+
99+
```
100+
git.example.com {
101+
proxy /git/ http://localhost:3000 # Note: Trailing Slash after /git/
102+
}
103+
```
104+
105+
然后在您的 Gitea 配置文件中添加 `[server] ROOT_URL = http://git.example.com/git/`

0 commit comments

Comments
 (0)