-
Notifications
You must be signed in to change notification settings - Fork 7
Update 101 stale zh translations to match current EN source #5515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| --- | ||
| title: 环境配置 | ||
| description: 列出生产、预发布和开发等环境。 | ||
| sidebar-title: 环境配置 | ||
| title: 环境 | ||
| description: 列出生产、暂存和开发等环境。 | ||
| noindex: true | ||
| --- | ||
|
|
||
| 您可以指定服务器部署的环境。 | ||
| 您可以指定部署服务器的环境。 | ||
|
|
||
| ## 单 URL 环境 | ||
| ## 单URL环境 | ||
|
|
||
| ```yaml title="api.yml" | ||
| name: api | ||
|
|
@@ -17,9 +17,9 @@ environments: | |
| url: https://www.staging.yoursite.com | ||
| ``` | ||
|
|
||
| ## 每个环境多个 URL | ||
| ## 每个环境多个URL | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] reported by reviewdog 🐶 |
||
|
|
||
| 您可以为每个环境指定多个 URL。如果您有微服务架构,并且希望单个 SDK 与多个服务器交互,这将很有帮助。 | ||
| 您可以为每个环境指定多个URL。如果您有微服务架构,并希望单个SDK与多个服务器交互,这将很有帮助。 | ||
|
|
||
| ```yaml title="api.yml" | ||
| environments: | ||
|
|
@@ -33,7 +33,7 @@ environments: | |
| Plants: https://plants.staging.yoursite.com | ||
| ``` | ||
|
|
||
| 如果您选择使用此功能,必须为您定义的每个服务指定一个 `url`: | ||
| 如果您选择使用此功能,必须为定义的每个服务指定一个`url`: | ||
|
|
||
| ```yaml title="auth.yml" | ||
| service: | ||
|
|
@@ -44,7 +44,7 @@ service: | |
|
|
||
| ## 默认环境 | ||
|
|
||
| 您也可以提供默认环境: | ||
| 您还可以提供默认环境: | ||
|
|
||
| ```yaml title="api.yml" | ||
| name: api | ||
|
|
@@ -56,18 +56,18 @@ environments: | |
| default-environment: Production | ||
| ``` | ||
|
|
||
| <Note>通过提供默认环境,生成的 SDK 将设置为开箱即用地访问该 URL。</Note> | ||
| <Note>通过提供默认环境,生成的SDK将设置为开箱即用地访问该URL。</Note> | ||
|
|
||
| ## URL 模板 | ||
| ## URL模板 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] reported by reviewdog 🐶 |
||
|
|
||
| <Note>URL 模板目前仅支持 Python 和 Java SDK 生成。</Note> | ||
| <Note>URL模板目前仅支持Python和Java SDK生成。</Note> | ||
|
|
||
| 对于跨多个区域或环境部署的 API,您可以定义带有变量占位符的 URL 模板,SDK 用户可以在运行时进行自定义。要设置此功能: | ||
| 对于跨多个区域或环境部署的API,您可以定义带有变量占位符的URL模板,SDK用户可以在运行时自定义。设置方法: | ||
|
|
||
| 1. 在 `urls` 下定义您的静态基础 URL——这些会出现在生成的环境枚举中。 | ||
| 2. 为每个服务添加带有 `{variable}` 占位符的 `url-templates`(例如,`https://api.{region}.example.com/v1`)。Fern 将这些作为 SDK 中的可配置参数公开。 | ||
| 3. 提供 `default-urls` 作为具体的回退选项,这样 SDK 用户无需提供变量就能获得开箱即用的客户端。 | ||
| 4. 为每个服务列出可用的 `variables`,每个变量都有一个 `id`、一个 `default` 值,以及一个可选的 `values` 列表来约束允许的选项。 | ||
| 1. 在`urls`下定义静态基础URL——这些将出现在生成的环境枚举中。 | ||
| 2. 为每个服务添加带有`{variable}`占位符的`url-templates`(例如,`https://api.{region}.example.com/v1`)。Fern将这些作为SDK中的可配置参数公开。 | ||
| 3. 提供`default-urls`作为具体的后备方案,以便SDK用户无需提供变量即可获得开箱即用的客户端。 | ||
| 4. 列出每个服务的可用`variables`,每个变量具有`id`、`default`值和可选的`values`列表来约束允许的选项。 | ||
|
|
||
| ```yaml title="api.yml" | ||
| environments: | ||
|
|
@@ -106,17 +106,17 @@ default-environment: RegionalApiServer | |
| ``` | ||
|
|
||
| ## 基础路径 | ||
| 如果您希望所有端点都添加路径前缀,请使用 `base-path`。 | ||
| 如果您希望所有端点都带有路径前缀,请使用`base-path`。 | ||
|
|
||
| 在下面的示例中,每个端点都添加了 `/v1` 前缀: | ||
| 在下面的示例中,每个端点都带有`/v1`前缀: | ||
| ```yaml title="api.yml" | ||
| name: api | ||
| base-path: /v1 | ||
| ``` | ||
|
|
||
| ## 受众 | ||
|
|
||
| 如果您有列出的环境需要过滤,可以利用受众功能。 | ||
| 如果您有想要筛选的已列出环境,可以利用受众功能。 | ||
|
|
||
| ```yaml title="api.yml" | ||
| audiences: | ||
|
|
@@ -129,4 +129,4 @@ environments: | |
| url: https://api.buildwithfern.com | ||
| audiences: | ||
| - external | ||
| ``` | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] '单URL环境' should use sentence-style capitalization.