ci: add i18n style check script

This commit is contained in:
Zaiming (Stone) Shi 2023-02-08 17:39:55 +01:00
parent 5df667738a
commit 157c919ba1
41 changed files with 788 additions and 1185 deletions

View File

@ -82,6 +82,7 @@ ct: $(REBAR) merge-config
static_checks: static_checks:
@$(REBAR) as check do dialyzer, xref @$(REBAR) as check do dialyzer, xref
@if [ "$${PROFILE}" = 'emqx-enterprise' ]; then $(REBAR) ct --suite apps/emqx/test/emqx_static_checks --readable $(CT_READABLE); fi @if [ "$${PROFILE}" = 'emqx-enterprise' ]; then $(REBAR) ct --suite apps/emqx/test/emqx_static_checks --readable $(CT_READABLE); fi
@if [ "$${PROFILE}" = 'emqx-enterprise' ]; then ./scripts/check-i18n-style.sh; fi
APPS=$(shell $(SCRIPTS)/find-apps.sh) APPS=$(shell $(SCRIPTS)/find-apps.sh)

View File

@ -1,7 +1,9 @@
%% The options in the {server, Opts} tuple are used when calling ssl:ssl_accept/3, %% This additional config file is used when the config 'cluster.proto_dis' in emqx.conf is set to 'inet_tls'.
%% and the options in the {client, Opts} tuple are used when calling ssl:connect/4. %% Which means the EMQX nodes will connect to each other over TLS.
%% %% For more information about inter-broker security, see: https://docs.emqx.com/en/enterprise/v5.0/deploy/cluster/security.html
%% More information at: http://erlang.org/doc/apps/ssl/ssl_distribution.html
%% For more information in technical details see: http://erlang.org/doc/apps/ssl/ssl_distribution.html
[{server, [{server,
[ [
%{log_level, debug}, %% NOTE: debug level logging impacts performance, and need to set EMQX logging level to 'debug' %{log_level, debug}, %% NOTE: debug level logging impacts performance, and need to set EMQX logging level to 'debug'

File diff suppressed because it is too large Load Diff

View File

@ -133,20 +133,16 @@ emqx_authn_jwt {
verify_claims { verify_claims {
desc { desc {
en: """ en: """A list of custom claims to validate, which is a list of name/value pairs.
A list of custom claims to validate, which is a list of name/value pairs.
Values can use the following placeholders: Values can use the following placeholders:
- <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting - <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting
- <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting - <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting
Authentication will verify that the value of claims in the JWT (taken from the Password field) matches what is required in <code>verify_claims</code>. Authentication will verify that the value of claims in the JWT (taken from the Password field) matches what is required in <code>verify_claims</code>."""
""" zh: """需要验证的自定义声明列表,它是一个名称/值对列表。
zh: """
需要验证的自定义声明列表,它是一个名称/值对列表。
值可以使用以下占位符: 值可以使用以下占位符:
- <code>${username}</code>: 将在运行时被替换为客户端连接时使用的用户名 - <code>${username}</code>: 将在运行时被替换为客户端连接时使用的用户名
- <code>${clientid}</code>: 将在运行时被替换为客户端连接时使用的客户端标识符 - <code>${clientid}</code>: 将在运行时被替换为客户端连接时使用的客户端标识符
认证时将验证 JWT取自 Password 字段)中 claims 的值是否与 <code>verify_claims</code> 中要求的相匹配。 认证时将验证 JWT取自 Password 字段)中 claims 的值是否与 <code>verify_claims</code> 中要求的相匹配。"""
"""
} }
label { label {
en: """Verify Claims""" en: """Verify Claims"""

View File

@ -33,18 +33,14 @@ emqx_authn_mongodb {
filter { filter {
desc { desc {
en: """ en: """Conditional expression that defines the filter condition in the query.
Conditional expression that defines the filter condition in the query.
Filter supports the following placeholders: Filter supports the following placeholders:
- <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting - <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting
- <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting - <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting"""
""" zh: """在查询中定义过滤条件的条件表达式。
zh: """
在查询中定义过滤条件的条件表达式。
过滤器支持如下占位符: 过滤器支持如下占位符:
- <code>${username}</code>: 将在运行时被替换为客户端连接时使用的用户名 - <code>${username}</code>: 将在运行时被替换为客户端连接时使用的用户名
- <code>${clientid}</code>: 将在运行时被替换为客户端连接时使用的客户端标识符 - <code>${clientid}</code>: 将在运行时被替换为客户端连接时使用的客户端标识符"""
"""
} }
label: { label: {
en: """Filter""" en: """Filter"""

View File

@ -121,18 +121,14 @@ emqx_authz_api_schema {
filter { filter {
desc { desc {
en: """ en: """Conditional expression that defines the filter condition in the query.
Conditional expression that defines the filter condition in the query.
Filter supports the following placeholders: Filter supports the following placeholders:
- <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting - <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting;
- <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting - <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting."""
""" zh: """在查询中定义过滤条件的条件表达式。
zh: """
在查询中定义过滤条件的条件表达式。
过滤器支持如下占位符: 过滤器支持如下占位符:
- <code>${username}</code>: 将在运行时被替换为客户端连接时使用的用户名 - <code>${username}</code>: 将在运行时被替换为客户端连接时使用的用户名
- <code>${clientid}</code>: 将在运行时被替换为客户端连接时使用的客户端标识符 - <code>${clientid}</code>: 将在运行时被替换为客户端连接时使用的客户端标识符"""
"""
} }
label { label {
en: """Filter""" en: """Filter"""

View File

@ -1,8 +1,7 @@
emqx_authz_schema { emqx_authz_schema {
sources { sources {
desc { desc {
en: """ en: """Authorization data sources.<br/>
Authorization data sources.<br/>
An array of authorization (ACL) data providers. An array of authorization (ACL) data providers.
It is designed as an array, not a hash-map, so the sources can be It is designed as an array, not a hash-map, so the sources can be
ordered to form a chain of access controls.<br/> ordered to form a chain of access controls.<br/>
@ -18,10 +17,9 @@ the default action configured in 'authorization.no_match' is applied.<br/>
NOTE: NOTE:
The source elements are identified by their 'type'. The source elements are identified by their 'type'.
It is NOT allowed to configure two or more sources of the same type. It is NOT allowed to configure two or more sources of the same type."""
"""
zh: """ zh: """授权数据源。<br/>
授权数据源。<br/>
授权ACL数据源的列表。 授权ACL数据源的列表。
它被设计为一个数组,而不是一个散列映射, 它被设计为一个数组,而不是一个散列映射,
所以可以作为链式访问控制。<br/> 所以可以作为链式访问控制。<br/>
@ -36,8 +34,7 @@ It is NOT allowed to configure two or more sources of the same type.
注意: 注意:
数据源使用 'type' 进行标识。 数据源使用 'type' 进行标识。
使用同一类型的数据源多于一次不被允许。 使用同一类型的数据源多于一次不被允许。"""
"""
} }
label { label {
en: """sources""" en: """sources"""
@ -93,18 +90,15 @@ It is NOT allowed to configure two or more sources of the same type.
path { path {
desc { desc {
en: """ en: """Path to the file which contains the ACL rules.
Path to the file which contains the ACL rules.
If the file provisioned before starting EMQX node, If the file provisioned before starting EMQX node,
it can be placed anywhere as long as EMQX has read access to it. it can be placed anywhere as long as EMQX has read access to it.
That is, EMQX will treat it as read only. That is, EMQX will treat it as read only.
In case the rule-set is created or updated from EMQX Dashboard or HTTP API, In case the rule-set is created or updated from EMQX Dashboard or HTTP API,
a new file will be created and placed in `authz` subdirectory inside EMQX's `data_dir`, a new file will be created and placed in `authz` subdirectory inside EMQX's `data_dir`,
and the old file will not be used anymore. and the old file will not be used anymore."""
""" zh: """包含 ACL 规则的文件路径。
zh: """
包含 ACL 规则的文件路径。
如果在启动 EMQX 节点前预先配置该路径, 如果在启动 EMQX 节点前预先配置该路径,
那么可以将该文件置于任何 EMQX 可以访问到的位置。 那么可以将该文件置于任何 EMQX 可以访问到的位置。
@ -269,18 +263,14 @@ and the old file will not be used anymore.
filter { filter {
desc { desc {
en: """ en: """Conditional expression that defines the filter condition in the query.
Conditional expression that defines the filter condition in the query. Filter supports the following placeholders<br/>
Filter supports the following placeholders: - <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting<br/>
- <code>${username}</code>: Will be replaced at runtime with <code>Username</code> used by the client when connecting - <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting"""
- <code>${clientid}</code>: Will be replaced at runtime with <code>Client ID</code> used by the client when connecting zh: """在查询中定义过滤条件的条件表达式。
""" 过滤器支持如下占位符:<br/>
zh: """ - <code>${username}</code>:将在运行时被替换为客户端连接时使用的用户名<br/>
在查询中定义过滤条件的条件表达式。 - <code>${clientid}</code>:将在运行时被替换为客户端连接时使用的客户端标识符"""
过滤器支持如下占位符:
- <code>${username}</code>:将在运行时被替换为客户端连接时使用的用户名
- <code>${clientid}</code>:将在运行时被替换为客户端连接时使用的客户端标识符
"""
} }
label { label {
en: """Filter""" en: """Filter"""

View File

@ -57,7 +57,7 @@ emqx_bridge_api {
desc_api1 { desc_api1 {
desc { desc {
en: """List all created bridges""" en: """List all created bridges"""
zh: """列出所有 Birdge """ zh: """列出所有 Birdge"""
} }
label: { label: {
en: "List All Bridges" en: "List All Bridges"
@ -144,14 +144,10 @@ emqx_bridge_api {
desc_api9 { desc_api9 {
desc { desc {
en: """ en: """Test creating a new bridge by given ID </br>
Test creating a new bridge by given ID </br> The ID must be of format '{type}:{name}'"""
The ID must be of format '{type}:{name}' zh: """通过给定的 ID 测试创建一个新的桥接。 </br>
""" ID 的格式必须为 {type}:{name}”"""
zh: """
通过给定的 ID 测试创建一个新的桥接。 </br>
ID 的格式必须为 {type}:{name}”
"""
} }
label: { label: {
en: "Test Bridge Creation" en: "Test Bridge Creation"

View File

@ -22,22 +22,18 @@ emqx_bridge_webhook_schema {
} }
config_url { config_url {
desc { desc {
en: """ en: """The URL of the HTTP Bridge.<br/>
The URL of the HTTP Bridge.<br/>
Template with variables is allowed in the path, but variables cannot be used in the scheme, host, Template with variables is allowed in the path, but variables cannot be used in the scheme, host,
or port part.<br/> or port part.<br/>
For example, <code> http://localhost:9901/${topic} </code> is allowed, but For example, <code> http://localhost:9901/${topic} </code> is allowed, but
<code> http://${host}:9901/message </code> or <code> http://localhost:${port}/message </code> <code> http://${host}:9901/message </code> or <code> http://localhost:${port}/message </code>
is not allowed. is not allowed."""
""" zh: """HTTP Bridge 的 URL。<br/>
zh: """
HTTP Bridge 的 URL。<br/>
路径中允许使用带变量的模板,但是 host port 不允许使用变量模板。<br/> 路径中允许使用带变量的模板,但是 host port 不允许使用变量模板。<br/>
例如,<code> http://localhost:9901/${topic} </code> 是允许的, 例如,<code> http://localhost:9901/${topic} </code> 是允许的,
但是<code> http://${host}:9901/message </code> 但是<code> http://${host}:9901/message </code>
或 <code> http://localhost:${port}/message </code> 或 <code> http://localhost:${port}/message </code>
不允许。 不允许。"""
"""
} }
label: { label: {
en: "HTTP Bridge" en: "HTTP Bridge"
@ -47,17 +43,13 @@ HTTP Bridge 的 URL。<br/>
config_local_topic { config_local_topic {
desc { desc {
en: """ en: """The MQTT topic filter to be forwarded to the HTTP server. All MQTT 'PUBLISH' messages with the topic
The MQTT topic filter to be forwarded to the HTTP server. All MQTT 'PUBLISH' messages with the topic
matching the local_topic will be forwarded.<br/> matching the local_topic will be forwarded.<br/>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
""" zh: """发送到 'local_topic' 的消息都会转发到 HTTP 服务器。 <br/>
zh: """ 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HTTP 服务器。"""
发送到 'local_topic' 的消息都会转发到 HTTP 服务器。 <br/>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HTTP 服务器。
"""
} }
label: { label: {
en: "Local Topic" en: "Local Topic"
@ -67,13 +59,10 @@ will be forwarded.
config_method { config_method {
desc { desc {
en: """ en: """The method of the HTTP request. All the available methods are: post, put, get, delete.<br/>
The method of the HTTP request. All the available methods are: post, put, get, delete.<br/> Template with variables is allowed."""
Template with variables is allowed.<br/> zh: """HTTP 请求的方法。 所有可用的方法包括post、put、get、delete。<br/>
""" 允许使用带有变量的模板。"""
zh: """
HTTP 请求的方法。 所有可用的方法包括post、put、get、delete。<br/>
允许使用带有变量的模板。<br/>"""
} }
label: { label: {
en: "HTTP Method" en: "HTTP Method"
@ -83,14 +72,10 @@ HTTP 请求的方法。 所有可用的方法包括post、put、get、delete
config_headers { config_headers {
desc { desc {
en: """ en: """The headers of the HTTP request.<br/>
The headers of the HTTP request.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """HTTP 请求的标头。<br/>
""" 允许使用带有变量的模板。"""
zh: """
HTTP 请求的标头。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "HTTP Header" en: "HTTP Header"
@ -100,22 +85,18 @@ HTTP 请求的标头。<br/>
config_body { config_body {
desc { desc {
en: """ en: """The body of the HTTP request.<br/>
The body of the HTTP request.<br/>
If not provided, the body will be a JSON object of all the available fields.<br/> If not provided, the body will be a JSON object of all the available fields.<br/>
There, 'all the available fields' means the context of a MQTT message when There, 'all the available fields' means the context of a MQTT message when
this webhook is triggered by receiving a MQTT message (the `local_topic` is set), this webhook is triggered by receiving a MQTT message (the `local_topic` is set),
or the context of the event when this webhook is triggered by a rule (i.e. this or the context of the event when this webhook is triggered by a rule (i.e. this
webhook is used as an action of a rule).<br/> webhook is used as an action of a rule).<br/>
Template with variables is allowed. Template with variables is allowed."""
""" zh: """HTTP 请求的正文。<br/>
zh: """
HTTP 请求的正文。<br/>
如果没有设置该字段,请求正文将是包含所有可用字段的 JSON object。<br/> 如果没有设置该字段,请求正文将是包含所有可用字段的 JSON object。<br/>
如果该 webhook 是由于收到 MQTT 消息触发的,'所有可用字段' 将是 MQTT 消息的 如果该 webhook 是由于收到 MQTT 消息触发的,'所有可用字段' 将是 MQTT 消息的
上下文信息;如果该 webhook 是由于规则触发的,'所有可用字段' 则为触发事件的上下文信息。<br/> 上下文信息;如果该 webhook 是由于规则触发的,'所有可用字段' 则为触发事件的上下文信息。<br/>
允许使用带有变量的模板。 允许使用带有变量的模板。"""
"""
} }
label: { label: {
en: "HTTP Body" en: "HTTP Body"

View File

@ -15,12 +15,11 @@ emqx_conf_schema {
desc { desc {
en: """Maximum number of simultaneously existing processes for this Erlang system. en: """Maximum number of simultaneously existing processes for this Erlang system.
The actual maximum chosen may be much larger than the Number passed. The actual maximum chosen may be much larger than the Number passed.
For more information, see: https://www.erlang.org/doc/man/erl.html For more information, see: https://www.erlang.org/doc/man/erl.html"""
"""
zh: """Erlang系统同时存在的最大进程数。 zh: """Erlang系统同时存在的最大进程数。
实际选择的最大值可能比设置的数字大得多。 实际选择的最大值可能比设置的数字大得多。
参考: https://www.erlang.org/doc/man/erl.html 参考: https://www.erlang.org/doc/man/erl.html"""
"""
} }
label { label {
en: "Erlang Process Limit" en: "Erlang Process Limit"
@ -32,12 +31,11 @@ For more information, see: https://www.erlang.org/doc/man/erl.html
desc { desc {
en: """Maximum number of simultaneously existing ports for this Erlang system. en: """Maximum number of simultaneously existing ports for this Erlang system.
The actual maximum chosen may be much larger than the Number passed. The actual maximum chosen may be much larger than the Number passed.
For more information, see: https://www.erlang.org/doc/man/erl.html For more information, see: https://www.erlang.org/doc/man/erl.html"""
"""
zh: """Erlang系统同时存在的最大端口数。 zh: """Erlang系统同时存在的最大端口数。
实际选择的最大值可能比设置的数字大得多。 实际选择的最大值可能比设置的数字大得多。
参考: https://www.erlang.org/doc/man/erl.html 参考: https://www.erlang.org/doc/man/erl.html"""
"""
} }
label { label {
en: "Erlang Port Limit" en: "Erlang Port Limit"
@ -69,15 +67,19 @@ For more information, see: https://www.erlang.org/doc/man/erl.html
cluster_discovery_strategy { cluster_discovery_strategy {
desc { desc {
en: """Service discovery method for the cluster nodes.""" en: """Service discovery method for the cluster nodes. Possible values are:
- manual: Use <code>emqx ctl cluster</code> command to manage cluster.<br/>
- static: Configure static nodes list by setting <code>seeds</code> in config file.<br/>
- dns: Use DNS A record to discover peer nodes.<br/>
- etcd: Use etcd to discover peer nodes.<br/>
- k8s: Use Kubernetes API to discover peer pods."""
zh: """集群节点发现方式。可选值为: zh: """集群节点发现方式。可选值为:
- manual: 手动加入集群<br/> - manual: 使用 <code>emqx ctl cluster</code> 命令管理集群。<br/>
- static: 配置静态节点。配置几个固定的节点,新节点通过连接固定节点中的某一个来加入集群。<br/> - static: 配置静态节点。配置几个固定的节点,新节点通过连接固定节点中的某一个来加入集群。<br/>
- mcast: 使用 UDP 多播的方式发现节点。<br/>
- dns: 使用 DNS A 记录的方式发现节点。<br/> - dns: 使用 DNS A 记录的方式发现节点。<br/>
- etcd: 使用 etcd 发现节点。<br/> - etcd: 使用 etcd 发现节点。<br/>
- k8s: 使用 Kubernetes 发现节点。<br/> - k8s: 使用 Kubernetes API 发现节点。"""
"""
} }
label { label {
en: "Cluster Discovery Strategy" en: "Cluster Discovery Strategy"
@ -109,12 +111,12 @@ For more information, see: https://www.erlang.org/doc/man/erl.html
cluster_proto_dist { cluster_proto_dist {
desc { desc {
en: """The Erlang distribution protocol for the cluster.""" en: """The Erlang distribution protocol for the cluster.<br/>
zh: """分布式 Erlang 集群协议类型。可选值为: - inet_tcp: IPv4 TCP <br/>
- inet_tls: IPv4 TLS, works together with <code>etc/ssl_dist.conf</code>"""
zh: """分布式 Erlang 集群协议类型。可选值为:<br/>
- inet_tcp: 使用 IPv4 <br/> - inet_tcp: 使用 IPv4 <br/>
- inet6_tcp 使用 IPv6 <br/> - inet_tls: 使用 TLS需要配合 <code>etc/ssl_dist.conf</code> 一起使用。"""
- inet_tls: 使用 TLS需要与 node.ssl_dist_optfile 配置一起使用。<br/>
"""
} }
label { label {
en: "Cluster Protocol Distribution" en: "Cluster Protocol Distribution"
@ -128,8 +130,7 @@ For more information, see: https://www.erlang.org/doc/man/erl.html
zh: """集群中的EMQX节点名称列表 zh: """集群中的EMQX节点名称列表
指定固定的节点列表,多个节点间使用逗号 , 分隔。 指定固定的节点列表,多个节点间使用逗号 , 分隔。
当 cluster.discovery_strategy 为 static 时,此配置项才有效。 当 cluster.discovery_strategy 为 static 时,此配置项才有效。
适合于节点数量较少且固定的集群。 适合于节点数量较少且固定的集群。"""
"""
} }
label { label {
en: "Cluster Static Seeds" en: "Cluster Static Seeds"
@ -141,8 +142,7 @@ For more information, see: https://www.erlang.org/doc/man/erl.html
desc { desc {
en: """Multicast IPv4 address.""" en: """Multicast IPv4 address."""
zh: """指定多播 IPv4 地址。 zh: """指定多播 IPv4 地址。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Multicast Address" en: "Cluster Multicast Address"
@ -153,11 +153,10 @@ For more information, see: https://www.erlang.org/doc/man/erl.html
cluster_mcast_ports { cluster_mcast_ports {
desc { desc {
en: """List of UDP ports used for service discovery.<br/> en: """List of UDP ports used for service discovery.<br/>
Note: probe messages are broadcast to all the specified ports. Note: probe messages are broadcast to all the specified ports."""
"""
zh: """指定多播端口。如有多个端口使用逗号 , 分隔。 zh: """指定多播端口。如有多个端口使用逗号 , 分隔。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Multicast Ports" en: "Cluster Multicast Ports"
@ -169,8 +168,7 @@ Note: probe messages are broadcast to all the specified ports.
desc { desc {
en: """Local IP address the node discovery service needs to bind to.""" en: """Local IP address the node discovery service needs to bind to."""
zh: """指定节点发现服务需要绑定到本地 IP 地址。 zh: """指定节点发现服务需要绑定到本地 IP 地址。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Multicast Interface" en: "Cluster Multicast Interface"
@ -182,8 +180,7 @@ Note: probe messages are broadcast to all the specified ports.
desc { desc {
en: """Time-to-live (TTL) for the outgoing UDP datagrams.""" en: """Time-to-live (TTL) for the outgoing UDP datagrams."""
zh: """指定多播的 Time-To-Live 值。 zh: """指定多播的 Time-To-Live 值。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Multicast TTL" en: "Cluster Multicast TTL"
@ -195,8 +192,7 @@ Note: probe messages are broadcast to all the specified ports.
desc { desc {
en: """If <code>true</code>, loop UDP datagrams back to the local socket.""" en: """If <code>true</code>, loop UDP datagrams back to the local socket."""
zh: """设置多播的报文是否投递到本地回环地址。 zh: """设置多播的报文是否投递到本地回环地址。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Multicast Loop" en: "Cluster Multicast Loop"
@ -208,8 +204,7 @@ Note: probe messages are broadcast to all the specified ports.
desc { desc {
en: """Size of the kernel-level buffer for outgoing datagrams.""" en: """Size of the kernel-level buffer for outgoing datagrams."""
zh: """外发数据报的内核级缓冲区的大小。 zh: """外发数据报的内核级缓冲区的大小。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Muticast Sendbuf" en: "Cluster Muticast Sendbuf"
@ -221,8 +216,7 @@ Note: probe messages are broadcast to all the specified ports.
desc { desc {
en: """Size of the kernel-level buffer for incoming datagrams.""" en: """Size of the kernel-level buffer for incoming datagrams."""
zh: """接收数据报的内核级缓冲区的大小。 zh: """接收数据报的内核级缓冲区的大小。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Muticast Sendbuf" en: "Cluster Muticast Sendbuf"
@ -234,8 +228,7 @@ Note: probe messages are broadcast to all the specified ports.
desc { desc {
en: """Size of the user-level buffer.""" en: """Size of the user-level buffer."""
zh: """用户级缓冲区的大小。 zh: """用户级缓冲区的大小。
当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Muticast Buffer" en: "Cluster Muticast Buffer"
@ -246,11 +239,9 @@ Note: probe messages are broadcast to all the specified ports.
cluster_dns_name { cluster_dns_name {
desc { desc {
en: """The domain name from which to discover peer EMQX nodes' IP addresses. en: """The domain name from which to discover peer EMQX nodes' IP addresses.
Applicable when <code>cluster.discovery_strategy = dns</code> Applicable when <code>cluster.discovery_strategy = dns</code>"""
"""
zh: """指定 DNS A 记录的名字。emqx 会通过访问这个 DNS A 记录来获取 IP 地址列表。 zh: """指定 DNS A 记录的名字。emqx 会通过访问这个 DNS A 记录来获取 IP 地址列表。
当<code>cluster.discovery_strategy</code> 为 <code>dns</code> 时有效。 当<code>cluster.discovery_strategy</code> 为 <code>dns</code> 时有效。"""
"""
} }
label { label {
en: "Cluster Dns Name" en: "Cluster Dns Name"
@ -260,7 +251,7 @@ Applicable when <code>cluster.discovery_strategy = dns</code>
cluster_dns_record_type { cluster_dns_record_type {
desc { desc {
en: """DNS record type. """ en: """DNS record type."""
zh: """DNS 记录类型。""" zh: """DNS 记录类型。"""
} }
label { label {
@ -273,8 +264,7 @@ Applicable when <code>cluster.discovery_strategy = dns</code>
desc { desc {
en: """List of endpoint URLs of the etcd cluster""" en: """List of endpoint URLs of the etcd cluster"""
zh: """指定 etcd 服务的地址。如有多个服务使用逗号 , 分隔。 zh: """指定 etcd 服务的地址。如有多个服务使用逗号 , 分隔。
当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Etcd Server" en: "Cluster Etcd Server"
@ -287,8 +277,7 @@ Applicable when <code>cluster.discovery_strategy = dns</code>
en: """Key prefix used for EMQX service discovery.""" en: """Key prefix used for EMQX service discovery."""
zh: """指定 etcd 路径的前缀。每个节点在 etcd 中都会创建一个路径: zh: """指定 etcd 路径的前缀。每个节点在 etcd 中都会创建一个路径:
v2/keys/<prefix>/<cluster.name>/<node.name> <br/> v2/keys/<prefix>/<cluster.name>/<node.name> <br/>
当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Etcd Prefix" en: "Cluster Etcd Prefix"
@ -299,11 +288,10 @@ v2/keys/<prefix>/<cluster.name>/<node.name> <br/>
cluster_etcd_node_ttl { cluster_etcd_node_ttl {
desc { desc {
en: """Expiration time of the etcd key associated with the node. en: """Expiration time of the etcd key associated with the node.
It is refreshed automatically, as long as the node is alive. It is refreshed automatically, as long as the node is alive."""
"""
zh: """指定 etcd 中节点信息的过期时间。 zh: """指定 etcd 中节点信息的过期时间。
当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Etcd Node TTL" en: "Cluster Etcd Node TTL"
@ -315,8 +303,7 @@ It is refreshed automatically, as long as the node is alive.
desc { desc {
en: """Options for the TLS connection to the etcd cluster.""" en: """Options for the TLS connection to the etcd cluster."""
zh: """当使用 TLS 连接 etcd 时的配置选项。 zh: """当使用 TLS 连接 etcd 时的配置选项。
当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster Etcd SSL Option" en: "Cluster Etcd SSL Option"
@ -328,8 +315,7 @@ It is refreshed automatically, as long as the node is alive.
desc { desc {
en: """Kubernetes API endpoint URL.""" en: """Kubernetes API endpoint URL."""
zh: """指定 Kubernetes API Server。如有多个 Server 使用逗号 , 分隔。 zh: """指定 Kubernetes API Server。如有多个 Server 使用逗号 , 分隔。
当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。 当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。"""
"""
} }
label { label {
en: "Cluster k8s ApiServer" en: "Cluster k8s ApiServer"
@ -341,8 +327,7 @@ It is refreshed automatically, as long as the node is alive.
desc { desc {
en: """EMQX broker service name.""" en: """EMQX broker service name."""
zh: """指定 Kubernetes 中 EMQX 的服务名。 zh: """指定 Kubernetes 中 EMQX 的服务名。
当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。 当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。"""
"""
} }
label { label {
en: "K8s Service Name" en: "K8s Service Name"
@ -354,12 +339,11 @@ It is refreshed automatically, as long as the node is alive.
desc { desc {
en: """Address type used for connecting to the discovered nodes. en: """Address type used for connecting to the discovered nodes.
Setting <code>cluster.k8s.address_type</code> to <code>ip</code> will Setting <code>cluster.k8s.address_type</code> to <code>ip</code> will
make EMQX to discover IP addresses of peer nodes from Kubernetes API. make EMQX to discover IP addresses of peer nodes from Kubernetes API."""
"""
zh: """当使用 k8s 方式集群时address_type 用来从 Kubernetes 接口的应答里获取什么形式的 Host 列表。 zh: """当使用 k8s 方式集群时address_type 用来从 Kubernetes 接口的应答里获取什么形式的 Host 列表。
指定 <code>cluster.k8s.address_type</code> 为 <code>ip</code>,则将从 Kubernetes 接口中获取集群中其他节点 指定 <code>cluster.k8s.address_type</code> 为 <code>ip</code>,则将从 Kubernetes 接口中获取集群中其他节点
的IP地址。 的IP地址。"""
"""
} }
label { label {
en: "K8s Address Type" en: "K8s Address Type"
@ -371,8 +355,7 @@ make EMQX to discover IP addresses of peer nodes from Kubernetes API.
desc { desc {
en: """Kubernetes namespace.""" en: """Kubernetes namespace."""
zh: """当使用 k8s 方式并且 cluster.k8s.address_type 指定为 dns 类型时, zh: """当使用 k8s 方式并且 cluster.k8s.address_type 指定为 dns 类型时,
可设置 emqx 节点名的命名空间。与 cluster.k8s.suffix 一起使用用以拼接得到节点名列表。 可设置 emqx 节点名的命名空间。与 cluster.k8s.suffix 一起使用用以拼接得到节点名列表。"""
"""
} }
label { label {
en: "K8s Namespace" en: "K8s Namespace"
@ -386,8 +369,7 @@ make EMQX to discover IP addresses of peer nodes from Kubernetes API.
Note: this parameter is only relevant when <code>address_type</code> is <code>dns</code> Note: this parameter is only relevant when <code>address_type</code> is <code>dns</code>
or <code>hostname</code>.""" or <code>hostname</code>."""
zh: """当使用 k8s 方式并且 cluster.k8s.address_type 指定为 dns 类型时,可设置 emqx 节点名的后缀。 zh: """当使用 k8s 方式并且 cluster.k8s.address_type 指定为 dns 类型时,可设置 emqx 节点名的后缀。
与 cluster.k8s.namespace 一起使用用以拼接得到节点名列表。 与 cluster.k8s.namespace 一起使用用以拼接得到节点名列表。"""
"""
} }
label { label {
en: "K8s Suffix" en: "K8s Suffix"
@ -398,11 +380,9 @@ or <code>hostname</code>."""
node_name { node_name {
desc { desc {
en: """Unique name of the EMQX node. It must follow <code>%name%@FQDN</code> or en: """Unique name of the EMQX node. It must follow <code>%name%@FQDN</code> or
<code>%name%@IPv4</code> format. <code>%name%@IPv4</code> format."""
"""
zh: """节点名。格式为 \<name>@\<host>。其中 <host> 可以是 IP 地址,也可以是 FQDN。 zh: """节点名。格式为 \<name>@\<host>。其中 <host> 可以是 IP 地址,也可以是 FQDN。
详见 http://erlang.org/doc/reference_manual/distributed.html。 详见 http://erlang.org/doc/reference_manual/distributed.html。"""
"""
} }
label { label {
en: "Node Name" en: "Node Name"
@ -425,8 +405,7 @@ belong to different clusters from accidentally connecting to each other."""
node_data_dir { node_data_dir {
desc { desc {
en: """ en: """Path to the persistent data directory.<br/>
Path to the persistent data directory.<br/>
Possible auto-created subdirectories are:<br/> Possible auto-created subdirectories are:<br/>
- `mnesia/<node_name>`: EMQX's built-in database directory.<br/> - `mnesia/<node_name>`: EMQX's built-in database directory.<br/>
For example, `mnesia/emqx@127.0.0.1`.<br/> For example, `mnesia/emqx@127.0.0.1`.<br/>
@ -437,18 +416,17 @@ the old dir should be deleted first.<br/>
- `patches`: Hot-patch beam files are to be placed here.<br/> - `patches`: Hot-patch beam files are to be placed here.<br/>
- `trace`: Trace log files.<br/> - `trace`: Trace log files.<br/>
**NOTE**: One data dir cannot be shared by two or more EMQX nodes. **NOTE**: One data dir cannot be shared by two or more EMQX nodes."""
"""
zh: """ zh: """节点数据存放目录,可能会自动创建的子目录如下:<br/>
节点数据存放目录,可能会自动创建的子目录如下:<br/>
- `mnesia/<node_name>`。EMQX的内置数据库目录。例如`mnesia/emqx@127.0.0.1`。<br/> - `mnesia/<node_name>`。EMQX的内置数据库目录。例如`mnesia/emqx@127.0.0.1`。<br/>
如果节点要被重新命名(例如,`emqx@10.0.1.1`)。旧目录应该首先被删除。<br/> 如果节点要被重新命名(例如,`emqx@10.0.1.1`)。旧目录应该首先被删除。<br/>
- `configs`。在启动时生成的配置,以及集群/本地覆盖的配置。<br/> - `configs`。在启动时生成的配置,以及集群/本地覆盖的配置。<br/>
- `patches`: 热补丁文件将被放在这里。<br/> - `patches`: 热补丁文件将被放在这里。<br/>
- `trace`: 日志跟踪文件。<br/> - `trace`: 日志跟踪文件。<br/>
**注意**: 一个数据dir不能被两个或更多的EMQX节点同时使用。 **注意**: 一个数据dir不能被两个或更多的EMQX节点同时使用。"""
"""
} }
label { label {
en: "Node Data Dir" en: "Node Data Dir"
@ -480,16 +458,15 @@ the old dir should be deleted first.<br/>
node_crash_dump_seconds { node_crash_dump_seconds {
desc { desc {
en: """This variable gives the number of seconds that the emulator is allowed to spend writing a crash dump. When the given number of seconds have elapsed, the emulator is terminated. en: """This variable gives the number of seconds that the emulator is allowed to spend writing a crash dump. When the given number of seconds have elapsed, the emulator is terminated.<br/>
- If setting to 0 seconds, the runtime system does not even attempt to write the crash dump file. It only terminates. - If setting to 0 seconds, the runtime system does not even attempt to write the crash dump file. It only terminates.<br/>
- If setting to a positive value S, wait for S seconds to complete the crash dump file and then terminates the runtime system with a SIGALRM signal. - If setting to a positive value S, wait for S seconds to complete the crash dump file and then terminates the runtime system with a SIGALRM signal.<br/>
- A negative value causes the termination of the runtime system to wait indefinitely until the crash dump file has been completely written. - A negative value causes the termination of the runtime system to wait indefinitely until the crash dump file has been completely written."""
"""
zh: """该配置给出了运行时系统允许花费的写入崩溃转储的秒数。当给定的秒数已经过去,运行时系统将被终止。 zh: """该配置给出了运行时系统允许花费的写入崩溃转储的秒数。当给定的秒数已经过去,运行时系统将被终止。<br/>
- 如果设置为0秒运行时会立即终止不会尝试写入崩溃转储文件。 - 如果设置为0秒运行时会立即终止不会尝试写入崩溃转储文件。<br/>
- 如果设置为一个正数 S节点会等待 S 秒来完成崩溃转储文件然后用SIGALRM信号终止运行时系统。 - 如果设置为一个正数 S节点会等待 S 秒来完成崩溃转储文件然后用SIGALRM信号终止运行时系统。<br/>
- 如果设置为一个负值导致运行时系统的终止等待无限期地直到崩溃转储文件已经完全写入。 - 如果设置为一个负值导致运行时系统的终止等待无限期地直到崩溃转储文件已经完全写入。"""
"""
} }
label { label {
en: "Crash Dump Seconds" en: "Crash Dump Seconds"
@ -501,12 +478,11 @@ the old dir should be deleted first.<br/>
desc { desc {
en: """This variable sets the maximum size of a crash dump file in bytes. en: """This variable sets the maximum size of a crash dump file in bytes.
The crash dump will be truncated if this limit is exceeded. The crash dump will be truncated if this limit is exceeded.
If setting it to 0, the runtime system does not even attempt to write a crash dump file. If setting it to 0, the runtime system does not even attempt to write a crash dump file."""
"""
zh: """限制崩溃文件的大小,当崩溃时节点内存太大, zh: """限制崩溃文件的大小,当崩溃时节点内存太大,
如果为了保存现场,需要全部存到崩溃文件中,此处限制最多能保存多大的文件。 如果为了保存现场,需要全部存到崩溃文件中,此处限制最多能保存多大的文件。
如果超过此限制崩溃转储将被截断。如果设置为0系统不会尝试写入崩溃转储文件。 如果超过此限制崩溃转储将被截断。如果设置为0系统不会尝试写入崩溃转储文件。"""
"""
} }
label { label {
en: "Crash Dump Bytes" en: "Crash Dump Bytes"
@ -517,8 +493,7 @@ If setting it to 0, the runtime system does not even attempt to write a crash du
node_dist_net_ticktime { node_dist_net_ticktime {
desc { desc {
en: """This is the approximate time an EMQX node may be unresponsive until it is considered down and thereby disconnected.""" en: """This is the approximate time an EMQX node may be unresponsive until it is considered down and thereby disconnected."""
zh: """系统调优参数,此配置将覆盖 vm.args 文件里的 -kernel net_ticktime 参数。当一个节点持续无响应多久之后,认为其已经宕机并断开连接。 zh: """系统调优参数,此配置将覆盖 vm.args 文件里的 -kernel net_ticktime 参数。当一个节点持续无响应多久之后,认为其已经宕机并断开连接。"""
"""
} }
label { label {
en: "Dist Net TickTime" en: "Dist Net TickTime"
@ -529,8 +504,7 @@ If setting it to 0, the runtime system does not even attempt to write a crash du
node_backtrace_depth { node_backtrace_depth {
desc { desc {
en: """Maximum depth of the call stack printed in error messages and en: """Maximum depth of the call stack printed in error messages and
<code>process_info</code>. <code>process_info</code>."""
"""
zh: """错误信息中打印的最大堆栈层数""" zh: """错误信息中打印的最大堆栈层数"""
} }
label { label {
@ -539,10 +513,10 @@ If setting it to 0, the runtime system does not even attempt to write a crash du
} }
} }
# TODO: check if this is still needed
node_applications { node_applications {
desc { desc {
en: """List of Erlang applications that shall be rebooted when the EMQX broker joins the cluster. en: """List of Erlang applications that shall be rebooted when the EMQX broker joins the cluster."""
"""
zh: """当新EMQX 加入集群时应重启的Erlang应用程序的列表。""" zh: """当新EMQX 加入集群时应重启的Erlang应用程序的列表。"""
} }
label { label {
@ -551,6 +525,7 @@ If setting it to 0, the runtime system does not even attempt to write a crash du
} }
} }
# deprecated, TODO: remove
node_etc_dir { node_etc_dir {
desc { desc {
en: """<code>etc</code> dir for the node""" en: """<code>etc</code> dir for the node"""
@ -564,15 +539,12 @@ If setting it to 0, the runtime system does not even attempt to write a crash du
db_backend { db_backend {
desc { desc {
en: """ en: """Select the backend for the embedded database.<br/>
Select the backend for the embedded database.<br/>
<code>rlog</code> is the default backend, <code>rlog</code> is the default backend,
that is suitable for very large clusters.<br/> that is suitable for very large clusters.<br/>
<code>mnesia</code> is a backend that offers decent performance in small clusters. <code>mnesia</code> is a backend that offers decent performance in small clusters."""
""" zh: """配置后端数据库驱动,默认值为 <code>rlog</code> 它适用于大规模的集群。
zh: """ rlog是默认的数据库他适用于大规模的集群。 <code>mnesia</code> 是备选数据库,适合中小集群。"""
mnesia是备选数据库在小集群中提供了很好的性能。
"""
} }
label { label {
en: "DB Backend" en: "DB Backend"
@ -582,23 +554,19 @@ mnesia是备选数据库在小集群中提供了很好的性能。
db_role { db_role {
desc { desc {
en: """ en: """Select a node role.<br/>
Select a node role.<br/>
<code>core</code> nodes provide durability of the data, and take care of writes. <code>core</code> nodes provide durability of the data, and take care of writes.
It is recommended to place core nodes in different racks or different availability zones.<br/> It is recommended to place core nodes in different racks or different availability zones.<br/>
<code>replicant</code> nodes are ephemeral worker nodes. Removing them from the cluster <code>replicant</code> nodes are ephemeral worker nodes. Removing them from the cluster
doesn't affect database redundancy<br/> doesn't affect database redundancy<br/>
It is recommended to have more replicant nodes than core nodes.<br/> It is recommended to have more replicant nodes than core nodes.<br/>
Note: this parameter only takes effect when the <code>backend</code> is set Note: this parameter only takes effect when the <code>backend</code> is set
to <code>rlog</code>. to <code>rlog</code>."""
""" zh: """选择节点的角色。<br/>
zh: """
选择节点的角色。<br/>
<code>core</code> 节点提供数据的持久性,并负责写入。建议将核心节点放置在不同的机架或不同的可用区。<br/> <code>core</code> 节点提供数据的持久性,并负责写入。建议将核心节点放置在不同的机架或不同的可用区。<br/>
<code>repliant</code> 节点是临时工作节点。 从集群中删除它们,不影响数据库冗余<br/> <code>repliant</code> 节点是临时工作节点。 从集群中删除它们,不影响数据库冗余<br/>
建议复制节点多于核心节点。<br/> 建议复制节点多于核心节点。<br/>
注意:该参数仅在设置<code>backend</code>时生效到 <code>rlog</code>。 注意:该参数仅在设置<code>backend</code>时生效到 <code>rlog</code>。"""
"""
} }
label { label {
en: "DB Role" en: "DB Role"
@ -608,20 +576,17 @@ to <code>rlog</code>.
db_core_nodes { db_core_nodes {
desc { desc {
en: """ en: """List of core nodes that the replicant will connect to.<br/>
List of core nodes that the replicant will connect to.<br/>
Note: this parameter only takes effect when the <code>backend</code> is set Note: this parameter only takes effect when the <code>backend</code> is set
to <code>rlog</code> and the <code>role</code> is set to <code>replicant</code>.<br/> to <code>rlog</code> and the <code>role</code> is set to <code>replicant</code>.<br/>
This value needs to be defined for manual or static cluster discovery mechanisms.<br/> This value needs to be defined for manual or static cluster discovery mechanisms.<br/>
If an automatic cluster discovery mechanism is being used (such as <code>etcd</code>), If an automatic cluster discovery mechanism is being used (such as <code>etcd</code>),
there is no need to set this value. there is no need to set this value."""
"""
zh: """当前节点连接的核心节点列表。<br/> zh: """当前节点连接的核心节点列表。<br/>
注意:该参数仅在设置<code>backend</code>时生效到 <code>rlog</code> 注意:该参数仅在设置<code>backend</code>时生效到 <code>rlog</code>
并且设置<code>role</code>为<code>replicant</code>时生效。<br/> 并且设置<code>role</code>为<code>replicant</code>时生效。<br/>
该值需要在手动或静态集群发现机制下设置。<br/> 该值需要在手动或静态集群发现机制下设置。<br/>
如果使用了自动集群发现机制(如<code>etcd</code>),则不需要设置该值。 如果使用了自动集群发现机制(如<code>etcd</code>),则不需要设置该值。"""
"""
} }
label { label {
en: "Db Core Node" en: "Db Core Node"
@ -642,10 +607,8 @@ there is no need to set this value.
db_tlog_push_mode { db_tlog_push_mode {
desc { desc {
en: """ en: """In sync mode the core node waits for an ack from the replicant nodes before sending the next
In sync mode the core node waits for an ack from the replicant nodes before sending the next transaction log entry."""
transaction log entry.
"""
zh: """同步模式下,核心节点等待复制节点的确认信息,然后再发送下一条事务日志。""" zh: """同步模式下,核心节点等待复制节点的确认信息,然后再发送下一条事务日志。"""
} }
label { label {
@ -659,13 +622,11 @@ transaction log entry.
en: """Defines the default transport for pushing transaction logs.<br/> en: """Defines the default transport for pushing transaction logs.<br/>
This may be overridden on a per-shard basis in <code>db.shard_transports</code>. This may be overridden on a per-shard basis in <code>db.shard_transports</code>.
<code>gen_rpc</code> uses the <code>gen_rpc</code> library, <code>gen_rpc</code> uses the <code>gen_rpc</code> library,
<code>distr</code> uses the Erlang distribution.<br/>""" <code>distr</code> uses the Erlang distribution."""
zh: """ zh: """定义用于推送事务日志的默认传输。<br/>
定义用于推送事务日志的默认传输。<br/>
这可以在 <code>db.shard_transports</code> 中基于每个分片被覆盖。 这可以在 <code>db.shard_transports</code> 中基于每个分片被覆盖。
<code>gen_rpc</code> 使用 <code>gen_rpc</code> 库, <code>gen_rpc</code> 使用 <code>gen_rpc</code> 库,
<code>distr</code> 使用 Erlang 发行版。<br/> <code>distr</code> 使用 Erlang 发行版。"""
"""
} }
label { label {
en: "Default Shard Transport" en: "Default Shard Transport"
@ -682,8 +643,7 @@ the default is to use the value set in <code>db.default_shard_transport</code>."
zh: """允许为每个 shard 下的事务日志复制操作的传输方法进行调优。<br/> zh: """允许为每个 shard 下的事务日志复制操作的传输方法进行调优。<br/>
<code>gen_rpc</code> 使用 <code>gen_rpc</code> 库, <code>gen_rpc</code> 使用 <code>gen_rpc</code> 库,
<code>distr</code> 使用 Erlang 自带的 rpc 库。<br/>如果未指定, <code>distr</code> 使用 Erlang 自带的 rpc 库。<br/>如果未指定,
默认是使用 <code>db.default_shard_transport</code> 中设置的值。 默认是使用 <code>db.default_shard_transport</code> 中设置的值。"""
"""
} }
label { label {
en: "Shard Transports" en: "Shard Transports"
@ -750,8 +710,7 @@ Ensure that the number of completed transactions is less than the <code>max_hist
rpc_async_batch_size { rpc_async_batch_size {
desc { desc {
en: """The maximum number of batch messages sent in asynchronous mode. en: """The maximum number of batch messages sent in asynchronous mode.
Note that this configuration does not work in synchronous mode. Note that this configuration does not work in synchronous mode."""
"""
zh: """异步模式下,发送的批量消息的最大数量。""" zh: """异步模式下,发送的批量消息的最大数量。"""
} }
label { label {
@ -768,8 +727,7 @@ If node name is <code>emqxN@127.0.0.1</code>, where the N is an integer,
then the listening port will be 5370 + N.""" then the listening port will be 5370 + N."""
zh: """<code>manual</code>: 通过 <code>tcp_server_port</code> 来发现端口。 zh: """<code>manual</code>: 通过 <code>tcp_server_port</code> 来发现端口。
<br/><code>stateless</code>: 使用无状态的方式来发现端口,使用如下算法。如果节点名称是 <code> <br/><code>stateless</code>: 使用无状态的方式来发现端口,使用如下算法。如果节点名称是 <code>
emqxN@127.0.0.1</code>, N 是一个数字,那么监听端口就是 5370 + N。 emqxN@127.0.0.1</code>, N 是一个数字,那么监听端口就是 5370 + N。"""
"""
} }
label { label {
en: "RRC Port Discovery" en: "RRC Port Discovery"
@ -782,8 +740,7 @@ emqxN@127.0.0.1</code>, N 是一个数字,那么监听端口就是 5370 + N。
en: """Listening port used by RPC local service.<br/> en: """Listening port used by RPC local service.<br/>
Note that this config only takes effect when rpc.port_discovery is set to manual.""" Note that this config only takes effect when rpc.port_discovery is set to manual."""
zh: """RPC 本地服务使用的 TCP 端口。<br/> zh: """RPC 本地服务使用的 TCP 端口。<br/>
只有当 rpc.port_discovery 设置为 manual 时,此配置才会生效。 只有当 rpc.port_discovery 设置为 manual 时,此配置才会生效。"""
"""
} }
label { label {
en: "RPC TCP Server Port" en: "RPC TCP Server Port"
@ -798,8 +755,7 @@ Note that this config only takes effect when rpc.port_discovery is set to manual
and <code>driver</code> is set to <code>ssl</code>.""" and <code>driver</code> is set to <code>ssl</code>."""
zh: """RPC 本地服务使用的监听SSL端口。<br/> zh: """RPC 本地服务使用的监听SSL端口。<br/>
只有当 rpc.port_discovery 设置为 manual 且 <code> dirver </code> 设置为 <code>ssl</code> 只有当 rpc.port_discovery 设置为 manual 且 <code> dirver </code> 设置为 <code>ssl</code>
此配置才会生效。 此配置才会生效。"""
"""
} }
label { label {
en: "RPC SSL Server Port" en: "RPC SSL Server Port"
@ -832,11 +788,10 @@ and <code>driver</code> is set to <code>ssl</code>."""
rpc_certfile { rpc_certfile {
desc { desc {
en: """Path to TLS certificate file used to validate identity of the cluster nodes. en: """Path to TLS certificate file used to validate identity of the cluster nodes.
Note that this config only takes effect when <code>rpc.driver</code> is set to <code>ssl</code>. Note that this config only takes effect when <code>rpc.driver</code> is set to <code>ssl</code>."""
"""
zh: """TLS 证书文件的路径,用于验证集群节点的身份。 zh: """TLS 证书文件的路径,用于验证集群节点的身份。
只有当 <code>rpc.driver</code> 设置为 <code>ssl</code> 时,此配置才会生效。 只有当 <code>rpc.driver</code> 设置为 <code>ssl</code> 时,此配置才会生效。"""
"""
} }
label { label {
en: "RPC Certfile" en: "RPC Certfile"
@ -849,8 +804,7 @@ Note that this config only takes effect when <code>rpc.driver</code> is set to <
en: """Path to the private key file for the <code>rpc.certfile</code>.<br/> en: """Path to the private key file for the <code>rpc.certfile</code>.<br/>
Note: contents of this file are secret, so it's necessary to set permissions to 600.""" Note: contents of this file are secret, so it's necessary to set permissions to 600."""
zh: """<code>rpc.certfile</code> 的私钥文件的路径。<br/> zh: """<code>rpc.certfile</code> 的私钥文件的路径。<br/>
注意:此文件内容是私钥,所以需要设置权限为 600。 注意:此文件内容是私钥,所以需要设置权限为 600。"""
"""
} }
label { label {
en: "RPC Keyfile" en: "RPC Keyfile"
@ -863,8 +817,7 @@ Note: contents of this file are secret, so it's necessary to set permissions to
en: """Path to certification authority TLS certificate file used to validate <code>rpc.certfile</code>.<br/> en: """Path to certification authority TLS certificate file used to validate <code>rpc.certfile</code>.<br/>
Note: certificates of all nodes in the cluster must be signed by the same CA.""" Note: certificates of all nodes in the cluster must be signed by the same CA."""
zh: """验证 <code>rpc.certfile</code> 的 CA 证书文件的路径。<br/> zh: """验证 <code>rpc.certfile</code> 的 CA 证书文件的路径。<br/>
注意:集群中所有节点的证书必须使用同一个 CA 签发。 注意:集群中所有节点的证书必须使用同一个 CA 签发。"""
"""
} }
label { label {
en: "RPC Cacertfile" en: "RPC Cacertfile"
@ -1007,14 +960,10 @@ until the RPC connection is considered lost."""
common_handler_level { common_handler_level {
desc { desc {
en: """ en: """The log level for the current log handler.
The log level for the current log handler. Defaults to warning."""
Defaults to warning. zh: """当前日志处理进程的日志级别。
""" 默认为 warning 级别。"""
zh: """
当前日志处理进程的日志级别。
默认为 warning 级别。
"""
} }
label { label {
en: "Log Level" en: "Log Level"
@ -1024,22 +973,18 @@ Defaults to warning.
common_handler_time_offset { common_handler_time_offset {
desc { desc {
en: """ en: """The time offset to be used when formatting the timestamp.
The time offset to be used when formatting the timestamp.
Can be one of: Can be one of:
- <code>system</code>: the time offset used by the local system - <code>system</code>: the time offset used by the local system
- <code>utc</code>: the UTC time offset - <code>utc</code>: the UTC time offset
- <code>+-[hh]:[mm]</code>: user specified time offset, such as "-02:00" or "+00:00" - <code>+-[hh]:[mm]</code>: user specified time offset, such as "-02:00" or "+00:00"
Defaults to: <code>system</code>. Defaults to: <code>system</code>."""
""" zh: """日志中的时间戳使用的时间偏移量。
zh: """
日志中的时间戳使用的时间偏移量。
可选值为: 可选值为:
- <code>system</code>: 本地系统使用的时区偏移量 - <code>system</code>: 本地系统使用的时区偏移量
- <code>utc</code>: 0 时区的偏移量 - <code>utc</code>: 0 时区的偏移量
- <code>+-[hh]:[mm]</code>: 自定义偏移量,比如 "-02:00" 或者 "+00:00" - <code>+-[hh]:[mm]</code>: 自定义偏移量,比如 "-02:00" 或者 "+00:00"
默认值为本地系统的时区偏移量:<code>system</code>。 默认值为本地系统的时区偏移量:<code>system</code>。"""
"""
} }
label { label {
en: "Time Offset" en: "Time Offset"
@ -1049,14 +994,10 @@ Defaults to: <code>system</code>.
common_handler_chars_limit { common_handler_chars_limit {
desc { desc {
en: """ en: """Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated.
Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated. NOTE: Restrict char limiter if formatter is JSON , it will get a truncated incomplete JSON data, which is not recommended."""
NOTE: Restrict char limiter if formatter is JSON , it will get a truncated incomplete JSON data, which is not recommended. zh: """设置单个日志消息的最大长度。 如果超过此长度则日志消息将被截断。最小可设置的长度为100。
""" 注意:如果日志格式为 JSON限制字符长度可能会导致截断不完整的 JSON 数据。"""
zh: """
设置单个日志消息的最大长度。 如果超过此长度则日志消息将被截断。最小可设置的长度为100。
注意:如果日志格式为 JSON限制字符长度可能会导致截断不完整的 JSON 数据。
"""
} }
label { label {
en: "Single Log Max Length" en: "Single Log Max Length"
@ -1097,8 +1038,7 @@ If the message queue grows larger than this value,
the handler starts handling log events synchronously instead, the handler starts handling log events synchronously instead,
meaning that the client process sending the event must wait for a response. meaning that the client process sending the event must wait for a response.
When the handler reduces the message queue to a level below the sync_mode_qlen threshold, When the handler reduces the message queue to a level below the sync_mode_qlen threshold,
asynchronous operation is resumed. asynchronous operation is resumed."""
"""
zh: """只要缓冲的日志事件的数量低于这个值,所有的日志事件都会被异步处理。 zh: """只要缓冲的日志事件的数量低于这个值,所有的日志事件都会被异步处理。
这意味着,日志落地速度不会影响正常的业务进程,因为它们不需要等待日志处理进程的响应。 这意味着,日志落地速度不会影响正常的业务进程,因为它们不需要等待日志处理进程的响应。
如果消息队列的增长超过了这个值,处理程序开始同步处理日志事件。也就是说,发送事件的客户进程必须等待响应。 如果消息队列的增长超过了这个值,处理程序开始同步处理日志事件。也就是说,发送事件的客户进程必须等待响应。
@ -1120,8 +1060,7 @@ When drop mode is activated or deactivated, a message is printed in the logs."""
要禁用某些模式,请执行以下操作。 要禁用某些模式,请执行以下操作。
- 如果sync_mode_qlen被设置为0所有的日志事件都被同步处理。也就是说异步日志被禁用。 - 如果sync_mode_qlen被设置为0所有的日志事件都被同步处理。也就是说异步日志被禁用。
- 如果sync_mode_qlen被设置为与drop_mode_qlen相同的值同步模式被禁用。也就是说处理程序总是以异步模式运行除非调用drop或flushing。 - 如果sync_mode_qlen被设置为与drop_mode_qlen相同的值同步模式被禁用。也就是说处理程序总是以异步模式运行除非调用drop或flushing。
- 如果drop_mode_qlen被设置为与flush_qlen相同的值则drop模式被禁用永远不会发生。 - 如果drop_mode_qlen被设置为与flush_qlen相同的值则drop模式被禁用永远不会发生。"""
"""
} }
label { label {
en: "Queue Length before Entering Drop Mode" en: "Queue Length before Entering Drop Mode"
@ -1144,16 +1083,13 @@ To flush events, the handler discards the buffered log messages without logging.
common_handler_supervisor_reports { common_handler_supervisor_reports {
desc { desc {
en: """ en: """Type of supervisor reports that are logged. Defaults to <code>error</code><br/>
Type of supervisor reports that are logged. Defaults to <code>error</code> - <code>error</code>: only log errors in the Erlang processes<br/>.
- <code>error</code>: only log errors in the Erlang processes. - <code>progress</code>: log process startup."""
- <code>progress</code>: log process startup.
""" zh: """Supervisor 报告的类型。默认为 error 类型。<br/>
zh: """
Supervisor 报告的类型。默认为 error 类型。
- <code>error</code>:仅记录 Erlang 进程中的错误。 - <code>error</code>:仅记录 Erlang 进程中的错误。
- <code>progress</code>:除了 error 信息外,还需要记录进程启动的详细信息。 - <code>progress</code>:除了 error 信息外,还需要记录进程启动的详细信息。"""
"""
} }
label { label {
en: "Report Type" en: "Report Type"
@ -1187,8 +1123,7 @@ Supervisor 报告的类型。默认为 error 类型。
desc { desc {
en: """This parameter controls log file rotation. The value `infinity` means the log file will grow indefinitely, otherwise the log file will be rotated once it reaches `max_size` in bytes.""" en: """This parameter controls log file rotation. The value `infinity` means the log file will grow indefinitely, otherwise the log file will be rotated once it reaches `max_size` in bytes."""
zh: """此参数控制日志文件轮换。 `infinity` 意味着日志文件将无限增长,否则日志文件将在达到 `max_size`(以字节为单位)时进行轮换。 zh: """此参数控制日志文件轮换。 `infinity` 意味着日志文件将无限增长,否则日志文件将在达到 `max_size`(以字节为单位)时进行轮换。
与 rotation count配合使用。如果 counter 为 10则是10个文件轮换。 与 rotation count配合使用。如果 counter 为 10则是10个文件轮换。"""
"""
} }
label { label {
en: "Rotation Size" en: "Rotation Size"
@ -1200,8 +1135,7 @@ Supervisor 报告的类型。默认为 error 类型。
desc { desc {
en: """Enable log rotation feature.""" en: """Enable log rotation feature."""
zh: """启用日志轮换功能。启动后生成日志文件后缀会加上对应的索引数字比如log/emqx.log.1。 zh: """启用日志轮换功能。启动后生成日志文件后缀会加上对应的索引数字比如log/emqx.log.1。
系统会默认生成<code>*.siz/*.idx</code>用于记录日志位置,请不要手动修改这两个文件。 系统会默认生成<code>*.siz/*.idx</code>用于记录日志位置,请不要手动修改这两个文件。"""
"""
} }
label { label {
en: "Rotation Enable" en: "Rotation Enable"
@ -1299,8 +1233,7 @@ Supervisor 报告的类型。默认为 error 类型。
authorization { authorization {
desc { desc {
en: """ en: """Authorization a.k.a. ACL.<br/>
Authorization a.k.a. ACL.<br/>
In EMQX, MQTT client access control is extremely flexible.<br/> In EMQX, MQTT client access control is extremely flexible.<br/>
An out-of-the-box set of authorization data sources are supported. An out-of-the-box set of authorization data sources are supported.
For example,<br/> For example,<br/>
@ -1308,9 +1241,9 @@ For example,<br/>
'built_in_database' source can be used to store per-client customizable rule sets, 'built_in_database' source can be used to store per-client customizable rule sets,
natively in the EMQX node;<br/> natively in the EMQX node;<br/>
'http' source to make EMQX call an external HTTP API to make the decision;<br/> 'http' source to make EMQX call an external HTTP API to make the decision;<br/>
'PostgreSQL' etc. to look up clients or rules from external databases;<br/> 'PostgreSQL' etc. to look up clients or rules from external databases"""
"""
zh: """ 授权ACL。EMQX 支持完整的客户端访问控制ACL<br/> """ zh: """授权ACL。EMQX 支持完整的客户端访问控制ACL。"""
} }
label { label {
en: "Authorization" en: "Authorization"
@ -1470,14 +1403,11 @@ Each sink is represented by a _log handler_, which can be configured independent
desc_log_rotation { desc_log_rotation {
desc { desc {
en: """ en: """By default, the logs are stored in `./log` directory (for installation from zip file) or in `/var/log/emqx` (for binary installation).<br/>
By default, the logs are stored in `./log` directory (for installation from zip file) or in `/var/log/emqx` (for binary installation).<br/> This section of the configuration controls the number of files kept for each log handler."""
This section of the configuration controls the number of files kept for each log handler.
""" zh: """默认情况下,日志存储在 `./log` 目录(用于从 zip 文件安装)或 `/var/log/emqx`(用于二进制安装)。<br/>
zh: """ 这部分配置,控制每个日志处理进程保留的文件数量。"""
默认情况下,日志存储在 `./log` 目录(用于从 zip 文件安装)或 `/var/log/emqx`(用于二进制安装)。<br/>
这部分配置,控制每个日志处理进程保留的文件数量。
"""
} }
label { label {
en: "Log Rotation" en: "Log Rotation"
@ -1487,14 +1417,11 @@ This section of the configuration controls the number of files kept for each log
desc_log_overload_kill { desc_log_overload_kill {
desc { desc {
en: """ en: """Log overload kill features an overload protection that activates when the log handlers use too much memory or have too many buffered log messages.<br/>
Log overload kill features an overload protection that activates when the log handlers use too much memory or have too many buffered log messages.<br/> When the overload is detected, the log handler is terminated and restarted after a cooldown period."""
When the overload is detected, the log handler is terminated and restarted after a cooldown period.
""" zh: """日志过载终止,具有过载保护功能。当日志处理进程使用过多内存,或者缓存的日志消息过多时该功能被激活。<br/>
zh: """ 检测到过载时,日志处理进程将终止,并在冷却期后重新启动。"""
日志过载终止,具有过载保护功能。当日志处理进程使用过多内存,或者缓存的日志消息过多时该功能被激活。<br/>
检测到过载时,日志处理进程将终止,并在冷却期后重新启动。
"""
} }
label { label {
en: "Log Overload Kill" en: "Log Overload Kill"

View File

@ -13,14 +13,10 @@ emqx_connector_api {
conn_test_post { conn_test_post {
desc { desc {
en: """ en: """Test creating a new connector by given ID <br/>
Test creating a new connector by given ID <br/> The ID must be of format '{type}:{name}'"""
The ID must be of format '{type}:{name}' zh: """通过给定的 ID 测试创建一个新的连接器 <br/>
""" ID 的格式必须为“{type}:{name}”"""
zh: """
通过给定的 ID 测试创建一个新的连接器 <br/>
ID 的格式必须为“{type}:{name}”
"""
} }
label: { label: {
en: "Create Test Connector" en: "Create Test Connector"

View File

@ -1,17 +1,13 @@
emqx_connector_http { emqx_connector_http {
base_url { base_url {
desc { desc {
en: """ en: """The base URL is the URL includes only the scheme, host and port.<br/>
The base URL is the URL includes only the scheme, host and port.<br/>
When send an HTTP request, the real URL to be used is the concatenation of the base URL and the When send an HTTP request, the real URL to be used is the concatenation of the base URL and the
path parameter<br/> path parameter<br/>
For example: `http://localhost:9901/` For example: `http://localhost:9901/`"""
""" zh: """base URL 只包含host和port。<br/>
zh: """
base URL 只包含host和port。<br/>
发送HTTP请求时真实的URL是由base URL 和 path parameter连接而成。<br/> 发送HTTP请求时真实的URL是由base URL 和 path parameter连接而成。<br/>
示例:`http://localhost:9901/` 示例:`http://localhost:9901/`"""
"""
} }
label: { label: {
en: "Base Url" en: "Base Url"

View File

@ -3,7 +3,7 @@ emqx_connector_mongo {
single_mongo_type { single_mongo_type {
desc { desc {
en: "Standalone instance. Must be set to 'single' when MongoDB server is running in standalone mode." en: "Standalone instance. Must be set to 'single' when MongoDB server is running in standalone mode."
zh: "Standalone 模式。当 MongoDB 服务运行在 standalone 模式下,该配置必须设置为 'single'。 " zh: "Standalone 模式。当 MongoDB 服务运行在 standalone 模式下,该配置必须设置为 'single'。"
} }
label: { label: {
en: "Standalone instance" en: "Standalone instance"
@ -46,16 +46,12 @@ emqx_connector_mongo {
server { server {
desc { desc {
en: """ en: """The IPv4 or IPv6 address or the hostname to connect to.<br/>
The IPv4 or IPv6 address or the hostname to connect to.<br/>
A host entry has the following form: `Host[:Port]`.<br/> A host entry has the following form: `Host[:Port]`.<br/>
The MongoDB default port 27017 is used if `[:Port]` is not specified. The MongoDB default port 27017 is used if `[:Port]` is not specified."""
""" zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
zh: """
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
主机名具有以下形式:`Host[:Port]`。<br/> 主机名具有以下形式:`Host[:Port]`。<br/>
如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。 如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。"""
"""
} }
label: { label: {
en: "Server Host" en: "Server Host"
@ -65,18 +61,14 @@ The MongoDB default port 27017 is used if `[:Port]` is not specified.
servers { servers {
desc { desc {
en: """ en: """A Node list for Cluster to connect to. The nodes should be separated with commas, such as: `Node[,Node].`
A Node list for Cluster to connect to. The nodes should be separated with commas, such as: `Node[,Node].`
For each Node should be: The IPv4 or IPv6 address or the hostname to connect to. For each Node should be: The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`. A host entry has the following form: `Host[:Port]`.
The MongoDB default port 27017 is used if `[:Port]` is not specified. The MongoDB default port 27017 is used if `[:Port]` is not specified."""
""" zh: """集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].`
zh: """
集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].`
每个节点的配置为:将要连接的 IPv4 或 IPv6 地址或主机名。 每个节点的配置为:将要连接的 IPv4 或 IPv6 地址或主机名。
主机名具有以下形式:`Host[:Port]`。 主机名具有以下形式:`Host[:Port]`。
如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。 如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。"""
"""
} }
label: { label: {
en: "Servers" en: "Servers"

View File

@ -9,8 +9,7 @@ emqx_connector_mqtt_schema {
the rule.""" the rule."""
zh: """入口配置定义了该桥接如何从远程 MQTT Broker 接收消息,然后将消息发送到本地 Broker。<br/> zh: """入口配置定义了该桥接如何从远程 MQTT Broker 接收消息,然后将消息发送到本地 Broker。<br/>
以下字段中允许使用带有变量的模板:'remote.qos', 'local.topic', 'local.qos', 'local.retain', 'local.payload'。<br/> 以下字段中允许使用带有变量的模板:'remote.qos', 'local.topic', 'local.qos', 'local.retain', 'local.payload'。<br/>
注意:如果此桥接被用作规则的输入,并且配置了 'local.topic',则从远程代理获取的消息将同时被发送到 'local.topic' 和规则。 注意:如果此桥接被用作规则的输入,并且配置了 'local.topic',则从远程代理获取的消息将同时被发送到 'local.topic' 和规则。"""
"""
} }
label: { label: {
en: "Ingress Configs" en: "Ingress Configs"
@ -27,8 +26,7 @@ is configured, then both the data got from the rule and the MQTT messages that m
'local.topic' will be forwarded.""" 'local.topic' will be forwarded."""
zh: """出口配置定义了该桥接如何将消息从本地 Broker 转发到远程 Broker。 zh: """出口配置定义了该桥接如何将消息从本地 Broker 转发到远程 Broker。
以下字段中允许使用带有变量的模板:'remote.topic', 'local.qos', 'local.retain', 'local.payload'。<br/> 以下字段中允许使用带有变量的模板:'remote.topic', 'local.qos', 'local.retain', 'local.payload'。<br/>
注意:如果此桥接被用作规则的动作,并且配置了 'local.topic',则从规则输出的数据以及匹配到 'local.topic' 的 MQTT 消息都会被转发。 注意:如果此桥接被用作规则的动作,并且配置了 'local.topic',则从规则输出的数据以及匹配到 'local.topic' 的 MQTT 消息都会被转发。"""
"""
} }
label: { label: {
en: "Egress Configs" en: "Egress Configs"
@ -82,29 +80,23 @@ is configured, then both the data got from the rule and the MQTT messages that m
mode { mode {
desc { desc {
en: """ en: """The mode of the MQTT Bridge.<br/>
The mode of the MQTT Bridge.<br/>
- cluster_shareload: create an MQTT connection on each node in the emqx cluster.<br/> - cluster_shareload: create an MQTT connection on each node in the emqx cluster.<br/>
In 'cluster_shareload' mode, the incoming load from the remote broker is shared by In 'cluster_shareload' mode, the incoming load from the remote broker is shared by
using shared subscription.<br/> using shared subscription.<br/>
Note that the 'clientid' is suffixed by the node name, this is to avoid Note that the 'clientid' is suffixed by the node name, this is to avoid
clientid conflicts between different nodes. And we can only use shared subscription clientid conflicts between different nodes. And we can only use shared subscription
topic filters for <code>remote.topic</code> of ingress connections. topic filters for <code>remote.topic</code> of ingress connections."""
""" zh: """MQTT 桥的模式。 <br/>
zh: """
MQTT 桥的模式。 <br/>
- cluster_shareload在 emqx 集群的每个节点上创建一个 MQTT 连接。<br/> - cluster_shareload在 emqx 集群的每个节点上创建一个 MQTT 连接。<br/>
在“cluster_shareload”模式下来自远程代理的传入负载通过共享订阅的方式接收。<br/> 在“cluster_shareload”模式下来自远程代理的传入负载通过共享订阅的方式接收。<br/>
请注意,<code>clientid</code> 以节点名称为后缀,这是为了避免不同节点之间的 <code> clientid</code> 冲突。 请注意,<code>clientid</code> 以节点名称为后缀,这是为了避免不同节点之间的 <code> clientid</code> 冲突。
而且对于入口连接的 <code>remote.topic</code>,我们只能使用共享订阅主题过滤器。 而且对于入口连接的 <code>remote.topic</code>,我们只能使用共享订阅主题过滤器。"""
"""
} }
label: { label: {
en: "MQTT Bridge Mode" en: "MQTT Bridge Mode"
zh: "MQTT 桥接模式" zh: "MQTT 桥接模式"
} }
} }
server { server {
@ -113,22 +105,18 @@ MQTT 桥的模式。 <br/>
zh: "远程 MQTT Broker的主机和端口。" zh: "远程 MQTT Broker的主机和端口。"
} }
label: { label: {
en: "Broker IP And Port" en: "Broker IP And Port"
zh: "Broker主机和端口" zh: "Broker主机和端口"
} }
} }
bridge_mode { bridge_mode {
desc { desc {
en: """ en: """If enable bridge mode.
If enable bridge mode.
NOTE: This setting is only for MQTT protocol version older than 5.0, and the remote MQTT NOTE: This setting is only for MQTT protocol version older than 5.0, and the remote MQTT
broker MUST support this feature. broker MUST support this feature."""
""" zh: """是否启用 Bridge Mode。
zh: """ 注意:此设置只针对 MQTT 协议版本 < 5.0 有效,并且需要远程 MQTT Broker 支持 Bridge Mode。"""
是否启用 Bridge Mode。
注意:此设置只针对 MQTT 协议版本 < 5.0 有效,并且需要远程 MQTT Broker 支持 Bridge Mode。
"""
} }
label { label {
en: "Bridge Mode" en: "Bridge Mode"
@ -215,14 +203,10 @@ broker MUST support this feature.
ingress_local_topic { ingress_local_topic {
desc { desc {
en: """ en: """Send messages to which topic of the local broker.<br/>
Send messages to which topic of the local broker.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """向本地broker的哪个topic发送消息。<br/>
""" 允许使用带有变量的模板。"""
zh: """
向本地broker的哪个topic发送消息。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "Local Topic" en: "Local Topic"
@ -232,14 +216,10 @@ Template with variables is allowed.
ingress_local_qos { ingress_local_qos {
desc { desc {
en: """ en: """The QoS of the MQTT message to be sent.<br/>
The QoS of the MQTT message to be sent.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """待发送 MQTT 消息的 QoS。<br/>
""" 允许使用带有变量的模板。"""
zh: """
待发送 MQTT 消息的 QoS。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "Local QoS" en: "Local QoS"
@ -260,14 +240,10 @@ Template with variables is allowed.
egress_remote_topic { egress_remote_topic {
desc { desc {
en: """ en: """Forward to which topic of the remote broker.<br/>
Forward to which topic of the remote broker.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """转发到远程broker的哪个topic。<br/>
""" 允许使用带有变量的模板。"""
zh: """
转发到远程broker的哪个topic。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "Remote Topic" en: "Remote Topic"
@ -277,14 +253,10 @@ Template with variables is allowed.
egress_remote_qos { egress_remote_qos {
desc { desc {
en: """ en: """The QoS of the MQTT message to be sent.<br/>
The QoS of the MQTT message to be sent.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """待发送 MQTT 消息的 QoS。<br/>
""" 允许使用带有变量的模板。"""
zh: """
待发送 MQTT 消息的 QoS。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "Remote QoS" en: "Remote QoS"
@ -294,14 +266,10 @@ Template with variables is allowed.
retain { retain {
desc { desc {
en: """ en: """The 'retain' flag of the MQTT message to be sent.<br/>
The 'retain' flag of the MQTT message to be sent.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """要发送的 MQTT 消息的“保留”标志。<br/>
""" 允许使用带有变量的模板。"""
zh: """
要发送的 MQTT 消息的“保留”标志。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "Retain Flag" en: "Retain Flag"
@ -311,14 +279,10 @@ Template with variables is allowed.
payload { payload {
desc { desc {
en: """ en: """The payload of the MQTT message to be sent.<br/>
The payload of the MQTT message to be sent.<br/> Template with variables is allowed."""
Template with variables is allowed. zh: """要发送的 MQTT 消息的负载。<br/>
""" 允许使用带有变量的模板。"""
zh: """
要发送的 MQTT 消息的负载。<br/>
允许使用带有变量的模板。
"""
} }
label: { label: {
en: "Payload" en: "Payload"
@ -327,15 +291,15 @@ Template with variables is allowed.
} }
server_configs { server_configs {
desc { desc {
en: """Configs related to the server.""" en: """Configs related to the server."""
zh: """服务器相关的配置。""" zh: """服务器相关的配置。"""
} }
label: { label: {
en: "Server Configs" en: "Server Configs"
zh: "服务配置。" zh: "服务配置。"
} }
} }
clientid_prefix { clientid_prefix {
desc { desc {

View File

@ -2,16 +2,12 @@ emqx_connector_mysql {
server { server {
desc { desc {
en: """ en: """The IPv4 or IPv6 address or the hostname to connect to.<br/>
The IPv4 or IPv6 address or the hostname to connect to.<br/>
A host entry has the following form: `Host[:Port]`.<br/> A host entry has the following form: `Host[:Port]`.<br/>
The MySQL default port 3306 is used if `[:Port]` is not specified. The MySQL default port 3306 is used if `[:Port]` is not specified."""
""" zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
zh: """
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
主机名具有以下形式:`Host[:Port]`。<br/> 主机名具有以下形式:`Host[:Port]`。<br/>
如果未指定 `[:Port]`,则使用 MySQL 默认端口 3306。 如果未指定 `[:Port]`,则使用 MySQL 默认端口 3306。"""
"""
} }
label: { label: {
en: "Server Host" en: "Server Host"

View File

@ -2,16 +2,12 @@ emqx_connector_pgsql {
server { server {
desc { desc {
en: """ en: """The IPv4 or IPv6 address or the hostname to connect to.<br/>
The IPv4 or IPv6 address or the hostname to connect to.<br/>
A host entry has the following form: `Host[:Port]`.<br/> A host entry has the following form: `Host[:Port]`.<br/>
The PostgreSQL default port 5432 is used if `[:Port]` is not specified. The PostgreSQL default port 5432 is used if `[:Port]` is not specified."""
""" zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
zh: """
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
主机名具有以下形式:`Host[:Port]`。<br/> 主机名具有以下形式:`Host[:Port]`。<br/>
如果未指定 `[:Port]`,则使用 PostgreSQL 默认端口 5432。 如果未指定 `[:Port]`,则使用 PostgreSQL 默认端口 5432。"""
"""
} }
label: { label: {
en: "Server Host" en: "Server Host"

View File

@ -46,16 +46,12 @@ emqx_connector_redis {
server { server {
desc { desc {
en: """ en: """The IPv4 or IPv6 address or the hostname to connect to.<br/>
The IPv4 or IPv6 address or the hostname to connect to.<br/>
A host entry has the following form: `Host[:Port]`.<br/> A host entry has the following form: `Host[:Port]`.<br/>
The Redis default port 6379 is used if `[:Port]` is not specified. The Redis default port 6379 is used if `[:Port]` is not specified."""
""" zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
zh: """
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
主机名具有以下形式:`Host[:Port]`。<br/> 主机名具有以下形式:`Host[:Port]`。<br/>
如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。 如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。"""
"""
} }
label: { label: {
en: "Server Host" en: "Server Host"
@ -65,19 +61,14 @@ The Redis default port 6379 is used if `[:Port]` is not specified.
servers { servers {
desc { desc {
en: """ en: """A Node list for Cluster to connect to. The nodes should be separated with commas, such as: `Node[,Node].`
A Node list for Cluster to connect to. The nodes should be separated with commas, such as: `Node[,Node].`
For each Node should be: The IPv4 or IPv6 address or the hostname to connect to. For each Node should be: The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`. A host entry has the following form: `Host[:Port]`.
The Redis default port 6379 is used if `[:Port]` is not specified. The Redis default port 6379 is used if `[:Port]` is not specified."""
""" zh: """集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].`
zh: """
集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].`
每个节点的配置为:将要连接的 IPv4 或 IPv6 地址或主机名。 每个节点的配置为:将要连接的 IPv4 或 IPv6 地址或主机名。
主机名具有以下形式:`Host[:Port]`。 主机名具有以下形式:`Host[:Port]`。
如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。 如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。"""
"""
} }
label: { label: {
en: "Servers" en: "Servers"

View File

@ -10,8 +10,7 @@ Alternatively, the HTTP listener can specify a unique IP address for each listen
but use the same port.""" but use the same port."""
zh: """Dashboard 监听器设置。监听器必须有唯一的端口号和IP地址的组合。 zh: """Dashboard 监听器设置。监听器必须有唯一的端口号和IP地址的组合。
例如可以通过指定IP地址 0.0.0.0 来监听机器上给定端口上的所有配置的IP地址。 例如可以通过指定IP地址 0.0.0.0 来监听机器上给定端口上的所有配置的IP地址。
或者可以为每个监听器指定唯一的IP地址但使用相同的端口。 或者可以为每个监听器指定唯一的IP地址但使用相同的端口。"""
"""
} }
label { label {
en: "Listeners" en: "Listeners"
@ -181,8 +180,7 @@ The configuration is only valid when the inet6 is true."""
en: """The initial default password for dashboard 'admin' user. en: """The initial default password for dashboard 'admin' user.
For safety, it should be changed as soon as possible. For safety, it should be changed as soon as possible.
This value is not valid when you log in to Dashboard for the first time via the web This value is not valid when you log in to Dashboard for the first time via the web
and change to a complex password as prompted. and change to a complex password as prompted."""
"""
zh: """Dashboard 的默认密码,为了安全,应该尽快修改密码。 zh: """Dashboard 的默认密码,为了安全,应该尽快修改密码。
当通过网页首次登录 Dashboard 并按提示修改成复杂密码后,此值就会失效。""" 当通过网页首次登录 Dashboard 并按提示修改成复杂密码后,此值就会失效。"""
} }

View File

@ -130,18 +130,17 @@ NOTE: The position should be \"front | rear | before:{name} | after:{name}"""
status { status {
desc { desc {
en: """The status of Exhook server. en: """The status of Exhook server.<br/>
connected: connection succeeded connected: connection succeeded<br/>
connecting: connection failed, reconnecting connecting: connection failed, reconnecting<br/>
disconnected: failed to connect and didn't reconnect disconnected: failed to connect and didn't reconnect<br/>
disabled: this server is disabled disabled: this server is disabled<br/>
error: failed to view the status of this server error: failed to view the status of this server"""
""" zh: """Exhook 服务器的状态。<br/>
zh: """Exhook 服务器的状态。 connected: 连接成功<br/>
connected: 连接成功 connecting: 连接失败,重连中<br/>
connecting: 连接失败,重连中 disconnected: 连接失败,且未设置自动重连<br/>
disconnected: 连接失败,且未设置自动重连 disabled: 该服务器未开启<br/>
disabled: 该服务器未开启
error: 查看该服务器状态时发生错误""" error: 查看该服务器状态时发生错误"""
} }
} }

View File

@ -33,7 +33,7 @@ including current running status, number of connections, listener status, etc.""
update_gateway { update_gateway {
desc { desc {
en: """Update the gateway basic configurations and running status.<br/> en: """Update the gateway basic configurations and running status.<br/>
Note: The Authentication and Listener configurations should be updated by other special APIs. """ Note: The Authentication and Listener configurations should be updated by other special APIs."""
zh: """更新指定网关的基础配置、和启用的状态。<br/> zh: """更新指定网关的基础配置、和启用的状态。<br/>
注:认证、和监听器的配置更新需参考对应的 API 接口。""" 注:认证、和监听器的配置更新需参考对应的 API 接口。"""
} }
@ -49,11 +49,9 @@ Note: The Authentication and Listener configurations should be updated by other
gateway_name_in_qs { gateway_name_in_qs {
desc { desc {
en: """Gateway Name.<br/> en: """Gateway Name.<br/>
It's enum with `stomp`, `mqttsn`, `coap`, `lwm2m`, `exproto` It's enum with `stomp`, `mqttsn`, `coap`, `lwm2m`, `exproto`"""
"""
zh: """网关名称.<br/> zh: """网关名称.<br/>
可取值为 `stomp`、`mqttsn`、`coap`、`lwm2m`、`exproto` 可取值为 `stomp`、`mqttsn`、`coap`、`lwm2m`、`exproto`"""
"""
} }
} }

View File

@ -118,7 +118,7 @@ When authenticator is enabled for a listener, all clients connecting to that lis
listener_status { listener_status {
desc { desc {
en: """listener status """ en: """listener status"""
zh: """监听器状态""" zh: """监听器状态"""
} }
} }

View File

@ -49,7 +49,7 @@ When the <code>broadcast</code> option is enabled, the gateway will broadcast AD
mqttsn_broadcast { mqttsn_broadcast {
desc { desc {
en: """Whether to periodically broadcast ADVERTISE messages""" en: """Whether to periodically broadcast ADVERTISE messages"""
zh: """是否周期性广播 ADVERTISE 消息 """ zh: """是否周期性广播 ADVERTISE 消息"""
} }
} }
@ -81,7 +81,7 @@ A 'pre-defined' topic ID is a topic ID whose mapping to a topic name is known in
mqttsn_predefined_id { mqttsn_predefined_id {
desc { desc {
en: """Topic ID. Range: 1-65535""" en: """Topic ID. Range: 1-65535"""
zh: """主题 ID。范围1-65535 """ zh: """主题 ID。范围1-65535"""
} }
} }
@ -122,54 +122,50 @@ Connection mode is a feature of non-standard protocols. When connection mode is
coap_notify_type { coap_notify_type {
desc { desc {
en: """The Notification Message will be delivered to the CoAP client if a new message received on an observed topic. en: """The Notification Message will be delivered to the CoAP client if a new message received on an observed topic.
The type of delivered coap message can be set to: The type of delivered coap message can be set to:<br/>
- non: Non-confirmable; - non: Non-confirmable;<br/>
- con: Confirmable; - con: Confirmable;<br/>
- qos: Mapping from QoS type of received message, QoS0 -> non, QoS1,2 -> con - qos: Mapping from QoS type of received message, QoS0 -> non, QoS1,2 -> con"""
""" zh: """投递给 CoAP 客户端的通知消息类型。当客户端 Observe 一个资源(或订阅某个主题)时,网关会向客户端推送新产生的消息。其消息类型可设置为:<br/>
zh: """投递给 CoAP 客户端的通知消息类型。当客户端 Observe 一个资源(或订阅某个主题)时,网关会向客户端推送新产生的消息。其消息类型可设置为: - non: 不需要客户端返回确认消息;<br/>
- non: 不需要客户端返回确认消息; - con: 需要客户端返回一个确认消息;<br/>
- con: 需要客户端返回一个确认消息; - qos: 取决于消息的 QoS 等级; QoS 0 会以 `non` 类型下发QoS 1/2 会以 `con` 类型下发"""
- qos: 取决于消息的 QoS 等级; QoS 0 会以 `non` 类型下发QoS 1/2 会以 `con` 类型下发
"""
} }
} }
coap_subscribe_qos { coap_subscribe_qos {
desc { desc {
en: """The Default QoS Level indicator for subscribe request. en: """The Default QoS Level indicator for subscribe request.
This option specifies the QoS level for the CoAP Client when establishing a subscription membership, if the subscribe request is not carried `qos` option. The indicator can be set to: This option specifies the QoS level for the CoAP Client when establishing a subscription membership, if the subscribe request is not carried `qos` option. The indicator can be set to:<br/>
- qos0, qos1, qos2: Fixed default QoS level - qos0, qos1, qos2: Fixed default QoS level<br/>
- coap: Dynamic QoS level by the message type of subscribe request - coap: Dynamic QoS level by the message type of subscribe request<br/>
* qos0: If the subscribe request is non-confirmable * qos0: If the subscribe request is non-confirmable<br/>
* qos1: If the subscribe request is confirmable * qos1: If the subscribe request is confirmable"""
"""
zh: """客户端订阅请求的默认 QoS 等级。 zh: """客户端订阅请求的默认 QoS 等级。
当 CoAP 客户端发起订阅请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为: 当 CoAP 客户端发起订阅请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为:<br/>
- qos0、 qos1、qos2: 设置为固定的 QoS 等级 - qos0、 qos1、qos2: 设置为固定的 QoS 等级<br/>
- coap: 依据订阅操作的 CoAP 报文类型来动态决定 - coap: 依据订阅操作的 CoAP 报文类型来动态决定<br/>
* 当订阅请求为 `non-confirmable` 类型时,取值为 qos0 * 当订阅请求为 `non-confirmable` 类型时,取值为 qos0<br/>
* 当订阅请求为 `confirmable` 类型时,取值为 qos1 * 当订阅请求为 `confirmable` 类型时,取值为 qos1"""
"""
} }
} }
coap_publish_qos { coap_publish_qos {
desc { desc {
en: """The Default QoS Level indicator for publish request. en: """The Default QoS Level indicator for publish request.
This option specifies the QoS level for the CoAP Client when publishing a message to EMQX PUB/SUB system, if the publish request is not carried `qos` option. The indicator can be set to: This option specifies the QoS level for the CoAP Client when publishing a message to EMQX PUB/SUB system, if the publish request is not carried `qos` option. The indicator can be set to:<br/>
- qos0, qos1, qos2: Fixed default QoS level - qos0, qos1, qos2: Fixed default QoS level<br/>
- coap: Dynamic QoS level by the message type of publish request - coap: Dynamic QoS level by the message type of publish request<br/>
* qos0: If the publish request is non-confirmable * qos0: If the publish request is non-confirmable<br/>
* qos1: If the publish request is confirmable""" * qos1: If the publish request is confirmable"""
zh: """客户端发布请求的默认 QoS 等级。 zh: """客户端发布请求的默认 QoS 等级。
当 CoAP 客户端发起发布请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为: 当 CoAP 客户端发起发布请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为:<br>
- qos0、qos1、qos2: 设置为固定的 QoS 等级 - qos0、qos1、qos2: 设置为固定的 QoS 等级<br/>
- coap: 依据发布操作的 CoAP 报文类型来动态决定 - coap: 依据发布操作的 CoAP 报文类型来动态决定<br/>
* 当发布请求为 `non-confirmable` 类型时,取值为 qos0 * 当发布请求为 `non-confirmable` 类型时,取值为 qos0<br/>
* 当发布请求为 `confirmable` 类型时,取值为 qos1 * 当发布请求为 `confirmable` 类型时,取值为 qos1"""
"""
} }
} }
@ -220,14 +216,12 @@ For example, after receiving an update message from a client, any messages withi
lwm2m_update_msg_publish_condition { lwm2m_update_msg_publish_condition {
desc { desc {
en: """Policy for publishing UPDATE event message. en: """Policy for publishing UPDATE event message.<br/>
- always: send update events as long as the UPDATE request is received. - always: send update events as long as the UPDATE request is received.<br/>
- contains_object_list: send update events only if the UPDATE request carries any Object List - contains_object_list: send update events only if the UPDATE request carries any Object List"""
""" zh: """发布UPDATE事件消息的策略。<br/>
zh: """发布UPDATE事件消息的策略。 - always: 只要收到 UPDATE 请求,就发送更新事件。<br/>
- always: 只要收到 UPDATE 请求,就发送更新事件。 - contains_object_list: 仅当 UPDATE 请求携带 Object 列表时才发送更新事件。"""
- contains_object_list: 仅当 UPDATE 请求携带 Object 列表时才发送更新事件。
"""
} }
} }
@ -378,8 +372,8 @@ After succeed observe a resource of LwM2M client, Gateway will send the notify e
gateway_common_mountpoint { gateway_common_mountpoint {
desc { desc {
en: """ """ en: """"""
zh: """ """ zh: """"""
} }
} }
@ -439,8 +433,8 @@ After succeed observe a resource of LwM2M client, Gateway will send the notify e
tcp_listener { tcp_listener {
desc { desc {
en: """ """ en: """"""
zh: """ """ zh: """"""
} }
} }
@ -476,8 +470,8 @@ EMQX will close the TCP connection if proxy protocol packet is not received with
ssl_listener { ssl_listener {
desc { desc {
en: """ """ en: """"""
zh: """ """ zh: """"""
} }
} }
@ -490,8 +484,8 @@ EMQX will close the TCP connection if proxy protocol packet is not received with
udp_listener { udp_listener {
desc { desc {
en: """ """ en: """"""
zh: """ """ zh: """"""
} }
} }
@ -541,8 +535,8 @@ See: https://erlang.org/doc/man/inet.html#setopts-2"""
dtls_listener { dtls_listener {
desc { desc {
en: """ """ en: """"""
zh: """ """ zh: """"""
} }
} }
@ -601,19 +595,25 @@ When set to <code>false</code> clients will be allowed to connect without authen
gateway_common_listener_mountpoint { gateway_common_listener_mountpoint {
desc { desc {
en: """When publishing or subscribing, prefix all topics with a mountpoint string. en: """When publishing or subscribing, prefix all topics with a mountpoint string.
The prefixed string will be removed from the topic name when the message is delivered to the subscriber. The mountpoint is a way that users can use to implement isolation of message routing between different listeners. The prefixed string will be removed from the topic name when the message is delivered to the subscriber.
For example if a client A subscribes to `t` with `listeners.tcp.\<name>.mountpoint` set to `some_tenant`, then the client actually subscribes to the topic `some_tenant/t`. Similarly, if another client B (connected to the same listener as the client A) sends a message to topic `t`, the message is routed to all the clients subscribed `some_tenant/t`, so client A will receive the message, with topic name `t`. Set to `\"\"` to disable the feature. The mountpoint is a way that users can use to implement isolation of message routing between different listeners.
Variables in mountpoint string: For example if a client A subscribes to `t` with `listeners.tcp.\<name>.mountpoint` set to `some_tenant`,
- <code>${clientid}</code>: clientid then the client actually subscribes to the topic `some_tenant/t`.
- <code>${username}</code>: username Similarly, if another client B (connected to the same listener as the client A) sends a message to topic `t`,
""" the message is routed to all the clients subscribed `some_tenant/t`,
so client A will receive the message, with topic name `t`. Set to `\"\"` to disable the feature.
Variables in mountpoint string:<br/>
- <code>${clientid}</code>: clientid<br/>
- <code>${username}</code>: username"""
zh: """发布或订阅时,在所有主题前增加前缀字符串。 zh: """发布或订阅时,在所有主题前增加前缀字符串。
当消息投递给订阅者时,前缀字符串将从主题名称中删除。挂载点是用户可以用来实现不同监听器之间的消息路由隔离的一种方式。 当消息投递给订阅者时,前缀字符串将从主题名称中删除。挂载点是用户可以用来实现不同监听器之间的消息路由隔离的一种方式。
例如,如果客户端 A 在 `listeners.tcp.\<name>.mountpoint` 设置为 `some_tenant` 的情况下订阅 `t`,则客户端实际上订阅了 `some_tenant/t` 主题。 类似地,如果另一个客户端 B连接到与客户端 A 相同的侦听器)向主题 `t` 发送消息,则该消息被路由到所有订阅了 `some_tenant/t` 的客户端,因此客户端 A 将收到该消息,带有 主题名称`t`。 设置为 `\"\"` 以禁用该功能。 例如,如果客户端 A 在 `listeners.tcp.\<name>.mountpoint` 设置为 `some_tenant` 的情况下订阅 `t`
挂载点字符串中可用的变量: 则客户端实际上订阅了 `some_tenant/t` 主题。
- <code>${clientid}</code>clientid 类似地,如果另一个客户端 B连接到与客户端 A 相同的侦听器)向主题 `t` 发送消息,
- <code>${username}</code>:用户名 则该消息被路由到所有订阅了 `some_tenant/t` 的客户端,因此客户端 A 将收到该消息,带有 主题名称`t`。 设置为 `\"\"` 以禁用该功能。
""" 挂载点字符串中可用的变量:<br/>
- <code>${clientid}</code>clientid<br/>
- <code>${username}</code>:用户名"""
} }
} }

View File

@ -16,14 +16,13 @@ emqx_mgmt_api_key_schema {
``` ```
7e729ae70d23144b:2QILI9AcQ9BYlVqLDHQNWN2saIjBV4egr1CZneTNKr9CpK 7e729ae70d23144b:2QILI9AcQ9BYlVqLDHQNWN2saIjBV4egr1CZneTNKr9CpK
ec3907f865805db0:Ee3taYltUKtoBVD9C3XjQl9C6NXheip8Z9B69BpUv5JxVHL ec3907f865805db0:Ee3taYltUKtoBVD9C3XjQl9C6NXheip8Z9B69BpUv5JxVHL
``` ```"""
"""
zh: """用于在启动 emqx 时,添加 API 密钥,其格式为: zh: """用于在启动 emqx 时,添加 API 密钥,其格式为:
``` ```
7e729ae70d23144b:2QILI9AcQ9BYlVqLDHQNWN2saIjBV4egr1CZneTNKr9CpK 7e729ae70d23144b:2QILI9AcQ9BYlVqLDHQNWN2saIjBV4egr1CZneTNKr9CpK
ec3907f865805db0:Ee3taYltUKtoBVD9C3XjQl9C6NXheip8Z9B69BpUv5JxVHL ec3907f865805db0:Ee3taYltUKtoBVD9C3XjQl9C6NXheip8Z9B69BpUv5JxVHL
``` ```"""
"""
} }
label { label {
en: "Initialize api_key file." en: "Initialize api_key file."

View File

@ -2,28 +2,24 @@
emqx_mgmt_api_publish { emqx_mgmt_api_publish {
publish_api { publish_api {
desc { desc {
en: """ en: """Publish one message.<br/>
Publish one message.<br/>
Possible HTTP status response codes are:<br/> Possible HTTP status response codes are:<br/>
<code>200</code>: The message is delivered to at least one subscriber;<br/> <code>200</code>: The message is delivered to at least one subscriber;<br/>
<code>202</code>: No matched subscribers;<br/> <code>202</code>: No matched subscribers;<br/>
<code>400</code>: Message is invalid. for example bad topic name, or QoS is out of range;<br/> <code>400</code>: Message is invalid. for example bad topic name, or QoS is out of range;<br/>
<code>503</code>: Failed to deliver the message to subscriber(s);<br/> <code>503</code>: Failed to deliver the message to subscriber(s)"""
"""
zh: """ zh: """发布一个消息。<br/>
发布一个消息。<br/>
可能的 HTTP 状态码如下:<br/> 可能的 HTTP 状态码如下:<br/>
200: 消息被成功发送到至少一个订阅。<br/> 200: 消息被成功发送到至少一个订阅。<br/>
202: 没有匹配到任何订阅。<br/> 202: 没有匹配到任何订阅。<br/>
400: 消息编码错误,如非法主题,或 QoS 超出范围等。<br/> 400: 消息编码错误,如非法主题,或 QoS 超出范围等。<br/>
503: 服务重启等过程中导致转发失败。<br/><br/> 503: 服务重启等过程中导致转发失败。"""
"""
} }
} }
publish_bulk_api { publish_bulk_api {
desc { desc {
en: """ en: """Publish a batch of messages.<br/>
Publish a batch of messages.<br/>
Possible HTTP response status code are:<br/> Possible HTTP response status code are:<br/>
200: All messages are delivered to at least one subscriber;<br/> 200: All messages are delivered to at least one subscriber;<br/>
202: At least one message was not delivered to any subscriber;<br/> 202: At least one message was not delivered to any subscriber;<br/>
@ -33,10 +29,8 @@ Possible HTTP response status code are:<br/>
In case there is at lest one invalid message in the batch, the HTTP response body In case there is at lest one invalid message in the batch, the HTTP response body
is the same as for <code>/publish</code> API.<br/> is the same as for <code>/publish</code> API.<br/>
Otherwise the HTTP response body is an array of JSON objects indicating the publish Otherwise the HTTP response body is an array of JSON objects indicating the publish
result of each individual message in the batch. result of each individual message in the batch."""
""" zh: """批量发布一组消息。<br/>
zh: """
批量发布一组消息。<br/>
可能的 HTTP 状态码如下:<br/> 可能的 HTTP 状态码如下:<br/>
200: 所有的消息都被成功发送到至少一个订阅。<br/> 200: 所有的消息都被成功发送到至少一个订阅。<br/>
202: 至少有一个消息没有匹配到任何订阅。<br/> 202: 至少有一个消息没有匹配到任何订阅。<br/>
@ -45,9 +39,7 @@ result of each individual message in the batch.
请求的 Body 或者 Body 中包含的某个消息无法通过 API 规范的类型检查时HTTP 响应的消息与发布单个消息的 API 请求的 Body 或者 Body 中包含的某个消息无法通过 API 规范的类型检查时HTTP 响应的消息与发布单个消息的 API
<code>/publish</code> 是一样的。 <code>/publish</code> 是一样的。
如果所有的消息都是合法的,那么 HTTP 返回的内容是一个 JSON 数组,每个元素代表了该消息转发的状态。 如果所有的消息都是合法的,那么 HTTP 返回的内容是一个 JSON 数组,每个元素代表了该消息转发的状态。"""
"""
} }
} }
@ -89,8 +81,7 @@ result of each individual message in the batch.
} }
reason_code { reason_code {
desc { desc {
en: """ en: """The MQTT reason code, as the same ones used in PUBACK packet.<br/>
The MQTT reason code, as the same ones used in PUBACK packet.<br/>
Currently supported codes are:<br/> Currently supported codes are:<br/>
16(0x10): No matching subscribers;<br/> 16(0x10): No matching subscribers;<br/>
@ -98,18 +89,15 @@ Currently supported codes are:<br/>
144(0x90): Topic name invalid;<br/> 144(0x90): Topic name invalid;<br/>
151(0x97): Publish rate limited, or message size exceeded limit. The global size limit can be configured with <code>mqtt.max_packet_size</code><br/> 151(0x97): Publish rate limited, or message size exceeded limit. The global size limit can be configured with <code>mqtt.max_packet_size</code><br/>
NOTE: The message size is estimated with the received topic and payload size, meaning the actual size of serialized bytes (when sent to MQTT subscriber) NOTE: The message size is estimated with the received topic and payload size, meaning the actual size of serialized bytes (when sent to MQTT subscriber)
might be slightly over the limit. might be slightly over the limit."""
""" zh: """MQTT 消息发布的错误码,这些错误码也是 MQTT 规范中 PUBACK 消息可能携带的错误码。<br/>
zh: """
MQTT 消息发布的错误码,这些错误码也是 MQTT 规范中 PUBACK 消息可能携带的错误码。<br/>
当前支持如下错误码:<br/> 当前支持如下错误码:<br/>
16(0x10):没能匹配到任何订阅;<br/> 16(0x10):没能匹配到任何订阅;<br/>
131(0x81):消息转发时发生错误,例如 EMQX 服务重启;<br/> 131(0x81):消息转发时发生错误,例如 EMQX 服务重启;<br/>
144(0x90):主题名称非法;<br/> 144(0x90):主题名称非法;<br/>
151(0x97):受到了速率限制,或者消息尺寸过大。全局消息大小限制可以通过配置项 <code>mqtt.max_packet_size</code> 来进行修改。<br/> 151(0x97):受到了速率限制,或者消息尺寸过大。全局消息大小限制可以通过配置项 <code>mqtt.max_packet_size</code> 来进行修改。<br/>
注意:消息尺寸的是通过主题和消息体的字节数进行估算的。具体发布时所占用的字节数可能会稍大于这个估算的值。 注意:消息尺寸的是通过主题和消息体的字节数进行估算的。具体发布时所占用的字节数可能会稍大于这个估算的值。"""
"""
} }
} }
error_message { error_message {
@ -127,9 +115,7 @@ MQTT 消息发布的错误码,这些错误码也是 MQTT 规范中 PUBACK 消
msg_payload_format_indicator { msg_payload_format_indicator {
desc { desc {
en: """0 (0x00) Byte Indicates that the Payload is unspecified bytes, which is equivalent to not sending a Payload Format Indicator. en: """0 (0x00) Byte Indicates that the Payload is unspecified bytes, which is equivalent to not sending a Payload Format Indicator.
1 (0x01) Byte Indicates that the Payload is UTF-8 Encoded Character Data. The UTF-8 data in the Payload MUST be well-formed UTF-8 as defined by the Unicode specification and restated in RFC 3629."""
1 (0x01) Byte Indicates that the Payload is UTF-8 Encoded Character Data. The UTF-8 data in the Payload MUST be well-formed UTF-8 as defined by the Unicode specification and restated in RFC 3629.
"""
zh: "载荷格式指示标识符0 表示载荷是未指定格式的数据相当于没有发送载荷格式指示1 表示载荷是 UTF-8 编码的字符数据,载荷中的 UTF-8 数据必须是按照 Unicode 的规范和 RFC 3629 的标准要求进行编码的。" zh: "载荷格式指示标识符0 表示载荷是未指定格式的数据相当于没有发送载荷格式指示1 表示载荷是 UTF-8 编码的字符数据,载荷中的 UTF-8 数据必须是按照 Unicode 的规范和 RFC 3629 的标准要求进行编码的。"
} }
} }

View File

@ -1,17 +1,14 @@
emqx_plugins_schema { emqx_plugins_schema {
plugins { plugins {
desc { desc {
en: """ en: """Manage EMQX plugins.<br/>
Manage EMQX plugins.<br/>
Plugins can be pre-built as a part of EMQX package, Plugins can be pre-built as a part of EMQX package,
or installed as a standalone package in a location specified by or installed as a standalone package in a location specified by
<code>install_dir</code> config key<br/> <code>install_dir</code> config key<br/>
The standalone-installed plugins are referred to as 'external' plugins. The standalone-installed plugins are referred to as 'external' plugins."""
"""
zh: """管理EMQX插件。<br/> zh: """管理EMQX插件。<br/>
插件可以是EMQX安装包中的一部分也可以是一个独立的安装包。<br/> 插件可以是EMQX安装包中的一部分也可以是一个独立的安装包。<br/>
独立安装的插件称为“外部插件”。 独立安装的插件称为“外部插件”。"""
"""
} }
label { label {
en: "Plugins" en: "Plugins"
@ -32,8 +29,7 @@ The standalone-installed plugins are referred to as 'external' plugins.
desc { desc {
en: """The {name}-{version} of the plugin.<br/> en: """The {name}-{version} of the plugin.<br/>
It should match the plugin application name-version as the for the plugin release package name<br/> It should match the plugin application name-version as the for the plugin release package name<br/>
For example: my_plugin-0.1.0. For example: my_plugin-0.1.0."""
"""
zh: """插件的名称{name}-{version}。<br/> zh: """插件的名称{name}-{version}。<br/>
它应该与插件的发布包名称一致如my_plugin-0.1.0。""" 它应该与插件的发布包名称一致如my_plugin-0.1.0。"""
} }
@ -65,14 +61,12 @@ The plugins are started in the defined order"""
} }
install_dir { install_dir {
desc { desc {
en: """ en: """The installation directory for the external plugins.
The installation directory for the external plugins.
The plugin beam files and configuration files should reside in The plugin beam files and configuration files should reside in
the subdirectory named as <code>emqx_foo_bar-0.1.0</code>. the subdirectory named as <code>emqx_foo_bar-0.1.0</code>.
<br/> <br/>
NOTE: For security reasons, this directory should **NOT** be writable NOTE: For security reasons, this directory should **NOT** be writable
by anyone except <code>emqx</code> (or any user which runs EMQX). by anyone except <code>emqx</code> (or any user which runs EMQX)."""
"""
zh: "插件安装包的目录,出于安全考虑,该目录应该值允许 <code>emqx</code>,或用于运行 EMQX 服务的用户拥有写入权限。" zh: "插件安装包的目录,出于安全考虑,该目录应该值允许 <code>emqx</code>,或用于运行 EMQX 服务的用户拥有写入权限。"
} }
label { label {
@ -83,11 +77,9 @@ by anyone except <code>emqx</code> (or any user which runs EMQX).
check_interval { check_interval {
desc { desc {
en: """Check interval: check if the status of the plugins in the cluster is consistent, <br/> en: """Check interval: check if the status of the plugins in the cluster is consistent, <br/>
if the results of 3 consecutive checks are not consistent, then alarm. if the results of 3 consecutive checks are not consistent, then alarm."""
"""
zh: """检查间隔:检查集群中插件的状态是否一致,<br/> zh: """检查间隔:检查集群中插件的状态是否一致,<br/>
如果连续3次检查结果不一致则报警。 如果连续3次检查结果不一致则报警。"""
"""
} }
} }
} }

View File

@ -40,15 +40,11 @@ For example, <code> { Authorization = "some-authz-tokens"}</code>"""
- ${name}: Name of EMQX node.<br/> - ${name}: Name of EMQX node.<br/>
- ${host}: Host name of EMQX node.<br/> - ${host}: Host name of EMQX node.<br/>
For example, when the EMQX node name is <code>emqx@127.0.0.1</code> then the <code>name</code> variable takes value <code>emqx</code> and the <code>host</code> variable takes value <code>127.0.0.1</code>.<br/> For example, when the EMQX node name is <code>emqx@127.0.0.1</code> then the <code>name</code> variable takes value <code>emqx</code> and the <code>host</code> variable takes value <code>127.0.0.1</code>.<br/>
Default value is: <code>${name}/instance/${name}~${host}</code>"""
Default value is: <code>${name}/instance/${name}~${host}</code>
"""
zh: """推送到 Push Gateway 的 Job 名称。可用变量为:<br/> zh: """推送到 Push Gateway 的 Job 名称。可用变量为:<br/>
- ${name}: EMQX 节点的名称。 - ${name}: EMQX 节点的名称。
- ${host}: EMQX 节点主机名。 - ${host}: EMQX 节点主机名。
例如,当 EMQX 节点名为 <code>emqx@127.0.0.1</code> 则 name 变量的值为 <code>emqx</code>host 变量的值为 <code>127.0.0.1</code>。<br/> 例如,当 EMQX 节点名为 <code>emqx@127.0.0.1</code> 则 name 变量的值为 <code>emqx</code>host 变量的值为 <code>127.0.0.1</code>。<br/>
默认值为: <code>${name}/instance/${name}~${host}</code>""" 默认值为: <code>${name}/instance/${name}~${host}</code>"""
} }
} }

View File

@ -10,8 +10,7 @@ configured, such as <code>RSA-PSK-AES256-GCM-SHA384</code>.
See listener SSL options config for more details. See listener SSL options config for more details.
The IDs and secrets can be provided from a file which is configurable by the <code>init_file</code> field. The IDs and secrets can be provided from a file which is configurable by the <code>init_file</code> field."""
"""
zh: """此配置用于启用 TLS-PSK 身份验证。 zh: """此配置用于启用 TLS-PSK 身份验证。
PSK 是 “Pre-Shared-Keys” 的缩写。 PSK 是 “Pre-Shared-Keys” 的缩写。

View File

@ -24,8 +24,7 @@ emqx_retainer_schema {
msg_clear_interval { msg_clear_interval {
desc { desc {
en: """Periodic interval for cleaning up expired messages. en: """Periodic interval for cleaning up expired messages.
Never clear if the value is 0. Never clear if the value is 0."""
"""
zh: "消息清理间隔。0 代表不进行清理" zh: "消息清理间隔。0 代表不进行清理"
} }
} }
@ -99,8 +98,7 @@ If this field is empty, limiter is not used."""
zh: """批量发送的限流器的名称。 zh: """批量发送的限流器的名称。
限流器可以用来防止短时间内向客户端发送太多的消息,从而避免过多的消息导致客户端队列堵塞甚至崩溃。 限流器可以用来防止短时间内向客户端发送太多的消息,从而避免过多的消息导致客户端队列堵塞甚至崩溃。
这个名称需要是指向 `limiter.batch` 下的一个真实存在的限流器。 这个名称需要是指向 `limiter.batch` 下的一个真实存在的限流器。
如果这个字段为空,则不使用限流器。 如果这个字段为空,则不使用限流器。"""
"""
} }
} }

View File

@ -344,11 +344,11 @@ emqx_rule_api_schema {
rule_id { rule_id {
desc { desc {
en: "The ID of the rule" en: "The ID of the rule"
zh: "规则的 ID " zh: "规则的 ID"
} }
label: { label: {
en: "Rule ID" en: "Rule ID"
zh: "规则 ID " zh: "规则 ID"
} }
} }

View File

@ -13,14 +13,10 @@ emqx_rule_engine_schema {
rules_sql { rules_sql {
desc { desc {
en: """ en: """SQL query to transform the messages.
SQL query to transform the messages. Example: <code>SELECT * FROM "test/topic" WHERE payload.x = 1</code>"""
Example: <code>SELECT * FROM "test/topic" WHERE payload.x = 1</code> zh: """用于处理消息的 SQL 。
""" 示例:<code>SELECT * FROM "test/topic" WHERE payload.x = 1</code>"""
zh: """
用于处理消息的 SQL 。
示例:<code>SELECT * FROM "test/topic" WHERE payload.x = 1</code>
"""
} }
label: { label: {
en: "Rule SQL" en: "Rule SQL"
@ -30,8 +26,7 @@ Example: <code>SELECT * FROM "test/topic" WHERE payload.x = 1</code>
rules_actions { rules_actions {
desc { desc {
en: """ en: """A list of actions of the rule.
A list of actions of the rule.
An action can be a string that refers to the channel ID of an EMQX bridge, or an object An action can be a string that refers to the channel ID of an EMQX bridge, or an object
that refers to a function. that refers to a function.
There a some built-in functions like "republish" and "console", and we also support user There a some built-in functions like "republish" and "console", and we also support user
@ -42,16 +37,14 @@ be executed until it returns.
If one of the action crashed, all other actions come after it will still be executed, in the If one of the action crashed, all other actions come after it will still be executed, in the
original order. original order.
If there's any error when running an action, there will be an error message, and the 'failure' If there's any error when running an action, there will be an error message, and the 'failure'
counter of the function action or the bridge channel will increase. counter of the function action or the bridge channel will increase."""
"""
zh: """ zh: """规则的动作列表。
规则的动作列表。
动作可以是指向 EMQX bridge 的引用,也可以是一个指向函数的对象。 动作可以是指向 EMQX bridge 的引用,也可以是一个指向函数的对象。
我们支持一些内置函数如“republish”和“console”我们还支持用户提供的函数它的格式为“{module}:{function}”。 我们支持一些内置函数如“republish”和“console”我们还支持用户提供的函数它的格式为“{module}:{function}”。
列表中的动作按顺序执行。这意味着如果其中一个动作执行缓慢,则以下所有动作都不会被执行直到它返回。 列表中的动作按顺序执行。这意味着如果其中一个动作执行缓慢,则以下所有动作都不会被执行直到它返回。
如果其中一个动作崩溃,在它之后的所有动作仍然会被按照原始顺序执行。 如果其中一个动作崩溃,在它之后的所有动作仍然会被按照原始顺序执行。
如果运行动作时出现任何错误,则会出现错误消息,并且相应的计数器会增加。 如果运行动作时出现任何错误,则会出现错误消息,并且相应的计数器会增加。"""
"""
} }
label: { label: {
en: "Rule Action List" en: "Rule Action List"
@ -116,19 +109,16 @@ counter of the function action or the bridge channel will increase.
user_provided_function_function { user_provided_function_function {
desc { desc {
en: """ en: """The user provided function. Should be in the format: '{module}:{function}'.
The user provided function. Should be in the format: '{module}:{function}'.
Where {module} is the Erlang callback module and {function} is the Erlang function. Where {module} is the Erlang callback module and {function} is the Erlang function.
To write your own function, checkout the function <code>console</code> and To write your own function, checkout the function <code>console</code> and
<code>republish</code> in the source file: <code>republish</code> in the source file:
<code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> as an example. <code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> as an example."""
"""
zh: """ zh: """用户提供的函数。 格式应为:'{module}:{function}'。
用户提供的函数。 格式应为:'{module}:{function}'。
其中 {module} 是 Erlang 回调模块, {function} 是 Erlang 函数。 其中 {module} 是 Erlang 回调模块, {function} 是 Erlang 函数。
要编写自己的函数,请检查源文件:<code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> 中的示例函数 <code>console</code> 和<code>republish</code> 。 要编写自己的函数,请检查源文件:<code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> 中的示例函数 <code>console</code> 和<code>republish</code> 。"""
"""
} }
label: { label: {
en: "User Provided Function" en: "User Provided Function"
@ -138,15 +128,11 @@ To write your own function, checkout the function <code>console</code> and
user_provided_function_args { user_provided_function_args {
desc { desc {
en: """ en: """The args will be passed as the 3rd argument to module:function/3,
The args will be passed as the 3rd argument to module:function/3,
checkout the function <code>console</code> and <code>republish</code> in the source file: checkout the function <code>console</code> and <code>republish</code> in the source file:
<code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> as an example. <code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> as an example."""
""" zh: """用户提供的参数将作为函数 module:function/3 的第三个参数,
zh: """ 请检查源文件:<code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> 中的示例函数 <code>console</code> 和<code>republish</code> 。"""
用户提供的参数将作为函数 module:function/3 的第三个参数,
请检查源文件:<code>apps/emqx_rule_engine/src/emqx_rule_actions.erl</code> 中的示例函数 <code>console</code> 和<code>republish</code> 。
"""
} }
label: { label: {
en: "User Provided Function Args" en: "User Provided Function Args"
@ -156,14 +142,10 @@ checkout the function <code>console</code> and <code>republish</code> in the sou
republish_args_topic { republish_args_topic {
desc { desc {
en: """ en: """The target topic of message to be re-published.
The target topic of message to be re-published. Template with variables is allowed, see description of the 'republish_args'."""
Template with variables is allowed, see description of the 'republish_args'. zh: """重新发布消息的目标主题。
""" 允许使用带有变量的模板请参阅“republish_args”的描述。"""
zh: """
重新发布消息的目标主题。
允许使用带有变量的模板请参阅“republish_args”的描述。
"""
} }
label: { label: {
en: "Target Topic" en: "Target Topic"
@ -173,16 +155,12 @@ Template with variables is allowed, see description of the 'republish_args'.
republish_args_qos { republish_args_qos {
desc { desc {
en: """ en: """The qos of the message to be re-published.
The qos of the message to be re-published.
Template with variables is allowed, see description of the 'republish_args'. Template with variables is allowed, see description of the 'republish_args'.
Defaults to ${qos}. If variable ${qos} is not found from the selected result of the rule, Defaults to ${qos}. If variable ${qos} is not found from the selected result of the rule,
0 is used. 0 is used."""
""" zh: """要重新发布的消息的 qos。允许使用带有变量的模板请参阅“republish_args”的描述。
zh: """ 默认为 ${qos}。 如果从规则的选择结果中没有找到变量 ${qos},则使用 0。"""
要重新发布的消息的 qos。允许使用带有变量的模板请参阅“republish_args”的描述。
默认为 ${qos}。 如果从规则的选择结果中没有找到变量 ${qos},则使用 0。
"""
} }
label: { label: {
en: "Message QoS" en: "Message QoS"
@ -192,16 +170,12 @@ Defaults to ${qos}. If variable ${qos} is not found from the selected result of
republish_args_retain { republish_args_retain {
desc { desc {
en: """ en: """The 'retain' flag of the message to be re-published.
The 'retain' flag of the message to be re-published.
Template with variables is allowed, see description of the 'republish_args'. Template with variables is allowed, see description of the 'republish_args'.
Defaults to ${retain}. If variable ${retain} is not found from the selected result Defaults to ${retain}. If variable ${retain} is not found from the selected result
of the rule, false is used. of the rule, false is used."""
""" zh: """要重新发布的消息的“保留”标志。允许使用带有变量的模板请参阅“republish_args”的描述。
zh: """ 默认为 ${retain}。 如果从所选结果中未找到变量 ${retain},则使用 false。"""
要重新发布的消息的“保留”标志。允许使用带有变量的模板请参阅“republish_args”的描述。
默认为 ${retain}。 如果从所选结果中未找到变量 ${retain},则使用 false。
"""
} }
label: { label: {
en: "Retain Flag" en: "Retain Flag"
@ -211,16 +185,12 @@ of the rule, false is used.
republish_args_payload { republish_args_payload {
desc { desc {
en: """ en: """The payload of the message to be re-published.
The payload of the message to be re-published.
Template with variables is allowed, see description of the 'republish_args'. Template with variables is allowed, see description of the 'republish_args'.
Defaults to ${payload}. If variable ${payload} is not found from the selected result Defaults to ${payload}. If variable ${payload} is not found from the selected result
of the rule, then the string "undefined" is used. of the rule, then the string "undefined" is used."""
""" zh: """要重新发布的消息的有效负载。允许使用带有变量的模板请参阅“republish_args”的描述。
zh: """ 默认为 ${payload}。 如果从所选结果中未找到变量 ${payload},则使用字符串 "undefined"。"""
要重新发布的消息的有效负载。允许使用带有变量的模板请参阅“republish_args”的描述。
默认为 ${payload}。 如果从所选结果中未找到变量 ${payload},则使用字符串 "undefined"。
"""
} }
label: { label: {
en: "Message Payload" en: "Message Payload"
@ -229,8 +199,7 @@ of the rule, then the string "undefined" is used.
} }
republish_args_user_properties { republish_args_user_properties {
desc { desc {
en: """ en: """From which variable should the MQTT message's User-Property pairs be taken from.
From which variable should the MQTT message's User-Property pairs be taken from.
The value must be a map. The value must be a map.
You may configure it to <code>${pub_props.'User-Property'}</code> or You may configure it to <code>${pub_props.'User-Property'}</code> or
use <code>SELECT *,pub_props.'User-Property' as user_properties</code> use <code>SELECT *,pub_props.'User-Property' as user_properties</code>
@ -238,17 +207,15 @@ to forward the original user properties to the republished message.
You may also call <code>map_put</code> function like You may also call <code>map_put</code> function like
<code>map_put('my-prop-name', 'my-prop-value', user_properties) as user_properties</code> <code>map_put('my-prop-name', 'my-prop-value', user_properties) as user_properties</code>
to inject user properties. to inject user properties.
NOTE: MQTT spec allows duplicated user property names, but EMQX Rule-Engine does not. NOTE: MQTT spec allows duplicated user property names, but EMQX Rule-Engine does not."""
"""
zh: """ zh: """指定使用哪个变量来填充 MQTT 消息的 User-Property 列表。这个变量的值必须是一个 map 类型。
指定使用哪个变量来填充 MQTT 消息的 User-Property 列表。这个变量的值必须是一个 map 类型。
可以设置成 <code>${pub_props.'User-Property'}</code> 或者 可以设置成 <code>${pub_props.'User-Property'}</code> 或者
使用 <code>SELECT *,pub_props.'User-Property' as user_properties</code> 来把源 MQTT 消息 使用 <code>SELECT *,pub_props.'User-Property' as user_properties</code> 来把源 MQTT 消息
的 User-Property 列表用于填充。 的 User-Property 列表用于填充。
也可以使用 <code>map_put</code> 函数来添加新的 User-Property 也可以使用 <code>map_put</code> 函数来添加新的 User-Property
<code>map_put('my-prop-name', 'my-prop-value', user_properties) as user_properties</code> <code>map_put('my-prop-name', 'my-prop-value', user_properties) as user_properties</code>
注意MQTT 协议允许一个消息中出现多次同一个 property 名,但是 EMQX 的规则引擎不允许。 注意MQTT 协议允许一个消息中出现多次同一个 property 名,但是 EMQX 的规则引擎不允许。"""
"""
} }
} }
@ -370,8 +337,7 @@ Then there are 3 variables available: <code>clientid</code>, <code>qos</code> an
When the rule is triggered by an MQTT message with payload = `hello`, qos = 1, When the rule is triggered by an MQTT message with payload = `hello`, qos = 1,
clientid = `Steve`, the rule will republish a new MQTT message to topic `t/Steve`, clientid = `Steve`, the rule will republish a new MQTT message to topic `t/Steve`,
payload = `msg: hello`, and `qos = 1`.""" payload = `msg: hello`, and `qos = 1`."""
zh: """ zh: """内置 'republish' 动作的参数。
内置 'republish' 动作的参数。
可以在参数中使用变量。 可以在参数中使用变量。
变量是规则中选择的字段。 例如规则 SQL 定义如下: 变量是规则中选择的字段。 例如规则 SQL 定义如下:
<code> <code>

View File

@ -103,11 +103,9 @@ emqx_ee_bridge_gcp_pubsub {
matching `local_topic` will be forwarded.</br> matching `local_topic` will be forwarded.</br>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
"""
zh: """发送到 'local_topic' 的消息都会转发到 GCP PubSub。 </br> zh: """发送到 'local_topic' 的消息都会转发到 GCP PubSub。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 GCP PubSub。 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 GCP PubSub。"""
"""
} }
label { label {
en: "Local Topic" en: "Local Topic"

View File

@ -1,17 +1,13 @@
emqx_ee_bridge_hstreamdb { emqx_ee_bridge_hstreamdb {
local_topic { local_topic {
desc { desc {
en: """ en: """The MQTT topic filter to be forwarded to the HStreamDB. All MQTT 'PUBLISH' messages with the topic
The MQTT topic filter to be forwarded to the HStreamDB. All MQTT 'PUBLISH' messages with the topic
matching the local_topic will be forwarded.</br> matching the local_topic will be forwarded.</br>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
""" zh: """发送到 'local_topic' 的消息都会转发到 HStreamDB。 </br>
zh: """ 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HStreamDB。"""
发送到 'local_topic' 的消息都会转发到 HStreamDB。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HStreamDB。
"""
} }
label { label {
en: "Local Topic" en: "Local Topic"

View File

@ -5,11 +5,9 @@ emqx_ee_bridge_influxdb {
matching the local_topic will be forwarded.</br> matching the local_topic will be forwarded.</br>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
"""
zh: """发送到 'local_topic' 的消息都会转发到 InfluxDB。 </br> zh: """发送到 'local_topic' 的消息都会转发到 InfluxDB。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 InfluxDB。 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 InfluxDB。"""
"""
} }
label { label {
en: "Local Topic" en: "Local Topic"
@ -24,16 +22,14 @@ See also [InfluxDB 2.3 Line Protocol](https://docs.influxdata.com/influxdb/v2.3/
TLDR:</br> TLDR:</br>
``` ```
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>] <measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
``` ```"""
"""
zh: """使用 InfluxDB API Line Protocol 写入 InfluxDB 的数据,支持占位符</br> zh: """使用 InfluxDB API Line Protocol 写入 InfluxDB 的数据,支持占位符</br>
参考 [InfluxDB 2.3 Line Protocol](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/line-protocol/) 及 参考 [InfluxDB 2.3 Line Protocol](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/line-protocol/) 及
[InfluxDB 1.8 Line Protocol](https://docs.influxdata.com/influxdb/v1.8/write_protocols/line_protocol_tutorial/) </br> [InfluxDB 1.8 Line Protocol](https://docs.influxdata.com/influxdb/v1.8/write_protocols/line_protocol_tutorial/) </br>
TLDR: </br> TLDR: </br>
``` ```
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>] <measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
``` ```"""
"""
} }
label { label {
en: "Write Syntax" en: "Write Syntax"

View File

@ -325,10 +325,10 @@ emqx_ee_bridge_kafka {
desc { desc {
en: "Partition strategy is to tell the producer how to dispatch messages to Kafka partitions.\n\n" en: "Partition strategy is to tell the producer how to dispatch messages to Kafka partitions.\n\n"
"<code>random</code>: Randomly pick a partition for each message\n" "<code>random</code>: Randomly pick a partition for each message\n"
"<code>key_dispatch</code>: Hash Kafka message key to a partition number\n" "<code>key_dispatch</code>: Hash Kafka message key to a partition number"
zh: "设置消息发布时应该如何选择 Kafka 分区。\n\n" zh: "设置消息发布时应该如何选择 Kafka 分区。\n\n"
"<code>random</code>: 为每个消息随机选择一个分区。\n" "<code>random</code>: 为每个消息随机选择一个分区。\n"
"<code>key_dispatch</code>: Hash Kafka message key to a partition number\n" "<code>key_dispatch</code>: Hash Kafka message key to a partition number"
} }
label { label {
en: "Partition Strategy" en: "Partition Strategy"
@ -341,11 +341,11 @@ emqx_ee_bridge_kafka {
"before it sends back the acknowledgement to EMQX Kafka producer\n\n" "before it sends back the acknowledgement to EMQX Kafka producer\n\n"
"<code>all_isr</code>: Require all in-sync replicas to acknowledge.\n" "<code>all_isr</code>: Require all in-sync replicas to acknowledge.\n"
"<code>leader_only</code>: Require only the partition-leader's acknowledgement.\n" "<code>leader_only</code>: Require only the partition-leader's acknowledgement.\n"
"<code>none</code>: No need for Kafka to acknowledge at all.\n" "<code>none</code>: No need for Kafka to acknowledge at all."
zh: "设置 Kafka leader 在返回给 EMQX 确认之前需要等待多少个 follower 的确认。\n\n" zh: "设置 Kafka leader 在返回给 EMQX 确认之前需要等待多少个 follower 的确认。\n\n"
"<code>all_isr</code>: 需要所有的在线复制者都确认。\n" "<code>all_isr</code>: 需要所有的在线复制者都确认。\n"
"<code>leader_only</code>: 仅需要分区 leader 确认。\n" "<code>leader_only</code>: 仅需要分区 leader 确认。\n"
"<code>none</code>: 无需 Kafka 回复任何确认。\n" "<code>none</code>: 无需 Kafka 回复任何确认。"
} }
label { label {
en: "Required Acks" en: "Required Acks"
@ -382,7 +382,7 @@ emqx_ee_bridge_kafka {
desc { desc {
en: "Configure producer message buffer.\n\n" en: "Configure producer message buffer.\n\n"
"Tell Kafka producer how to buffer messages when EMQX has more messages to send than " "Tell Kafka producer how to buffer messages when EMQX has more messages to send than "
"Kafka can keep up, or when Kafka is down.\n\n" "Kafka can keep up, or when Kafka is down."
zh: "配置消息缓存的相关参数。\n\n" zh: "配置消息缓存的相关参数。\n\n"
"当 EMQX 需要发送的消息超过 Kafka 处理能力,或者当 Kafka 临时下线时EMQX 内部会将消息缓存起来。" "当 EMQX 需要发送的消息超过 Kafka 处理能力,或者当 Kafka 临时下线时EMQX 内部会将消息缓存起来。"
} }

View File

@ -6,11 +6,9 @@ emqx_ee_bridge_mysql {
matching the local_topic will be forwarded.</br> matching the local_topic will be forwarded.</br>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
"""
zh: """发送到 'local_topic' 的消息都会转发到 MySQL。 </br> zh: """发送到 'local_topic' 的消息都会转发到 MySQL。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。"""
"""
} }
label { label {
en: "Local Topic" en: "Local Topic"

View File

@ -6,11 +6,9 @@ emqx_ee_bridge_pgsql {
matching the local_topic will be forwarded.</br> matching the local_topic will be forwarded.</br>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
"""
zh: """发送到 'local_topic' 的消息都会转发到 PostgreSQL。 </br> zh: """发送到 'local_topic' 的消息都会转发到 PostgreSQL。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。"""
"""
} }
label { label {
en: "Local Topic" en: "Local Topic"

View File

@ -5,11 +5,9 @@ emqx_ee_bridge_redis {
matching the local_topic will be forwarded.</br> matching the local_topic will be forwarded.</br>
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
configured, then both the data got from the rule and the MQTT messages that match local_topic configured, then both the data got from the rule and the MQTT messages that match local_topic
will be forwarded. will be forwarded."""
"""
zh: """发送到 'local_topic' 的消息都会转发到 Redis。 </br> zh: """发送到 'local_topic' 的消息都会转发到 Redis。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 Redis。 注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 Redis。"""
"""
} }
label { label {
en: "Local Topic" en: "Local Topic"
@ -21,11 +19,9 @@ will be forwarded.
desc { desc {
en: """Redis command template used to export messages. Each list element stands for a command name or its argument. en: """Redis command template used to export messages. Each list element stands for a command name or its argument.
For example, to push payloads in a Redis list by key `msgs`, the elements should be the following: For example, to push payloads in a Redis list by key `msgs`, the elements should be the following:
`rpush`, `msgs`, `${payload}`. `rpush`, `msgs`, `${payload}`."""
"""
zh: """用于推送数据的 Redis 命令模板。 每个列表元素代表一个命令名称或其参数。 zh: """用于推送数据的 Redis 命令模板。 每个列表元素代表一个命令名称或其参数。
例如,要通过键值 `msgs` 将消息体推送到 Redis 列表中,数组元素应该是: `rpush`, `msgs`, `${payload}`。 例如,要通过键值 `msgs` 将消息体推送到 Redis 列表中,数组元素应该是: `rpush`, `msgs`, `${payload}`。"""
"""
} }
label { label {
en: "Redis Command Template" en: "Redis Command Template"

View File

@ -4,12 +4,10 @@ emqx_ee_connector_influxdb {
desc { desc {
en: """The IPv4 or IPv6 address or the hostname to connect to.</br> en: """The IPv4 or IPv6 address or the hostname to connect to.</br>
A host entry has the following form: `Host[:Port]`.</br> A host entry has the following form: `Host[:Port]`.</br>
The InfluxDB default port 8086 is used if `[:Port]` is not specified. The InfluxDB default port 8086 is used if `[:Port]` is not specified."""
"""
zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。</br> zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。</br>
主机名具有以下形式:`Host[:Port]`。</br> 主机名具有以下形式:`Host[:Port]`。</br>
如果未指定 `[:Port]`,则使用 InfluxDB 默认端口 8086。 如果未指定 `[:Port]`,则使用 InfluxDB 默认端口 8086。"""
"""
} }
label { label {
en: "Server Host" en: "Server Host"

View File

@ -12,7 +12,7 @@ emqx_license_schema {
"EMQX 自带一个默认的试用许可证," "EMQX 自带一个默认的试用许可证,"
"默认试用许可允许最多接入 100 个连接,签发时间是 2023年1月9日有效期是 5 年1825 天)。" "默认试用许可允许最多接入 100 个连接,签发时间是 2023年1月9日有效期是 5 年1825 天)。"
"若需要在生产环境部署,\n" "若需要在生产环境部署,\n"
"请访问 https://www.emqx.com/apply-licenses/emqx 来申请。\n" "请访问 https://www.emqx.com/apply-licenses/emqx 来申请。"
} }
label { label {
en: "License" en: "License"

116
scripts/check-i18n-style.escript Executable file
View File

@ -0,0 +1,116 @@
#!/usr/bin/env escript
-mode(compile).
-define(YELLOW, "\e[33m").
-define(RED, "\e[31m").
-define(RESET, "\e[39m").
main([Files0]) ->
_ = put(errors, 0),
Files = string:tokens(Files0, "\n"),
ok = load_hocon(),
ok = lists:foreach(fun check/1, Files),
case get(errors) of
1 ->
logerr("1 error found~n", []);
N when is_integer(N) andalso N > 1 ->
logerr("~p errors found~n", [N]);
_ ->
io:format(user, "OK~n", [])
end.
load_hocon() ->
Dir = "_build/default/lib/hocon/ebin",
File = filename:join([Dir, "hocon.beam"]),
case filelib:is_regular(File) of
true ->
code:add_path(Dir),
ok;
false ->
die("HOCON is not compiled in " ++ Dir ++ "~n")
end.
die(Msg) ->
die(Msg, []).
die(Msg, Args) ->
ok = logerr(Msg, Args),
halt(1).
logerr(Fmt, Args) ->
io:format(standard_error, ?RED ++ "ERROR: " ++ Fmt ++ ?RESET, Args),
N = get(errors),
_ = put(errors, N + 1),
ok.
check(File) ->
io:format(user, "checking: ~s~n", [File]),
{ok, C} = hocon:load(File),
maps:foreach(fun check_one_field/2, C),
ok.
check_one_field(Name, Field) ->
maps:foreach(fun(SubName, DescAndLabel) ->
check_desc_and_label([Name, ".", SubName], DescAndLabel)
end, Field).
check_desc_and_label(Name, D) ->
case maps:keys(D) -- [<<"desc">>, <<"label">>] of
[] ->
ok;
Unknown ->
die("~s: unknown tags ~p~n", [Name, Unknown])
end,
ok = check_desc(Name, D),
ok = check_label(Name, D).
check_label(_Name, #{<<"label">> := _Label}) ->
ok;
check_label(_Name, _) ->
%% some may not have label
ok.
check_desc(Name, #{<<"desc">> := Desc}) ->
do_check_desc(Name, Desc);
check_desc(Name, _) ->
die("~s: no 'desc'~n", [Name]).
do_check_desc(Name, #{<<"zh">> := Zh, <<"en">> := En}) ->
ok = check_desc_string(Name, "zh", Zh),
ok = check_desc_string(Name, "en", En);
do_check_desc(Name, _) ->
die("~s: missing 'zh' or 'en'~n", [Name]).
check_desc_string(Name, Tr, <<>>) ->
io:format(standard_error, ?YELLOW ++ "WARNING: ~s.~s: empty string~n" ++ ?RESET, [Name, Tr]);
check_desc_string(Name, Tr, BinStr) ->
Str = unicode:characters_to_list(BinStr, utf8),
Err = fun(Reason) ->
logerr("~s.~s: ~s~n", [Name, Tr, Reason])
end,
case Str of
[$\s | _] ->
Err("remove leading whitespace");
[$\n | _] ->
Err("remove leading line-break");
"<br/>" ->
Err("remove leading <br/>");
"<br />" ->
Err("remove leading <br />");
_ ->
ok
end,
case lists:reverse(Str) of
[$\s | _] ->
Err("remove trailing whitespace");
[$\n | _] ->
Err("remove trailing line-break");
">/rb<" ++ _ ->
Err("remove trailing <br/>");
">/ rb<" ++ _ ->
Err("remove trailing <br />");
_ ->
ok
end.

8
scripts/check-i18n-style.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
cd -P -- "$(dirname -- "$0")/.."
all_files="$(git ls-files '*i18n*.conf')"
./scripts/check-i18n-style.escript "$all_files"