istio / istio.io

Source for the istio.io site
https://istio.io/
Apache License 2.0
760 stars 1.53k forks source link

zh: Reenable spell checking over the Chinese content #4807

Closed geeknoid closed 4 years ago

geeknoid commented 5 years ago

https://github.com/istio/istio.io/pull/4806 fixed a problem where we weren't systematically checking all markdown files. Doing so triggered a number of errors from the Chinese content, so I disabled spell checking there until you guys can address the warnings.

Once the typos are fixed, please go into scripts/lint_site.sh, look for the line that runs "mdspell" and in that line change "content/en" to "." which will run the spell checker over the entire content hierarchy rather than just the english portion.

Thanks.

rootsongjc commented 5 years ago

There are so many spelling errors that I have no idea how to correct them. Most of them aren't real spell errors.

    content/./zh/docs/reference/config/policy-and-telemetry/templates/analytics/index.md
       51 | io.policy.v1beta1/#TimeStamp)|api_proxy 开始接收请求的时间戳|
       52 | io.policy.v1beta1/#TimeStamp)|api_proxy 完成接收请求的时间戳|
       53 | io.policy.v1beta1/#TimeStamp)|api_proxy 开始向目标发送请求的时间戳|
       54 | io.policy.v1beta1/#TimeStamp)|api_proxy 完成向目标发送请求的时间戳|
       55 | io.policy.v1beta1/#TimeStamp)|api_proxy 开始请求目标的时间戳|
       56 | io.policy.v1beta1/#TimeStamp)|api_proxy 完成目标请求的时间戳|
       57 | io.policy.v1beta1/#TimeStamp)|api_proxy 开始从目标接收响应的时间戳|
       58 | io.policy.v1beta1/#TimeStamp)|api_proxy 完成从目标接收响应的时间戳|

    content/./zh/docs/reference/config/policy-and-telemetry/templates/apikey/index.md
       29 | |`api`|`string`|被调用的 API(api.service)|
       30 | |`apiVersion`|`string`|API 版本(api.version)|

    content/./zh/docs/reference/config/policy-and-telemetry/templates/authorization/index.md
       45 | |path|string|服务的 HTTP RestAPI|
       46 | |properties|`map<string,[`istio.policy.v1beta1.Value`](/zh/docs/refe
       56 | |properties|`map<string,[`istio.policy.v1beta1.Value`](/zh/docs/refe
       67 | ## istio.policy.v1beta1.Value
       69 | 转换为任何 ValueType 枚举值。例如:模版中类型为 istio.policy.v1beta1.Value 的字段数据,下面两个表达式都是有效的 `data: sou
       69 | ata: request.id | ""`;结果类型分别为 ValueType.IP_ADDRESS 或 ValueType.STRING。
       69 | 果类型分别为 ValueType.IP_ADDRESS 或 ValueType.STRING。
       71 | ype 值,由 Mixer 提供等效的 Value 类型的 oneof 字段并传给适配器。
       75 | |stringValue|string (oneof)|STRING 类型的值|
       75 | |stringValue|string (oneof)|STRING 类型的值|
       76 | |int64Value|int64 (oneof)|INT64 类型的值|
       76 | |int64Value|int64 (oneof)|INT64 类型的值|
       77 | |doubleValue|double (oneof)|DOUBLE 类型的值|
       77 | |doubleValue|double (oneof)|DOUBLE 类型的值|
       78 | |ipAddressValue|istio.policy.v1beta1.IPAddres
       78 | |ipAddressValue|istio.policy.v1beta1.IPAddress (oneof)|IPAddress 类型的值|
       78 | tio.policy.v1beta1.IPAddress (oneof)|IPAddress 类型的值|
       78 | icy.v1beta1.IPAddress (oneof)|IPAddress 类型的值|
       79 | |timestampValue|istio.policy.v1beta1.TimeStam
       79 | |timestampValue|istio.policy.v1beta1.TimeStamp (oneof)|TIMESTAMP 类型的值|
       79 | tio.policy.v1beta1.TimeStamp (oneof)|TIMESTAMP 类型的值|
       80 | |durationValue|istio.policy.v1beta1.Duration
       80 | |durationValue|istio.policy.v1beta1.Duration (oneof)|DURATION 类型的值|
       80 | stio.policy.v1beta1.Duration (oneof)|DURATION 类型的值|
       81 | |emailAddressValue|istio.policy.v1beta1.EmailAdd
       81 | |emailAddressValue|istio.policy.v1beta1.EmailAddress (oneof)|EmailAddress 类型的值|
       81 | .policy.v1beta1.EmailAddress (oneof)|EmailAddress 类型的值|
       81 | .v1beta1.EmailAddress (oneof)|EmailAddress 类型的值|
       82 | |dnsNameValue|istio.policy.v1beta1.DNSName
       82 | |dnsNameValue|istio.policy.v1beta1.DNSName (oneof)|DNSName 类型的值|
       82 | istio.policy.v1beta1.DNSName (oneof)|DNSName 类型的值|
       82 | olicy.v1beta1.DNSName (oneof)|DNSName 类型的值|
       83 | |uriValue|istio.policy.v1beta1.Uri (one
       83 | |uriValue|istio.policy.v1beta1.Uri (oneof)|Uri类型的值|
       83 | lue|istio.policy.v1beta1.Uri (oneof)|Uri类型的值|
       83 | io.policy.v1beta1.Uri (oneof)|Uri类型的值|

    content/./zh/docs/reference/config/policy-and-telemetry/templates/kubernetes/index.md
       74 | |`sourceUid`|`string`|源 Pod 的 uid,格式为 `kubernetes://pod.namespa
       76 | inationUid`|`string`|目标 Pod 的 uid,格式为 `kubernetes://pod.namespa

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/signalfx/index.md
        7 | `signalfx` 适配器收集 Istio 指标和 tracespan 并将它们发送到 [SignalFx](https://si
        7 |  Istio 指标和 tracespan 并将它们发送到 [SignalFx](https://signalfx.com)。
        9 | elemetry/templates/metric/)和 [tracespan 模板](/zh/docs/reference/config
       11 | 在发送 tracespan 时,该适配器可以对接收到的 tracespan 进行一些配
       11 | 在发送 tracespan 时,该适配器可以对接收到的 tracespan 进行一些配置来生成发送内容。以下是一个适用的 traces
       11 | cespan 进行一些配置来生成发送内容。以下是一个适用的 tracespan 示例:
       63 | | `metrics` | [Params.MetricConfig[]](#params-metricconfig) | 必选
       63 | rams-metricconfig) | 必选项。要发送到 SignalFx 的指标标准集。如果将 Istio 指标标准配置为发送到此适
       64 | estUrl` | `string` | 可选项。要使用的 SignalFx 接受服务器的 URL。如果未指定,将默认为全局摄取服务器。
       65 | oken` | `string` | 必选项。应接收指标的 SignalFx 组织的访问令牌。|
       66 | | `datapointInterval` | [google.protobuf.Duration](https://developers.google.co
       66 | obuf.Duration) | 可选项。指定将指标发送到 SignalFx 的频率。报告给此适配器的指标标准将作为时间序列进行收集和报
       68 | bool` | 可选项。如果设置为 false,则不会发送 tracespan (除非另行禁用,否则将发送指标标准)。|
       69 | | `uint32` | 可选项。适配器在丢弃之前将缓冲的 tracespan 数。默认为 1000 个 span ,但如果必选项,可以配
       72 | ## Params.MetricConfig
       74 | 描述应以何种形式将哪些指标发送到 SignalFx。
       79 | | `type` | [Params.MetricConfig.Type](#params-metricconfig-type) |
       81 | ## Params.MetricConfig.Type

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/servicecontrol/index.md
        9 | 该适配器支持 [servicecontrolreport](/zh/docs/reference/config/po
        9 | lemetry/templates/quota/) 以及 [apikey](/zh/docs/reference/config/po

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/list/index.md
       35 | |`REGEX`|[re2 规范](https://github.com/google

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/cloudmonitor/index.md
        7 | cloudmonitor` 适配器让 Istio 可以向 [AliCloud CloudMonitor](https://cloudmo
        7 | tor` 适配器让 Istio 可以向 [AliCloud CloudMonitor](https://cloudmonitor.console
        9 | onfigurations will be sent to CloudMonitor.
       13 | 要使用此适配器将指标推送到 CloudMonitor,必须提供 AliCloud 凭证以便使用 AliCloud
       13 | 用此适配器将指标推送到 CloudMonitor,必须提供 AliCloud 凭证以便使用 AliCloud SDK。(参见 [AliC
       13 | dMonitor,必须提供 AliCloud 凭证以便使用 AliCloud SDK。(参见 [AliCloud 官方 SDK](htt
       13 | loud 凭证以便使用 AliCloud SDK。(参见 [AliCloud 官方 SDK](https://github.com/al
       15 | ance 配置包含一致的指标,满足这一要求的指标才会发送给 CloudMonitor。
       25 | | `regiondId` | `string` | AliCloud Cloud Monitor 服务实例所在的一个区域的 ID
       26 | | `accessKeyId` | `string` | AliCloud 访问帐户的访问密钥 ID |
       27 | accessKeySecret` | `string` | AliCloud 访问帐户的访问密钥秘密 |
       28 | | `groupId` | `int64` | AliCloud Cloud Monitor 服务实例中的应用程序组的 ID
       29 | `metricInfo` | `map<string,` [Params.MetricList](#params-metriclist)`>` | Ist
       29 | -metriclist)`>` | Istio 指标名称到 CloudMonitor 指标信息的映射。 |
       31 | ## Params.MetricList
       33 | CloudMonitor 指标格式。参考:[CloudMonitor 自定义指标](
       33 | CloudMonitor 指标格式。参考:[CloudMonitor 自定义指标](https://github.com/ali

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/circonus/index.md
       17 | ionUrl` | `string` | Circonus SubmissionURL 到 HTTPTrap 检查 |
       17 | g` | Circonus SubmissionURL 到 HTTPTrap 检查 |
       18 | | `submissionInterval` | [google.protobuf.Duration](https://developers.google.co
       19 | | `metrics` | [Params.MetricInfo[]](#params-metricinfo) |  |
       21 | ## Params.MetricInfo
       28 | | `type` | [Params.MetricInfo.Type](#params-metricinfo-type) |
       30 | ## Params.MetricInfo.Type

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/statsd/index.md
        7 | `statsd` 适配器让 istio 能够向 [statsd](https://github.c
        7 | `statsd` 适配器让 istio 能够向 [statsd](https://github.com/etsy/stat
       15 | |`address`|`string`|statsd 服务器的地址,例如 `l
       17 | ence/google.protobuf)|这一字段控制向 statsd 服务器发送指标的时间间隔。由上一次指标发送开始,`flus
       18 | 据包尺寸;如果没有指定的话,会使用缺省值 512 字节。如果statsd 服务器是运行在同一个(内部)网络中,建议把这一数值修改为
       20 | 名称和结构的映射关系,名字不在这一列表中的指标不会被发送到 statsd|
       24 | 描述在 statsd 中呈现该指标的方式。
       29 | 来自指标数据中的标签的值会填充这一模板,生成的字符串会用作 statsd 中的指标名称。这样就能比较轻松的生成 statsd 指标名
       29 | 会用作 statsd 中的指标名称。这样就能比较轻松的生成 statsd 指标名称,例如 `action_name-response
       29 | `。该字段为空的情况下,就会使用 Istio 指标名称作为 statsd 的指标名称|
       31 | ## MetricInfo.Type

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/denier/index.md
        9 | 此适配器支持 [checknothing 模板](/zh/docs/reference/config
        9 | try/templates/checknothing/),[listentry 模板](/zh/docs/reference/config
       17 | | `status` | [google.rpc.Status](#google-rpc-status) | 拒绝请求时返
       18 | | `validDuration` | [google.protobuf.Duration](https://developers.google.co
       21 | ## google.rpc.Status
       30 | 三个数据:错误代码,错误消息和错误详细信息。错误代码应为 *google.rpc.Code* 的枚举值,但如果需要,它可能会接受其他错误代码。错误消息
       54 |  `code` | `int32` | 状态代码,应该是 *google.rpc.Code* 的枚举值。|
       56 | | `details` | [google.protobuf.Any[]](https://developers.google.

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/stdio/index.md
        7 | 据。日志和指标能够定向输出到 Mixer 的 stdout、stderror 或者任意本地可达的文件中。当输出到文件时,可以启用日志翻转
       18 | ing,` [`Level`](#level) `>`|从 LogEntry 实例的字符串映射到该适配器支持的日志级别列表,缺省的映射关

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/fluentd/index.md
        9 | 该适配器支持 [logentry template](/zh/docs/reference/

    content/./zh/docs/reference/config/policy-and-telemetry/adapters/memquota/index.md
       17 | |quotas|Params.Quota[]|quota 集合|
       18 | |minDeduplicationDuration|[`google.protobuf.Duration`](
       27 | |maxAmount|int64|配额的上限数量|
       28 | |validDuration|[`google.protobuf.Duration`](
       37 | |maxAmount|int64|配额的上限数量|
       38 | |validDuration|[`google.protobuf.Duration`](

>> 125 spelling errors found in 834 files
geeknoid commented 5 years ago

So right now, we're doing spell checking over the Chinese content using the en-US dictionary. I'm guessing the spell checker ends up looking at only English bits of content and ignores the Chinese part.

I think a lot of the errors you show here are about missing backticks. For example, google.rpc.Status or listentry should be in backticks. This renders the content as code and is skipped by the spell checker.

Beyond that, it'd be great if we can find a Chinese spell checker we can use...

rootsongjc commented 5 years ago

Maybe https://github.com/hustcc/lint-md is a good choice for Chinese markdown docs. @zhongfox from ServiceMesher community has recommended this to me before

rootsongjc commented 5 years ago

/assigin @zhongfox

istio-policy-bot commented 4 years ago

🧭 This issue or pull request has been automatically marked as stale because it has not had activity from an Istio team member since 2019-08-21. It will be closed on 2019-12-04 unless an Istio team member takes action. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.

rootsongjc commented 4 years ago

We have no plan to support Chinese spell checking in the foreseeable future.