Update zh-cn translations to 6addd5cf52

This commit is contained in:
CDN 2025-04-21 07:55:23 +08:00
parent a30b7e2499
commit 0e63f0b924
Signed by: CDN
GPG key ID: 0C656827F9F80080
7 changed files with 157 additions and 11 deletions

View file

@ -862,6 +862,10 @@ OTEL 服务名称的前缀。服务名称将是 `$prefix/web` 和 `$prefix/sidek
#### `S3_ALIAS_HOST` #### `S3_ALIAS_HOST`
#### `EXTRA_MEDIA_HOSTS`
**版本历史:**\
4.4.0 - 添加
#### `S3_OPEN_TIMEOUT` #### `S3_OPEN_TIMEOUT`

View file

@ -27,12 +27,6 @@ Mastodon 的全文搜索允许已登录用户查找以下内容:
Mastodon 经过测试与 Elasticsearch 7 版本兼容。它理论上也支持 OpenSearch 以及 Elasticsearch 6 和 8 版本,但这些设置不受官方支持。 Mastodon 经过测试与 Elasticsearch 7 版本兼容。它理论上也支持 OpenSearch 以及 Elasticsearch 6 和 8 版本,但这些设置不受官方支持。
{{< /hint >}} {{< /hint >}}
Elasticsearch 需要 Java 运行环境。如果你尚未安装 Java请立即进行安装。假设你以 `root` 用户身份登录:
```bash
apt install openjdk-17-jre-headless
```
将 Elasticsearch 官方仓库添加到 apt 将 Elasticsearch 官方仓库添加到 apt
```bash ```bash

View file

@ -115,6 +115,12 @@ systemctl reload nginx
S3_ALIAS_HOST=files.example.com S3_ALIAS_HOST=files.example.com
``` ```
(可选)如果你的 S3_ALIAS_HOST 使用了 301 重定向或类似方式,请将最终跳转的目标地址添加到 EXTRA_MEDIA_HOSTS。
```bash
EXTRA_MEDIA_HOSTS=https://data.example1.com,https://data.example2.com
```
然后重启 Mastodon 然后重启 Mastodon
```bash ```bash

View file

@ -62,6 +62,9 @@ Mastodon 会向 Web 界面、Mastodon API 客户端和 ActivityPub 服务器发
除隐藏存储提供商之外,这还可以让你在从存储提供商拉取媒体后缓存媒体,从而降低存储提供商的出口带宽成本。 这可以在你自己的反向代理中完成,也可以通过使用 CDN 来完成。 除隐藏存储提供商之外,这还可以让你在从存储提供商拉取媒体后缓存媒体,从而降低存储提供商的出口带宽成本。 这可以在你自己的反向代理中完成,也可以通过使用 CDN 来完成。
`EXTRA_MEDIA_HOSTS` 允许你追加一组额外的域名,这些域名将被允许为你的实例提供媒体资源。如果你在自定义 CSS 或关于页面中包含了外部媒体,或者你的数据存储提供商会重定向到其他域名时,这个设置非常有用。
例如:`EXTRA_MEDIA_HOSTS=https://data.example1.com,https://data.example2.com`
{{< page-ref page="admin/optional/object-storage-proxy.md" >}} {{< page-ref page="admin/optional/object-storage-proxy.md" >}}
{{< hint style="info" >}} {{< hint style="info" >}}

View file

@ -57,7 +57,10 @@ aliases: [
], ],
"configuration": { "configuration": {
"urls": { "urls": {
"streaming": "wss://mastodon.social" "streaming": "wss://mastodon.social",
"about": "https://mastodon.social/about",
"privacy_policy": "https://mastodon.social/privacy-policy",
"terms_of_service": "https://mastodon.social/terms-of-service"
}, },
"vapid": { "vapid": {
"public_key": "BCkMmVdKDnKYwzVCDC99Iuc9GvId-x7-kKtuHnLgfF98ENiZp_aj-UNthbCdI70DqN1zUVis-x0Wrot2sBagkMc=" "public_key": "BCkMmVdKDnKYwzVCDC99Iuc9GvId-x7-kKtuHnLgfF98ENiZp_aj-UNthbCdI70DqN1zUVis-x0Wrot2sBagkMc="
@ -325,6 +328,28 @@ aliases: [
**版本历史:**\ **版本历史:**\
4.0.0 - 添加 4.0.0 - 添加
##### `configuration[urls][about]` {#about_url}
**描述:** 实例“关于”页面的 URL。\
**类型:** 字符串 (URL)\
**版本历史:**\
4.4.0 - 添加
##### `configuration[urls][privacy_policy]` {#privacy_policy}
**描述:** 实例隐私政策页面的 URL。\
**类型:** 字符串 (URL) 或 null\
**版本历史:**\
4.4.0 - 添加
##### `configuration[urls][terms_of_service]` {#terms_of_service}
**描述:** 实例当前服务条款页面的 URL。\
**类型:** {{<nullable>}} 字符串 (URL)\
**版本历史:**\
4.4.0 - 添加
### `configuration[vapid][public_key]` {#vapid_public_key} ### `configuration[vapid][public_key]` {#vapid_public_key}
**描述:** 实例的 VAPID 公钥,用于推送通知,与 [WebPushSubscription#server_key]({{< relref "entities/WebPushSubscription#server_key" >}}) 相同。\ **描述:** 实例的 VAPID 公钥,用于推送通知,与 [WebPushSubscription#server_key]({{< relref "entities/WebPushSubscription#server_key" >}}) 相同。\
**类型:** 字符串\ **类型:** 字符串\

View file

@ -0,0 +1,62 @@
---
title: TermsOfService
description: 表示当前实例的服务条款。
menu:
docs:
parent: entities
aliases: [
"/entities/termsofservice",
"/entities/TermsOfService",
"/api/entities/termsofservice",
"/api/entities/TermsOfService",
]
---
## 示例
```json
{
"effective_date": "2025-04-15",
"effective": true,
"content": "<p>Foo bar newer</p>\n",
"succeeded_by": null
}
```
## 属性
### `effective_date` {#effective_date}
**说明:** 这些服务条款生效或已生效的日期。\
**类型:** 字符串([Date](/api/datetime-format#date)\
**版本历史:**\
4.4.0 - 添加
### `effective` {#effective}
**说明:** 当前这些服务条款是否正在生效。\
**类型:** 布尔值\
**版本历史:**\
4.4.0 - 添加
### `content` {#content}
**说明:** 服务条款的已渲染 HTML 内容。\
**类型:** 字符串HTML\
**版本历史:**\
4.4.0 - 添加
### `succeeded_by` {#succeeded_by}
**说明:** 如果存在更新的服务条款,则为其生效日期。\
**类型:** {{<nullable>}} 字符串([Date](/api/datetime-format#date)\
**版本历史:**\
4.4.0 - 添加
## 另请参阅
{{< page-relref ref="methods/instance#terms_of_service" caption="GET /api/v1/instance/terms_of_service" >}}
{{< page-relref ref="methods/instance#terms_of_service_date" caption="GET /api/v1/instance/terms_of_service/:date" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/terms_of_service_serializer.rb" caption="app/serializers/rest/terms_of_service_serializer.rb" >}}

View file

@ -549,16 +549,68 @@ GET /api/v1/instance/terms_of_service HTTP/1.1
获取此实例的服务条款的内容(若已配置)。 获取此实例的服务条款的内容(若已配置)。
**返回:** [PrivacyPolicy]({{< relref "entities/PrivacyPolicy" >}})\ **返回:** [TermsOfService]({{< relref "entities/TermsOfService" >}})
**OAuth** 公开\ **OAuth:** 公开
**版本历史**\ **版本历史:**
4.4.0 - 添加 4.4.0 - 新增
#### 响应 #### 响应
##### 200: OK ##### 200: OK
```json
{
"effective_date": "2025-04-15",
"effective": true,
"content": "<p>Foo bar newer</p>\n",
"succeeded_by": null
}
```
##### 404: 未找到
本实例尚未配置服务条款。
```json
{
"error": "Record not found"
}
```
---
## 查看特定版本的服务条款 {#terms_of_service_date}
```http
GET /api/v1/instance/terms_of_service/:date HTTP/1.1
```
获取本实例指定日期的服务条款内容(如有配置)。
**返回:** [TermsOfService]({{< relref "entities/TermsOfService" >}})
**OAuth:** 公开
**版本历史:**
4.4.0 - 新增
#### 请求
##### 路径参数
:date
: {{<required>}} 字符串。服务条款生效日期。
#### 响应
##### 200: OK
```json
{
"effective_date": "2025-04-15",
"effective": true,
"content": "<p>Foo bar newer</p>\n",
"succeeded_by": null
}
```
##### 404: Not found ##### 404: Not found