diff --git a/Makefile b/Makefile index d91dca137..2bfdffdfb 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ ct: $(REBAR) merge-config static_checks: @$(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 ./scripts/check-i18n-style.sh; fi APPS=$(shell $(SCRIPTS)/find-apps.sh) diff --git a/apps/emqx/etc/ssl_dist.conf b/apps/emqx/etc/ssl_dist.conf index 6048ddf60..af1c7506d 100644 --- a/apps/emqx/etc/ssl_dist.conf +++ b/apps/emqx/etc/ssl_dist.conf @@ -1,7 +1,9 @@ -%% The options in the {server, Opts} tuple are used when calling ssl:ssl_accept/3, -%% and the options in the {client, Opts} tuple are used when calling ssl:connect/4. -%% -%% More information at: http://erlang.org/doc/apps/ssl/ssl_distribution.html +%% This additional config file is used when the config 'cluster.proto_dis' in emqx.conf is set to 'inet_tls'. +%% 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 + +%% For more information in technical details see: http://erlang.org/doc/apps/ssl/ssl_distribution.html + [{server, [ %{log_level, debug}, %% NOTE: debug level logging impacts performance, and need to set EMQX logging level to 'debug' diff --git a/apps/emqx/i18n/emqx_schema_i18n.conf b/apps/emqx/i18n/emqx_schema_i18n.conf index 31003a30a..2ba5e7f52 100644 --- a/apps/emqx/i18n/emqx_schema_i18n.conf +++ b/apps/emqx/i18n/emqx_schema_i18n.conf @@ -189,11 +189,9 @@ emqx_schema { sysmon_vm_long_gc { desc { en: """When an Erlang process spends long time to perform garbage collection, a warning level long_gc log is emitted, -and an MQTT message is published to the system topic $SYS/sysmon/long_gc. -""" +and an MQTT message is published to the system topic $SYS/sysmon/long_gc.""" zh: """当系统检测到某个 Erlang 进程垃圾回收占用过长时间,会触发一条带有 long_gc 关键字的日志。 -同时还会发布一条主题为 $SYS/sysmon/long_gc 的 MQTT 系统消息。 -""" +同时还会发布一条主题为 $SYS/sysmon/long_gc 的 MQTT 系统消息。""" } label { en: "Enable Long GC monitoring." @@ -204,11 +202,9 @@ and an MQTT message is published to the system topic $SYS/sysmon/long_gc$SYS/sysmon/long_schedule. -""" +and an MQTT message is published to the system topic $SYS/sysmon/long_schedule.""" zh: """启用后,如果 Erlang VM 调度器出现某个任务占用时间过长时,会触发一条带有 'long_schedule' 关键字的日志。 -同时还会发布一条主题为 $SYS/sysmon/long_schedule 的 MQTT 系统消息。 -""" +同时还会发布一条主题为 $SYS/sysmon/long_schedule 的 MQTT 系统消息。""" } label { en: "Enable Long Schedule monitoring." @@ -220,11 +216,9 @@ and an MQTT message is published to the system topic $SYS/sysmon/long_sche desc { en: """When an Erlang process consumed a large amount of memory for its heap space, the system will write a warning level large_heap log, and an MQTT message is published to -the system topic $SYS/sysmon/large_heap. -""" +the system topic $SYS/sysmon/large_heap.""" zh: """启用后,当一个 Erlang 进程申请了大量内存,系统会触发一条带有 large_heap 关键字的 -warning 级别日志。同时还会发布一条主题为 $SYS/sysmon/busy_dist_port 的 MQTT 系统消息。 -""" +warning 级别日志。同时还会发布一条主题为 $SYS/sysmon/busy_dist_port 的 MQTT 系统消息。""" } label { en: "Enable Large Heap monitoring." @@ -236,11 +230,9 @@ warning 级别日志。同时还会发布一条主题为 $SYS/sysmon/busy_ desc { en: """When the RPC connection used to communicate with other nodes in the cluster is overloaded, there will be a busy_dist_port warning log, -and an MQTT message is published to system topic $SYS/sysmon/busy_dist_port. -""" +and an MQTT message is published to system topic $SYS/sysmon/busy_dist_port.""" zh: """启用后,当用于集群接点之间 RPC 的连接过忙时,会触发一条带有 busy_dist_port 关键字的 warning 级别日志。 -同时还会发布一条主题为 $SYS/sysmon/busy_dist_port 的 MQTT 系统消息。 -""" +同时还会发布一条主题为 $SYS/sysmon/busy_dist_port 的 MQTT 系统消息。""" } label { en: "Enable Busy Distribution Port monitoring." @@ -251,11 +243,9 @@ and an MQTT message is published to system topic $SYS/sysmon/busy_dist_por sysmon_vm_busy_port { desc { en: """When a port (e.g. TCP socket) is overloaded, there will be a busy_port warning log, -and an MQTT message is published to the system topic $SYS/sysmon/busy_port. -""" +and an MQTT message is published to the system topic $SYS/sysmon/busy_port.""" zh: """当一个系统接口(例如 TCP socket)过忙,会触发一条带有 busy_port 关键字的 warning 级别的日志。 -同时还会发布一条主题为 $SYS/sysmon/busy_port 的 MQTT 系统消息。 -""" +同时还会发布一条主题为 $SYS/sysmon/busy_port 的 MQTT 系统消息。""" } label { en: "Enable Busy Port monitoring." @@ -451,7 +441,7 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port desc { en: "The maximum total number of deactivated alarms to keep as history.
" "When this limit is exceeded, the oldest deactivated alarms are " - "deleted to cap the total number.\n" + "deleted to cap the total number." zh: "要保留为历史记录的已停用报警的最大总数。当超过此限制时,将删除最旧的停用报警,以限制总数。" } label: { @@ -463,7 +453,7 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port alarm_validity_period { desc { en: "Retention time of deactivated alarms. Alarms are not deleted immediately\n" - "when deactivated, but after the retention time.\n" + "when deactivated, but after the retention time." zh: "停用报警的保留时间。报警在停用时不会立即删除,而是在保留时间之后删除。" } label: { @@ -520,7 +510,7 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port desc { en: "Use the database to store information about persistent sessions.\n" "This makes it possible to migrate a client connection to another\n" - "cluster node if a node is stopped.\n" + "cluster node if a node is stopped." zh: "使用数据库存储有关持久会话的信息。\n" "这使得在节点停止时,可以将客户端连接迁移到另一个群集节点。" } @@ -573,7 +563,7 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port desc { en: "The time messages that was not delivered to a persistent session\n" "is stored before being garbage collected if the node the previous\n" - "session was handled on restarts of is stopped.\n" + "session was handled on restarts of is stopped." zh: "如果重新启动时处理上一个会话的节点已停止,则未传递到持久会话的消息在垃圾收集之前会被存储。" } label: { @@ -586,7 +576,7 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port desc { en: "The starting interval for garbage collection of undelivered messages to\n" "a persistent session. This affects how often the \"max_retain_undelivered\"\n" - "is checked for removal.\n" + "is checked for removal." zh: "将未送达的消息垃圾收集到持久会话的开始间隔。\n" "这会影响检查 \"max_retain_undelivered\"(最大保留未送达)的删除频率。" } @@ -600,9 +590,9 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port desc { en: "The starting interval for garbage collection of transient data for\n" "persistent session messages. This does not affect the lifetime length\n" - "of persistent session messages.\n" + "of persistent session messages." zh: "持久会话消息的临时数据垃圾收集的开始间隔。\n" - "这不会影响持久会话消息的生命周期长度。\n" + "这不会影响持久会话消息的生命周期长度。" } label: { en: "Session message GC interval" @@ -658,8 +648,7 @@ and an MQTT message is published to the system topic $SYS/sysmon/busy_port desc { en: """A zone is a set of configs grouped by the zone name. For flexible configuration mapping, the name can be set to a listener's zone config. -NOTE: A built-in zone named default is auto created and can not be deleted. -""" +NOTE: A built-in zone named default is auto created and can not be deleted.""" zh: """zone 是按name 分组的一组配置。 对于灵活的配置映射,可以将 name 设置为侦听器的 zone 配置。 注:名为 default 的内置区域是自动创建的,无法删除。""" @@ -669,8 +658,7 @@ NOTE: A built-in zone named default is auto created and can not be mqtt { desc { en: """Global MQTT configuration. -The configs here work as default values which can be overridden in zone configs -""" +The configs here work as default values which can be overridden in zone configs""" zh: """全局的 MQTT 配置项。 mqtt 下所有的配置作为全局的默认值存在,它可以被 zone 中的配置覆盖。""" } @@ -949,8 +937,7 @@ There's no priority table by default, hence all messages are treated equal. **Examples**: To configure \"topic/1\" > \"topic/2\": -mqueue_priorities: {\"topic/1\": 10, \"topic/2\": 8} -""" +mqueue_priorities: {\"topic/1\": 10, \"topic/2\": 8}""" zh: """主题优先级。取值范围 [1-255] 默认优先级表为空,即所有的主题优先级相同。 @@ -959,8 +946,7 @@ To configure \"topic/1\" > \"topic/2\": 示例: 配置 \"topic/1\" > \"topic/2\": -mqueue_priorities: {\"topic/1\": 10, \"topic/2\": 8} -""" +mqueue_priorities: {\"topic/1\": 10, \"topic/2\": 8}""" } label: { en: """Topic Priorities""" @@ -993,11 +979,9 @@ To configure \"topic/1\" > \"topic/2\": mqtt_use_username_as_clientid { desc { en: """Whether to user Client ID as Username. -This setting takes effect later than Use Peer Certificate as Username (peer_cert_as_username) and Use peer certificate as Client ID (peer_cert_as_clientid). -""" +This setting takes effect later than Use Peer Certificate as Username (peer_cert_as_username) and Use peer certificate as Client ID (peer_cert_as_clientid).""" zh: """是否使用用户名作为客户端 ID。 -此设置的作用时间晚于 使用对端证书作为用户名peer_cert_as_username) 和 使用对端证书作为客户端 IDpeer_cert_as_clientid)。 -""" +此设置的作用时间晚于 使用对端证书作为用户名peer_cert_as_username) 和 使用对端证书作为客户端 IDpeer_cert_as_clientid)。""" } label: { en: """Use Username as Client ID""" @@ -1013,16 +997,14 @@ Supported configurations are the following: - dn: Take the DN field of the certificate as Username - crt: Take the content of the DER or PEM certificate as Username - pem: Convert DER certificate content to PEM format as Username -- md5: Take the MD5 value of the content of the DER or PEM certificate as Username -""" +- md5: Take the MD5 value of the content of the DER or PEM certificate as Username""" zh: """使用对端证书中的 CN、DN 字段或整个证书内容来作为用户名。仅适用于 TLS 连接。 目前支持配置为以下内容: - cn: 取证书的 CN 字段作为 Username - dn: 取证书的 DN 字段作为 Username - crt: 取 DERPEM 证书的内容作为 Username - pem: 将 DER 证书内容转换为 PEM 格式后作为 Username -- md5: 取 DERPEM 证书的内容的 MD5 值作为 Username -""" +- md5: 取 DERPEM 证书的内容的 MD5 值作为 Username""" } label: { en: """Use Peer Certificate as Username""" @@ -1038,16 +1020,14 @@ Supported configurations are the following: - dn: Take the DN field of the certificate as Client ID - crt: Take the content of the DER or PEM certificate as Client ID - pem: Convert DER certificate content to PEM format as Client ID -- md5: Take the MD5 value of the content of the DER or PEM certificate as Client ID -""" +- md5: Take the MD5 value of the content of the DER or PEM certificate as Client ID""" zh: """使用对端证书中的 CN、DN 字段或整个证书内容来作为客户端 ID。仅适用于 TLS 连接。 目前支持配置为以下内容: - cn: 取证书的 CN 字段作为 Client ID - dn: 取证书的 DN 字段作为 Client ID - crt: 取 DERPEM 证书的内容作为 Client ID - pem: 将 DER 证书内容转换为 PEM 格式后作为 Client ID -- md5: 取 DERPEM 证书的内容的 MD5 值作为 Client ID -""" +- md5: 取 DERPEM 证书的内容的 MD5 值作为 Client ID""" } label: { en: """Use Peer Certificate as Client ID""" @@ -1075,15 +1055,13 @@ Supported configurations are the following: - `local`: only lock the session on the current node - `one`: select only one remote node to lock the session - `quorum`: select some nodes to lock the session - - `all`: lock the session on all the nodes in the cluster -""" + - `all`: lock the session on all the nodes in the cluster""" zh: """Session 在集群中的锁策略。 - `loca`:仅锁本节点的 Session; - `one`:任选一个其它节点加锁; - `quorum`:选择集群中半数以上的节点加锁; - - `all`:选择所有节点加锁。 -""" + - `all`:选择所有节点加锁。""" } } @@ -1093,15 +1071,13 @@ Supported configurations are the following: - `random`: dispatch the message to a random selected subscriber - `round_robin`: select the subscribers in a round-robin manner - `sticky`: always use the last selected subscriber to dispatch, until the subscriber disconnects. - - `hash`: select the subscribers by the hash of `clientIds` -""" + - `hash`: select the subscribers by the hash of `clientIds`""" zh: """共享订阅消息派发策略。 - `random`:随机挑选一个共享订阅者派发; - `round_robin`:使用 round-robin 策略派发; - `sticky`:总是使用上次选中的订阅者派发,直到它断开连接; - - `hash`:使用发送者的 Client ID 进行 Hash 来选择订阅者。 -""" + - `hash`:使用发送者的 Client ID 进行 Hash 来选择订阅者。""" } } @@ -1109,13 +1085,11 @@ Supported configurations are the following: desc { en: """Deprecated, will be removed in 5.1. Enable/disable shared dispatch acknowledgement for QoS 1 and QoS 2 messages. -This should allow messages to be dispatched to a different subscriber in the group in case the picked (based on `shared_subscription_strategy`) subscriber is offline. -""" +This should allow messages to be dispatched to a different subscriber in the group in case the picked (based on `shared_subscription_strategy`) subscriber is offline.""" zh: """该配置项已废弃,会在 5.1 中移除。 启用/禁用 QoS 1 和 QoS 2 消息的共享派发确认。 -开启后,允许将消息从未及时回复 ACK 的订阅者 (例如,客户端离线)重新派发给另外一个订阅者。 -""" +开启后,允许将消息从未及时回复 ACK 的订阅者 (例如,客户端离线)重新派发给另外一个订阅者。""" } } @@ -1131,11 +1105,9 @@ This should allow messages to be dispatched to a different subscriber in the gro en: """Per group dispatch strategy for shared subscription. This config is a map from shared subscription group name to the strategy name. The group name should be of format `[A-Za-z0-9]`. i.e. no -special characters are allowed. -""" +special characters are allowed.""" zh: """设置共享订阅组为单位的分发策略。该配置是一个从组名到 -策略名的一个map,组名不得包含 `[A-Za-z0-9]` 之外的特殊字符。 -""" +策略名的一个map,组名不得包含 `[A-Za-z0-9]` 之外的特殊字符。""" } } @@ -1150,16 +1122,14 @@ special characters are allowed. until the subscriber disconnects. - `hash`: select the subscribers by the hash of `clientIds` - `local`: send to a random local subscriber. If local -subscriber was not found, send to a random subscriber cluster-wide -""" +subscriber was not found, send to a random subscriber cluster-wide""" zh: """共享订阅的分发策略名称。 - `random`:随机选择一个组内成员; - `round_robin`:循环选择下一个成员; - `round_robin_per_group`:在共享组内循环选择下一个成员; - `sticky`:使用上一次选中的成员; - `hash`:根据 ClientID 哈希映射到一个成员; -- `local`:随机分发到节点本地成成员,如果本地成员不存在,则随机分发到任意一个成员。 -""" +- `local`:随机分发到节点本地成成员,如果本地成员不存在,则随机分发到任意一个成员。""" } } @@ -1172,16 +1142,14 @@ Change this parameter only when there are many wildcard topics. NOTE: when changing from/to `global` lock, it requires all nodes in the cluster to be stopped before the change. - `key`: mnesia transactional updates with per-key locks. Recommended for a single-node setup. - `tab`: mnesia transactional updates with table lock. Recommended for a cluster setup. - - `global`: updates are protected with a global lock. Recommended for large clusters. -""" + - `global`: updates are protected with a global lock. Recommended for large clusters.""" zh: """通配主题订阅/取消订阅性能调优。 建议仅当通配符主题较多时才更改此参数。 注:当从/更改为 `global` 锁时,它要求集群中的所有节点在更改之前停止。 - `key`:为 Mnesia 事务涉及到的每个 key 上锁,建议单节点时使用。 - `tab`:为 Mnesia 事务涉及到的表上锁,建议在集群中使用。 - - `global`:所以更新操作都被全局的锁保护,仅建议在超大规模集群中使用。 -""" + - `global`:所以更新操作都被全局的锁保护,仅建议在超大规模集群中使用。""" } } @@ -1191,14 +1159,12 @@ NOTE: when changing from/to `global` lock, it requires all nodes in the cluster Enabling it significantly improves wildcard topic subscribe rate, if wildcard topics have unique prefixes like: 'sensor/{{id}}/+/', where ID is unique per subscriber. Topic match performance (when publishing) may degrade if messages are mostly published to topics with large number of levels. -NOTE: This is a cluster-wide configuration. It requires all nodes to be stopped before changing it. -""" +NOTE: This is a cluster-wide configuration. It requires all nodes to be stopped before changing it.""" zh: """是否开启主题表压缩存储。 启用它会显着提高通配符主题订阅率,如果通配符主题具有唯一前缀,例如:'sensor/{{id}}/+/',其中每个订阅者的 ID 是唯一的。 如果消息主要发布到具有大量级别的主题,则主题匹配性能(发布时)可能会降低。 -注意:这是一个集群范围的配置。 它要求在更改之前停止所有节点。 -""" +注意:这是一个集群范围的配置。 它要求在更改之前停止所有节点。""" } } @@ -1220,12 +1186,10 @@ NOTE: This is a cluster-wide configuration. It requires all nodes to be stopped desc { en: """Time interval for publishing following heartbeat messages: - `$SYS/brokers//uptime` - - `$SYS/brokers//datetime` -""" + - `$SYS/brokers//datetime`""" zh: """发送心跳系统消息的间隔时间,它包括: - `$SYS/brokers//uptime` - - `$SYS/brokers//datetime` -""" + - `$SYS/brokers//datetime`""" } } @@ -1267,17 +1231,13 @@ NOTE: This is a cluster-wide configuration. It requires all nodes to be stopped fields_authorization_no_match { desc { - en: """ -Default access control action if the user or client matches no ACL rules, + en: """Default access control action if the user or client matches no ACL rules, or if no such user or client is found by the configurable authorization sources such as built_in_database, an HTTP API, or a query against PostgreSQL. -Find more details in 'authorization.sources' config. -""" - zh: """ -如果用户或客户端不匹配ACL规则,或者从可配置授权源(比如内置数据库、HTTP API 或 PostgreSQL 等。)内未找 +Find more details in 'authorization.sources' config.""" + zh: """如果用户或客户端不匹配ACL规则,或者从可配置授权源(比如内置数据库、HTTP API 或 PostgreSQL 等。)内未找 到此类用户或客户端时,模式的认访问控制操作。 -在“授权”中查找更多详细信息。 -""" +在“授权”中查找更多详细信息。""" } label: { en: "Authorization no match" @@ -1320,7 +1280,7 @@ fields_cache_max_size { fields_cache_ttl { desc { - en: """Time to live for the cached data. """ + en: """Time to live for the cached data.""" zh: """缓存数据的生存时间。""" } label: { @@ -1331,7 +1291,7 @@ fields_cache_ttl { fields_deflate_opts_level { desc { - en: """Compression level. """ + en: """Compression level.""" zh: """压缩级别""" } label: { @@ -1342,14 +1302,10 @@ fields_deflate_opts_level { fields_deflate_opts_mem_level { desc { - en: """ -Specifies the size of the compression state.
-Lower values decrease memory usage per connection. -""" - zh: """ -指定压缩状态的大小
-较低的值会减少每个连接的内存使用。 -""" + en: """Specifies the size of the compression state.
+Lower values decrease memory usage per connection.""" + zh: """指定压缩状态的大小
+较低的值会减少每个连接的内存使用。""" } label: { en: "Size of the compression state" @@ -1370,7 +1326,7 @@ fields_deflate_opts_strategy { fields_deflate_opts_server_context_takeover { desc { - en: """Takeover means the compression state is retained between server messages. """ + en: """Takeover means the compression state is retained between server messages.""" zh: """接管意味着在服务器消息之间保留压缩状态。""" } label: { @@ -1381,7 +1337,7 @@ fields_deflate_opts_server_context_takeover { fields_deflate_opts_client_context_takeover { desc { - en: """Takeover means the compression state is retained between client messages. """ + en: """Takeover means the compression state is retained between client messages.""" zh: """接管意味着在客户端消息之间保留压缩状态。""" } label: { @@ -1414,7 +1370,7 @@ fields_deflate_opts_client_max_window_bits { client_ssl_opts_schema_enable { desc { - en: """Enable TLS. """ + en: """Enable TLS.""" zh: """启用 TLS。""" } label: { @@ -1425,22 +1381,18 @@ client_ssl_opts_schema_enable { common_ssl_opts_schema_cacertfile { desc { - en: """ -Trusted PEM format CA certificates bundle file.
+ en: """Trusted PEM format CA certificates bundle file.
The certificates in this file are used to verify the TLS peer's certificates. Append new certificates to the file if new CAs are to be trusted. There is no need to restart EMQX to have the updated file loaded, because the system regularly checks if file has been updated (and reload).
NOTE: invalidating (deleting) a certificate from the file will not affect -already established connections. -""" - zh: """ -受信任的PEM格式 CA 证书捆绑文件
+already established connections.""" + zh: """受信任的PEM格式 CA 证书捆绑文件
此文件中的证书用于验证TLS对等方的证书。 如果要信任新 CA,请将新证书附加到文件中。 无需重启EMQX即可加载更新的文件,因为系统会定期检查文件是否已更新(并重新加载)
-注意:从文件中失效(删除)证书不会影响已建立的连接。 -""" +注意:从文件中失效(删除)证书不会影响已建立的连接。""" } label: { en: "CACertfile" @@ -1450,20 +1402,16 @@ already established connections. common_ssl_opts_schema_certfile { desc { - en: """ -PEM format certificates chain file.
+ en: """PEM format certificates chain file.
The certificates in this file should be in reversed order of the certificate issue chain. That is, the host's certificate should be placed in the beginning of the file, followed by the immediate issuer certificate and so on. Although the root CA certificate is optional, it should be placed at the end of -the file if it is to be added. -""" - zh: """ -PEM格式证书链文件
+the file if it is to be added.""" + zh: """PEM格式证书链文件
此文件中的证书应与证书颁发链的顺序相反。也就是说,主机的证书应该放在文件的开头, 然后是直接颁发者 CA 证书,依此类推,一直到根 CA 证书。 -根 CA 证书是可选的,如果想要添加,应加到文件到最末端。 -""" +根 CA 证书是可选的,如果想要添加,应加到文件到最末端。""" } label: { en: "Certfile" @@ -1473,7 +1421,7 @@ PEM格式证书链文件
common_ssl_opts_schema_keyfile { desc { - en: """PEM format private key file. """ + en: """PEM format private key file.""" zh: """PEM格式的私钥文件。""" } label: { @@ -1484,7 +1432,7 @@ common_ssl_opts_schema_keyfile { common_ssl_opts_schema_verify { desc { - en: """Enable or disable peer verification. """ + en: """Enable or disable peer verification.""" zh: """启用或禁用对等验证。""" } label: { @@ -1495,7 +1443,7 @@ common_ssl_opts_schema_verify { common_ssl_opts_schema_reuse_sessions { desc { - en: """Enable TLS session reuse. """ + en: """Enable TLS session reuse.""" zh: """启用 TLS 会话重用。""" } label: { @@ -1506,18 +1454,14 @@ common_ssl_opts_schema_reuse_sessions { common_ssl_opts_schema_depth { desc { - en: """ -Maximum number of non-self-issued intermediate certificates that can follow the peer certificate in a valid certification path. + en: """Maximum number of non-self-issued intermediate certificates that can follow the peer certificate in a valid certification path. So, if depth is 0 the PEER must be signed by the trusted ROOT-CA directly;
if 1 the path can be PEER, Intermediate-CA, ROOT-CA;
-if 2 the path can be PEER, Intermediate-CA1, Intermediate-CA2, ROOT-CA.
-""" - zh: """ -在有效的证书路径中,可以跟随对等证书的非自颁发中间证书的最大数量。 +if 2 the path can be PEER, Intermediate-CA1, Intermediate-CA2, ROOT-CA.""" + zh: """在有效的证书路径中,可以跟随对等证书的非自颁发中间证书的最大数量。 因此,如果深度为0,则对等方必须由受信任的根 CA 直接签名;
如果是1,路径可以是 PEER、中间 CA、ROOT-CA;
-如果是2,则路径可以是PEER、中间 CA1、中间 CA2、ROOT-CA。 -""" +如果是2,则路径可以是PEER、中间 CA1、中间 CA2、ROOT-CA。""" } label: { en: "CACert Depth" @@ -1527,14 +1471,8 @@ if 2 the path can be PEER, Intermediate-CA1, Intermediate-CA2, ROOT-CA.
common_ssl_opts_schema_password { desc { - en: """ -String containing the user's password. -Only used if the private key file is password-protected. -""" - zh: """ -包含用户密码的字符串。 -仅在私钥文件受密码保护时使用。 -""" + en: """String containing the user's password. Only used if the private key file is password-protected.""" + zh: """包含用户密码的字符串。仅在私钥文件受密码保护时使用。""" } label: { en: "Keyfile passphrase" @@ -1544,17 +1482,12 @@ Only used if the private key file is password-protected. common_ssl_opts_schema_versions { desc { - en: """ -All TLS/DTLS versions to be supported.
+ en: """All TLS/DTLS versions to be supported.
NOTE: PSK ciphers are suppressed by 'tlsv1.3' version config.
In case PSK cipher suites are intended, make sure to configure -['tlsv1.2', 'tlsv1.1'] here. -""" - zh: """ -支持所有TLS/DTLS版本
- -注:PSK 的 Ciphers 无法在 tlsv1.3 中使用,如果打算使用 PSK 密码套件,请确保这里配置为 ["tlsv1.2","tlsv1.1"]。 -""" +['tlsv1.2', 'tlsv1.1'] here.""" + zh: """支持所有TLS/DTLS版本
+注:PSK 的 Ciphers 无法在 tlsv1.3 中使用,如果打算使用 PSK 密码套件,请确保这里配置为 ["tlsv1.2","tlsv1.1"]。""" } label: { en: "SSL versions" @@ -1564,8 +1497,7 @@ In case PSK cipher suites are intended, make sure to configure ciphers_schema_common { desc { - en: """ -This config holds TLS cipher suite names separated by comma, + en: """This config holds TLS cipher suite names separated by comma, or as an array of strings. e.g. "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256" or ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]. @@ -1591,10 +1523,8 @@ If PSK cipher suites are intended, 'tlsv1.3' should be disabled from versi PSK cipher suites: "RSA-PSK-AES256-GCM-SHA384,RSA-PSK-AES256-CBC-SHA384, RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256, RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA, -RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"
-""" - zh: """ -此配置保存由逗号分隔的 TLS 密码套件名称,或作为字符串数组。例如 +RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"
""" + zh: """此配置保存由逗号分隔的 TLS 密码套件名称,或作为字符串数组。例如 "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256"["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
@@ -1617,8 +1547,7 @@ PSK 密码套件: "RSA-PSK-AES256-GCM-SHA384,RSA-PSK-AES256-CBC-SHA384, RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256, RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA, -RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"
-""" +RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"
""" } label: { en: "" @@ -1628,8 +1557,7 @@ RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"

ciphers_schema_quic { desc { - en: """ -This config holds TLS cipher suite names separated by comma, + en: """This config holds TLS cipher suite names separated by comma, or as an array of strings. e.g. "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256" or ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]. @@ -1657,10 +1585,9 @@ RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256, RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA, RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"

-NOTE: QUIC listener supports only 'tlsv1.3' ciphers
-""" - zh: """ -此配置保存由逗号分隔的 TLS 密码套件名称,或作为字符串数组。例如 +NOTE: QUIC listener supports only 'tlsv1.3' ciphers""" + + zh: """此配置保存由逗号分隔的 TLS 密码套件名称,或作为字符串数组。例如 "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256"["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
@@ -1685,8 +1612,7 @@ RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256, RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA, RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"

-注:QUIC 监听器不支持 tlsv1.3 的 ciphers -""" +注:QUIC 监听器不支持 tlsv1.3 的 ciphers""" } label: { en: "" @@ -1696,7 +1622,7 @@ RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"

common_ssl_opts_schema_user_lookup_fun { desc { - en: """EMQX-internal callback that is used to lookup pre-shared key (PSK) identity. """ + en: """EMQX-internal callback that is used to lookup pre-shared key (PSK) identity.""" zh: """用于查找预共享密钥(PSK)标识的 EMQX 内部回调。""" } label: { @@ -1707,16 +1633,12 @@ common_ssl_opts_schema_user_lookup_fun { common_ssl_opts_schema_secure_renegotiate { desc { - en: """ -SSL parameter renegotiation is a feature that allows a client and a server + en: """SSL parameter renegotiation is a feature that allows a client and a server to renegotiate the parameters of the SSL connection on the fly. RFC 5746 defines a more secure way of doing this. By enabling secure renegotiation, -you drop support for the insecure renegotiation, prone to MitM attacks. -""" - zh: """ -SSL 参数重新协商是一种允许客户端和服务器动态重新协商 SSL 连接参数的功能。 -RFC 5746 定义了一种更安全的方法。通过启用安全的重新协商,您就失去了对不安全的重新协商的支持,从而容易受到 MitM 攻击。 -""" +you drop support for the insecure renegotiation, prone to MitM attacks.""" + zh: """SSL 参数重新协商是一种允许客户端和服务器动态重新协商 SSL 连接参数的功能。 +RFC 5746 定义了一种更安全的方法。通过启用安全的重新协商,您就失去了对不安全的重新协商的支持,从而容易受到 MitM 攻击。""" } label: { en: "SSL renegotiate" @@ -1726,18 +1648,13 @@ RFC 5746 定义了一种更安全的方法。通过启用安全的重新协商 server_ssl_opts_schema_dhfile { desc { - en: """ -Path to a file containing PEM-encoded Diffie-Hellman parameters + en: """Path to a file containing PEM-encoded Diffie-Hellman parameters to be used by the server if a cipher suite using Diffie-Hellman key exchange is negotiated. If not specified, default parameters are used.
-NOTE: The dhfile option is not supported by TLS 1.3. -""" - zh: """ -如果协商使用Diffie-Hellman密钥交换的密码套件,则服务器将使用包含PEM编码的Diffie-Hellman参数的文件的路径。如果未指定,则使用默认参数。
- -注意:TLS 1.3不支持dhfile选项。 -""" +NOTE: The dhfile option is not supported by TLS 1.3.""" + zh: """如果协商使用Diffie-Hellman密钥交换的密码套件,则服务器将使用包含PEM编码的Diffie-Hellman参数的文件的路径。如果未指定,则使用默认参数。
+注意:TLS 1.3不支持dhfile选项。""" } label: { en: "SSL dhfile" @@ -1747,18 +1664,14 @@ NOTE: The dhfile option is not supported by TLS 1.3. server_ssl_opts_schema_fail_if_no_peer_cert { desc { - en: """ -Used together with {verify, verify_peer} by an TLS/DTLS server. + en: """Used together with {verify, verify_peer} by an TLS/DTLS server. If set to true, the server fails if the client does not have a certificate to send, that is, sends an empty certificate. If set to false, it fails only if the client sends an invalid -certificate (an empty certificate is considered valid). -""" - zh: """ -TLS/DTLS 服务器与 {verify,verify_peer} 一起使用。 +certificate (an empty certificate is considered valid).""" + zh: """TLS/DTLS 服务器与 {verify,verify_peer} 一起使用。 如果设置为true,则如果客户端没有要发送的证书,即发送空证书,服务器将失败。 -如果设置为false,则仅当客户端发送无效证书(空证书被视为有效证书)时才会失败。 -""" +如果设置为false,则仅当客户端发送无效证书(空证书被视为有效证书)时才会失败。""" } label: { en: "SSL fail if no peer cert" @@ -1768,15 +1681,11 @@ TLS/DTLS 服务器与 {verify,verify_peer} 一起使用。 server_ssl_opts_schema_honor_cipher_order { desc { - en: """ -An important security setting, it forces the cipher to be set based + en: """An important security setting, it forces the cipher to be set based on the server-specified order instead of the client-specified order, hence enforcing the (usually more properly configured) security - ordering of the server administrator. -""" - zh: """ -一个重要的安全设置,它强制根据服务器指定的顺序而不是客户机指定的顺序设置密码,从而强制服务器管理员执行(通常配置得更正确)安全顺序。 -""" + ordering of the server administrator.""" + zh: """一个重要的安全设置,它强制根据服务器指定的顺序而不是客户机指定的顺序设置密码,从而强制服务器管理员执行(通常配置得更正确)安全顺序。""" } label: { en: "SSL honor cipher order" @@ -1786,22 +1695,18 @@ An important security setting, it forces the cipher to be set based server_ssl_opts_schema_client_renegotiation { desc { - en: """ -In protocols that support client-initiated renegotiation, + en: """In protocols that support client-initiated renegotiation, the cost of resources of such an operation is higher for the server than the client. This can act as a vector for denial of service attacks. The SSL application already takes measures to counter-act such attempts, but client-initiated renegotiation can be strictly disabled by setting this option to false. The default value is true. Note that disabling renegotiation can result in long-lived connections becoming unusable due to limits on -the number of messages the underlying cipher suite can encipher. -""" - zh: """ -在支持客户机发起的重新协商的协议中,这种操作的资源成本对于服务器来说高于客户机。 +the number of messages the underlying cipher suite can encipher.""" + zh: """在支持客户机发起的重新协商的协议中,这种操作的资源成本对于服务器来说高于客户机。 这可能会成为拒绝服务攻击的载体。 SSL 应用程序已经采取措施来反击此类尝试,但通过将此选项设置为 false,可以严格禁用客户端发起的重新协商。 -默认值为 true。请注意,由于基础密码套件可以加密的消息数量有限,禁用重新协商可能会导致长期连接变得不可用。 -""" +默认值为 true。请注意,由于基础密码套件可以加密的消息数量有限,禁用重新协商可能会导致长期连接变得不可用。""" } label: { en: "SSL client renegotiation" @@ -1811,12 +1716,8 @@ SSL 应用程序已经采取措施来反击此类尝试,但通过将此选项 server_ssl_opts_schema_handshake_timeout { desc { - en: """ -Maximum time duration allowed for the handshake to complete -""" - zh: """ -握手完成所允许的最长时间 -""" + en: """Maximum time duration allowed for the handshake to complete""" + zh: """握手完成所允许的最长时间""" } label: { en: "Handshake timeout" @@ -1826,14 +1727,8 @@ Maximum time duration allowed for the handshake to complete server_ssl_opts_schema_gc_after_handshake { desc { - en: """ -Memory usage tuning. If enabled, will immediately perform a garbage collection after -the TLS/SSL handshake. -""" - zh: """ -内存使用调优。如果启用,将在TLS/SSL握手完成后立即执行垃圾回收。 -TLS/SSL握手建立后立即进行GC。 -""" + en: """Memory usage tuning. If enabled, will immediately perform a garbage collection after the TLS/SSL handshake.""" + zh: """内存使用调优。如果启用,将在TLS/SSL握手完成后立即执行垃圾回收。TLS/SSL握手建立后立即进行GC。""" } label: { en: "Perform GC after handshake" @@ -1898,7 +1793,7 @@ fields_listeners_quic { fields_listener_enabled { desc { - en: """Enable listener. """ + en: """Enable listener.""" zh: """启停监听器。""" } label: { @@ -1920,7 +1815,7 @@ fields_mqtt_quic_listener_certfile { fields_mqtt_quic_listener_keyfile { desc { - en: """Path to the secret key file. """ + en: """Path to the secret key file.""" zh: """私钥文件。""" } label: { @@ -1942,7 +1837,7 @@ fields_mqtt_quic_listener_idle_timeout { fields_mqtt_quic_listener_handshake_idle_timeout { desc { - en: """How long a handshake can idle before it is discarded. """ + en: """How long a handshake can idle before it is discarded.""" zh: """一个握手在被丢弃之前可以空闲多长时间。""" } label: { @@ -1953,12 +1848,8 @@ fields_mqtt_quic_listener_handshake_idle_timeout { fields_mqtt_quic_listener_keep_alive_interval { desc { - en: """ -How often to send PING frames to keep a connection alive. 0 means disabled. -""" - zh: """ -发送 PING 帧的频率,以保活连接. 设为 0 表示禁用。 -""" + en: """How often to send PING frames to keep a connection alive. 0 means disabled.""" + zh: """发送 PING 帧的频率,以保活连接. 设为 0 表示禁用。""" } label: { en: "Keep Alive Interval" @@ -1968,12 +1859,8 @@ How often to send PING frames to keep a connection alive. 0 means disabled. base_listener_bind { desc { - en: """ -IP address and port for the listening socket. -""" - zh: """ -监听套接字的 IP 地址和端口。 -""" + en: """IP address and port for the listening socket.""" + zh: """监听套接字的 IP 地址和端口。""" } label: { en: "IP address and port" @@ -1994,7 +1881,7 @@ base_listener_acceptors { base_listener_max_connections { desc { - en: """The maximum number of concurrent connections allowed by the listener. """ + en: """The maximum number of concurrent connections allowed by the listener.""" zh: """监听器允许的最大并发连接数。""" } label: { @@ -2005,8 +1892,7 @@ base_listener_max_connections { base_listener_mountpoint { 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. @@ -2020,10 +1906,8 @@ Set to `""` to disable the feature.
Variables in mountpoint string: - ${clientid}: clientid - - ${username}: username -""" - zh: """ -发布或订阅时,请在所有主题前面加上 mountpoint 字符串。 + - ${username}: username""" + zh: """发布或订阅时,请在所有主题前面加上 mountpoint 字符串。 将消息传递给订阅者时,将从主题名称中删除带前缀的字符串。挂载点是一种用户可以用来实现不同侦听器之间消息路由隔离的方法。 @@ -2034,8 +1918,7 @@ Variables in mountpoint string: mountpoint 字符串中的变量: - ${clientid}: clientid -- ${username}: username -""" +- ${username}: username""" } label: { en: "mountpoint" @@ -2045,12 +1928,8 @@ mountpoint 字符串中的变量: base_listener_zone { desc { - en: """ -The configuration zone to which the listener belongs. -""" - zh: """ -监听器所属的配置组。 -""" + en: """The configuration zone to which the listener belongs.""" + zh: """监听器所属的配置组。""" } label: { en: "Zone" @@ -2060,12 +1939,8 @@ The configuration zone to which the listener belongs. base_listener_limiter { desc { - en: """ -Type of the rate limit. -""" - zh: """ -速率限制类型 -""" + en: """Type of the rate limit.""" + zh: """速率限制类型""" } label: { en: "Type of the rate limit." @@ -2075,20 +1950,16 @@ Type of the rate limit. base_listener_enable_authn { desc { - en: """ -Set true (default) to enable client authentication on this listener, the authentication + en: """Set true (default) to enable client authentication on this listener, the authentication process goes through the configured authentication chain. When set to false to allow any clients with or without authentication information such as username or password to log in. When set to quick_deny_anonymous, it behaves like when set to true, but clients will be denied immediately without going through any authenticators if username is not provided. This is useful to fence off -anonymous clients early. -""" - zh: """ -配置 true (默认值)启用客户端进行身份认证,通过检查认配置的认认证器链来决定是否允许接入。 +anonymous clients early.""" + zh: """配置 true (默认值)启用客户端进行身份认证,通过检查认配置的认认证器链来决定是否允许接入。 配置 false 时,将不对客户端做任何认证,任何客户端,不论是不是携带用户名等认证信息,都可以接入。 配置 quick_deny_anonymous 时,行为跟 true 类似,但是会对匿名 -客户直接拒绝,不做使用任何认证器对客户端进行身份检查。 -""" +客户直接拒绝,不做使用任何认证器对客户端进行身份检查。""" } label: { en: "Enable authentication" @@ -2098,9 +1969,7 @@ anonymous clients early. mqtt_listener_access_rules { desc { - en: """ -The access control rules for this listener.
See: https://github.com/emqtt/esockd#allowdeny -""" + en: """The access control rules for this listener.
See: https://github.com/emqtt/esockd#allowdeny""" zh: """此监听器的访问控制规则。""" } label: { @@ -2111,14 +1980,10 @@ The access control rules for this listener.
See: https://github.com/emqtt/es mqtt_listener_proxy_protocol { desc { - en: """ -Enable the Proxy Protocol V1/2 if the EMQX cluster is deployed behind HAProxy or Nginx.
-See: https://www.haproxy.com/blog/haproxy/proxy-protocol/ -""" - zh: """ -如果EMQX集群部署在 HAProxy 或 Nginx 之后,请启用代理协议 V1/2
-详情见: https://www.haproxy.com/blog/haproxy/proxy-protocol/ -""" + en: """Enable the Proxy Protocol V1/2 if the EMQX cluster is deployed behind HAProxy or Nginx.
+See: https://www.haproxy.com/blog/haproxy/proxy-protocol/""" + zh: """如果EMQX集群部署在 HAProxy 或 Nginx 之后,请启用代理协议 V1/2
+详情见: https://www.haproxy.com/blog/haproxy/proxy-protocol/""" } label: { en: "Proxy protocol" @@ -2128,12 +1993,8 @@ See: https://www.haproxy.com/blog/haproxy/proxy-protocol/ mqtt_listener_proxy_protocol_timeout { desc { - en: """ -Timeout for proxy protocol. EMQX will close the TCP connection if proxy protocol packet is not received within the timeout. -""" - zh: """ -代理协议超时。如果在超时时间内未收到代理协议数据包,EMQX将关闭TCP连接。 -""" + en: """Timeout for proxy protocol. EMQX will close the TCP connection if proxy protocol packet is not received within the timeout.""" + zh: """代理协议超时。如果在超时时间内未收到代理协议数据包,EMQX将关闭TCP连接。""" } label: { en: "Proxy protocol timeout" @@ -2156,8 +2017,7 @@ This option can be configured with: When a chain is configured, the login credentials are checked against the backends per the configured order, until an 'allow' or 'deny' decision can be made. -If there is no decision after a full chain exhaustion, the login is rejected. -""" +If there is no decision after a full chain exhaustion, the login is rejected.""" zh: """全局 MQTT 监听器的默认认证配置。 为每个监听器配置认证参考监听器器配置中的authentication 配置。 该配置可以被配置为: @@ -2169,25 +2029,18 @@ If there is no decision after a full chain exhaustion, the login is rejected. 当配置为认证链后,登录凭证会按照配置的顺序进行检查,直到做出allowdeny的结果。 -如果在所有的认证器都执行完后,还是没有结果,登录将被拒绝。 -""" +如果在所有的认证器都执行完后,还是没有结果,登录将被拒绝。""" } } listener_authentication { desc { - en: """ -Per-listener authentication override. + en: """Per-listener authentication override. Authentication can be one single authenticator instance or a chain of authenticators as an array. -When authenticating a login (username, client ID, etc.) the authenticators are checked in the configured order.
- -""" - zh: """ -监听器认证重载。 - +When authenticating a login (username, client ID, etc.) the authenticators are checked in the configured order.""" + zh: """监听器认证重载。 认证配置可以是单个认证器实例,也可以是一个认证器数组组成的认证链。 -执行登录验证时(用户名、客户端 ID 等),将按配置的顺序执行。 -""" +执行登录验证时(用户名、客户端 ID 等),将按配置的顺序执行。""" } label: { en: "Per-listener authentication override" @@ -2219,14 +2072,9 @@ fields_rate_limit_conn_messages_in { fields_rate_limit_conn_bytes_in { desc { - en: """ -Limit the rate of receiving packets for a MQTT connection. -The rate is counted by bytes of packets per second. -""" - zh: """ -限制 MQTT 连接接收数据包的速率。 -速率以每秒的数据包字节数计算。 -""" + en: """Limit the rate of receiving packets for a MQTT connection. +The rate is counted by bytes of packets per second.""" + zh: """限制 MQTT 连接接收数据包的速率。 速率以每秒的数据包字节数计算。""" } label: { en: "Connection bytes in" @@ -2236,8 +2084,7 @@ The rate is counted by bytes of packets per second. client_ssl_opts_schema_server_name_indication { desc { - en: """ -Specify the host name to be used in TLS Server Name Indication extension.
+ en: """Specify the host name to be used in TLS Server Name Indication extension.
For instance, when connecting to "server.example.net", the genuine server which accepts the connection and performs TLS handshake may differ from the host the TLS client initially connects to, e.g. when connecting to an IP address @@ -2247,17 +2094,14 @@ to establish the connection, unless it is IP addressed used.
The host name is then also used in the host name verification of the peer certificate.
The special value 'disable' prevents the Server Name Indication extension from being sent and disables the hostname -verification check. -""" - zh: """ -指定要在 TLS 服务器名称指示扩展中使用的主机名。
+verification check.""" + zh: """指定要在 TLS 服务器名称指示扩展中使用的主机名。
例如,当连接到 "server.example.net" 时,接受连接并执行 TLS 握手的真正服务器可能与 TLS 客户端最初连接到的主机不同, 例如,当连接到 IP 地址时,或者当主机具有多个可解析的 DNS 记录时
如果未指定,它将默认为使用的主机名字符串 建立连接,除非使用 IP 地址
然后,主机名也用于对等机的主机名验证证书
-特殊值 disable 阻止发送服务器名称指示扩展,并禁用主机名验证检查。 -""" +特殊值 disable 阻止发送服务器名称指示扩展,并禁用主机名验证检查。""" } label: { en: "Server Name Indication" @@ -2267,14 +2111,10 @@ verification check. fields_tcp_opts_active_n { desc { - en: """ -Specify the {active, N} option for this Socket.
-See: https://erlang.org/doc/man/inet.html#setopts-2 -""" - zh: """ -为此套接字指定{active,N}选项
-See: https://erlang.org/doc/man/inet.html#setopts-2 -""" + en: """Specify the {active, N} option for this Socket.
+See: https://erlang.org/doc/man/inet.html#setopts-2""" + zh: """为此套接字指定{active,N}选项
+See: https://erlang.org/doc/man/inet.html#setopts-2""" } label: { en: "active_n" @@ -2284,13 +2124,9 @@ See: https://erlang.org/doc/man/inet.html#setopts-2 fields_tcp_opts_backlog { desc { - en: """ -TCP backlog defines the maximum length that the queue of - pending connections can grow to. -""" - zh: """ -TCP backlog 定义了挂起连接队列可以增长到的最大长度。 -""" + en: """TCP backlog defines the maximum length that the queue of +pending connections can grow to.""" + zh: """TCP backlog 定义了挂起连接队列可以增长到的最大长度。""" } label: { en: "TCP backlog length" @@ -2300,7 +2136,7 @@ TCP backlog 定义了挂起连接队列可以增长到的最大长度。 fields_tcp_opts_send_timeout { desc { - en: """The TCP send timeout for the connections. """ + en: """The TCP send timeout for the connections.""" zh: """连接的 TCP 发送超时。""" } label: { @@ -2311,12 +2147,8 @@ fields_tcp_opts_send_timeout { fields_tcp_opts_send_timeout_close { desc { - en: """ -Close the connection if send timeout. -""" - zh: """ -如果发送超时,则关闭连接。 -""" + en: """Close the connection if send timeout.""" + zh: """如果发送超时,则关闭连接。""" } label: { en: "TCP send timeout close" @@ -2326,12 +2158,8 @@ Close the connection if send timeout. fields_tcp_opts_recbuf { desc { - en: """ -The TCP receive buffer (OS kernel) for the connections. -""" - zh: """ -连接的 TCP 接收缓冲区(OS 内核)。 -""" + en: """The TCP receive buffer (OS kernel) for the connections.""" + zh: """连接的 TCP 接收缓冲区(OS 内核)。""" } label: { en: "TCP receive buffer" @@ -2341,12 +2169,8 @@ The TCP receive buffer (OS kernel) for the connections. fields_tcp_opts_sndbuf { desc { - en: """ -The TCP send buffer (OS kernel) for the connections. -""" - zh: """ -连接的 TCP 发送缓冲区(OS 内核)。 -""" + en: """The TCP send buffer (OS kernel) for the connections.""" + zh: """连接的 TCP 发送缓冲区(OS 内核)。""" } label: { en: "TCP send buffer" @@ -2356,12 +2180,8 @@ The TCP send buffer (OS kernel) for the connections. fields_tcp_opts_buffer { desc { - en: """ -The size of the user-space buffer used by the driver. -""" - zh: """ -驱动程序使用的用户空间缓冲区的大小。 -""" + en: """The size of the user-space buffer used by the driver.""" + zh: """驱动程序使用的用户空间缓冲区的大小。""" } label: { en: "TCP user-space buffer" @@ -2371,13 +2191,9 @@ The size of the user-space buffer used by the driver. fields_tcp_opts_high_watermark { desc { - en: """ -The socket is set to a busy state when the amount of data queued internally - by the VM socket implementation reaches this limit. -""" - zh: """ -当 VM 套接字实现内部排队的数据量达到此限制时,套接字将设置为忙碌状态。 -""" + en: """The socket is set to a busy state when the amount of data queued internally +by the VM socket implementation reaches this limit.""" + zh: """当 VM 套接字实现内部排队的数据量达到此限制时,套接字将设置为忙碌状态。""" } label: { en: "TCP 高水位线" @@ -2387,12 +2203,8 @@ The socket is set to a busy state when the amount of data queued internally fields_tcp_opts_nodelay { desc { - en: """ -The TCP_NODELAY flag for the connections. -""" - zh: """ -连接的 TCP_NODELAY 标识 -""" + en: """The TCP_NODELAY flag for the connections.""" + zh: """连接的 TCP_NODELAY 标识""" } label: { en: "TCP_NODELAY" @@ -2402,12 +2214,8 @@ The TCP_NODELAY flag for the connections. fields_tcp_opts_reuseaddr { desc { - en: """ -The SO_REUSEADDR flag for the connections. -""" - zh: """ -连接的 SO_REUSEADDR 标识 -""" + en: """The SO_REUSEADDR flag for the connections.""" + zh: """连接的 SO_REUSEADDR 标识。""" } label: { en: "SO_REUSEADDR" @@ -2417,21 +2225,16 @@ The SO_REUSEADDR flag for the connections. fields_trace_payload_encode { desc { - en: """ -Determine the format of the payload format in the trace file.
+ en: """Determine the format of the payload format in the trace file.
`text`: Text-based protocol or plain text protocol. It is recommended when payload is JSON encoded.
`hex`: Binary hexadecimal encode. It is recommended when payload is a custom binary protocol.
-`hidden`: payload is obfuscated as `******` - -""" - zh: """ -确定跟踪文件中有效负载格式的格式。
+`hidden`: payload is obfuscated as `******`""" + zh: """确定跟踪文件中有效负载格式的格式。
`text`:基于文本的协议或纯文本协议。 建议在有效负载为JSON编码时使用
`hex`:二进制十六进制编码。当有效负载是自定义二进制协议时,建议使用此选项
-`hidden`:有效负载被模糊化为 `******` -""" +`hidden`:有效负载被模糊化为 `******`""" } label: { en: "Payload encode" @@ -2441,14 +2244,10 @@ Determine the format of the payload format in the trace file.
fields_ws_opts_mqtt_path { desc { - en: """ -WebSocket's MQTT protocol path. So the address of EMQX Broker's WebSocket is: -ws://{ip}:{port}/mqtt -""" - zh: """ -WebSocket 的 MQTT 协议路径。因此,EMQX Broker的WebSocket地址为: -ws://{ip}:{port}/mqtt -""" + en: """WebSocket's MQTT protocol path. So the address of EMQX Broker's WebSocket is: +ws://{ip}:{port}/mqtt""" + zh: """WebSocket 的 MQTT 协议路径。因此,EMQX Broker的WebSocket地址为: +ws://{ip}:{port}/mqtt""" } label: { en: "WS MQTT Path" @@ -2458,12 +2257,8 @@ WebSocket 的 MQTT 协议路径。因此,EMQX Broker的WebSocket地址为: fields_ws_opts_mqtt_piggyback { desc { - en: """ -Whether a WebSocket message is allowed to contain multiple MQTT packets. -""" - zh: """ -WebSocket消息是否允许包含多个 MQTT 数据包。 -""" + en: """Whether a WebSocket message is allowed to contain multiple MQTT packets.""" + zh: """WebSocket消息是否允许包含多个 MQTT 数据包。""" } label: { en: "MQTT Piggyback" @@ -2473,14 +2268,10 @@ WebSocket消息是否允许包含多个 MQTT 数据包。 fields_ws_opts_compress { desc { - en: """ -If true, compress WebSocket messages using zlib.
-The configuration items under deflate_opts belong to the compression-related parameter configuration. -""" - zh: """ -如果 true,则使用zlib 压缩 WebSocket 消息
-deflate_opts 下的配置项属于压缩相关参数配置。 -""" + en: """If true, compress WebSocket messages using zlib.
+The configuration items under deflate_opts belong to the compression-related parameter configuration.""" + zh: """如果 true,则使用zlib 压缩 WebSocket 消息
+deflate_opts 下的配置项属于压缩相关参数配置。""" } label: { en: "Ws compress" @@ -2490,13 +2281,8 @@ The configuration items under deflate_opts belong to the compressio fields_ws_opts_idle_timeout { desc { - en: """ -Close transport-layer connections from the clients that have not sent MQTT CONNECT -message within this interval. -""" - zh: """ -关闭在此间隔内未发送 MQTT CONNECT 消息的客户端的传输层连接。 -""" + en: """Close transport-layer connections from the clients that have not sent MQTT CONNECT message within this interval.""" + zh: """关闭在此间隔内未发送 MQTT CONNECT 消息的客户端的传输层连接。""" } label: { en: "WS idle timeout" @@ -2506,12 +2292,8 @@ message within this interval. fields_ws_opts_max_frame_size { desc { - en: """ -The maximum length of a single MQTT packet. -""" - zh: """ -单个 MQTT 数据包的最大长度。 -""" + en: """The maximum length of a single MQTT packet.""" + zh: """单个 MQTT 数据包的最大长度。""" } label: { en: "Max frame size" @@ -2521,15 +2303,11 @@ The maximum length of a single MQTT packet. fields_ws_opts_fail_if_no_subprotocol { desc { - en: """ -If true, the server will return an error when + en: """If true, the server will return an error when the client does not carry the Sec-WebSocket-Protocol field. -
Note: WeChat applet needs to disable this verification. -""" - zh: """ -如果true,当客户端未携带Sec WebSocket Protocol字段时,服务器将返回一个错误。 -
注意:微信小程序需要禁用此验证。 -""" +
Note: WeChat applet needs to disable this verification.""" + zh: """如果true,当客户端未携带Sec WebSocket Protocol字段时,服务器将返回一个错误。 +
注意:微信小程序需要禁用此验证。""" } label: { en: "Fail if no subprotocol" @@ -2539,12 +2317,8 @@ If true, the server will return an error when fields_ws_opts_supported_subprotocols { desc { - en: """ -Comma-separated list of supported subprotocols. -""" - zh: """ -逗号分隔的 subprotocols 支持列表。 -""" + en: """Comma-separated list of supported subprotocols.""" + zh: """逗号分隔的 subprotocols 支持列表。""" } label: { en: "Supported subprotocols" @@ -2554,14 +2328,10 @@ Comma-separated list of supported subprotocols. fields_ws_opts_check_origin_enable { desc { - en: """ -If true, origin HTTP header will be + en: """If true, origin HTTP header will be validated against the list of allowed origins configured in check_origins - parameter. -""" - zh: """ -如果trueoriginHTTP 头将根据check_origins参数中配置的允许来源列表进行验证。 -""" + parameter.""" + zh: """如果trueoriginHTTP 头将根据check_origins参数中配置的允许来源列表进行验证。""" } label: { en: "Check origin" @@ -2571,14 +2341,10 @@ If true, origin HTTP header will be fields_ws_opts_allow_origin_absence { desc { - en: """ -If false and check_origin_enable is + en: """If false and check_origin_enable is true, the server will reject requests that don't have origin - HTTP header. -""" - zh: """ -If false and check_origin_enable is true, the server will reject requests that don't have origin HTTP header. -""" + HTTP header.""" + zh: """If false and check_origin_enable is true, the server will reject requests that don't have origin HTTP header.""" } label: { en: "Allow origin absence" @@ -2588,12 +2354,8 @@ If false and check_origin_enable is true, fields_ws_opts_check_origins { desc { - en: """ -List of allowed origins.
See check_origin_enable. -""" - zh: """ -允许的 origins 列表 -""" + en: """List of allowed origins.
See check_origin_enable.""" + zh: """允许的 origins 列表""" } label: { en: "Allowed origins" @@ -2603,14 +2365,10 @@ List of allowed origins.
See check_origin_enable. fields_ws_opts_proxy_address_header { desc { - en: """ -HTTP header used to pass information about the client IP address. -Relevant when the EMQX cluster is deployed behind a load-balancer. -""" - zh: """ -HTTP 头,用于传递有关客户端 IP 地址的信息。 -当 EMQX 集群部署在负载平衡器后面时,这一点非常重要。 -""" + en: """HTTP header used to pass information about the client IP address. +Relevant when the EMQX cluster is deployed behind a load-balancer.""" + zh: """HTTP 头,用于传递有关客户端 IP 地址的信息。 +当 EMQX 集群部署在负载平衡器后面时,这一点非常重要。""" } label: { en: "Proxy address header" @@ -2620,14 +2378,8 @@ HTTP 头,用于传递有关客户端 IP 地址的信息。 fields_ws_opts_proxy_port_header { desc { - en: """ -HTTP header used to pass information about the client port. -Relevant when the EMQX cluster is deployed behind a load-balancer. -""" - zh: """ -HTTP 头,用于传递有关客户端端口的信息。 -当 EMQX 集群部署在负载平衡器后面时,这一点非常重要。 -""" + en: """HTTP header used to pass information about the client port. Relevant when the EMQX cluster is deployed behind a load-balancer.""" + zh: """HTTP 头,用于传递有关客户端端口的信息。当 EMQX 集群部署在负载平衡器后面时,这一点非常重要。""" } label: { en: "Proxy port header" diff --git a/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf index eb243c0cb..6a4a1e2d4 100644 --- a/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf @@ -133,20 +133,16 @@ emqx_authn_jwt { verify_claims { desc { - en: """ -A list of custom claims to validate, which is a list of name/value pairs. + en: """A list of custom claims to validate, which is a list of name/value pairs. Values can use the following placeholders: - ${username}: Will be replaced at runtime with Username used by the client when connecting - ${clientid}: Will be replaced at runtime with Client ID 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 verify_claims. -""" - zh: """ -需要验证的自定义声明列表,它是一个名称/值对列表。 +Authentication will verify that the value of claims in the JWT (taken from the Password field) matches what is required in verify_claims.""" + zh: """需要验证的自定义声明列表,它是一个名称/值对列表。 值可以使用以下占位符: - ${username}: 将在运行时被替换为客户端连接时使用的用户名 - ${clientid}: 将在运行时被替换为客户端连接时使用的客户端标识符 -认证时将验证 JWT(取自 Password 字段)中 claims 的值是否与 verify_claims 中要求的相匹配。 -""" +认证时将验证 JWT(取自 Password 字段)中 claims 的值是否与 verify_claims 中要求的相匹配。""" } label { en: """Verify Claims""" diff --git a/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf index 440e6edb1..80d6473ed 100644 --- a/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf @@ -33,18 +33,14 @@ emqx_authn_mongodb { filter { desc { - en: """ -Conditional expression that defines the filter condition in the query. + en: """Conditional expression that defines the filter condition in the query. Filter supports the following placeholders: - ${username}: Will be replaced at runtime with Username used by the client when connecting -- ${clientid}: Will be replaced at runtime with Client ID used by the client when connecting -""" - zh: """ -在查询中定义过滤条件的条件表达式。 +- ${clientid}: Will be replaced at runtime with Client ID used by the client when connecting""" + zh: """在查询中定义过滤条件的条件表达式。 过滤器支持如下占位符: - ${username}: 将在运行时被替换为客户端连接时使用的用户名 -- ${clientid}: 将在运行时被替换为客户端连接时使用的客户端标识符 -""" +- ${clientid}: 将在运行时被替换为客户端连接时使用的客户端标识符""" } label: { en: """Filter""" diff --git a/apps/emqx_authz/i18n/emqx_authz_api_schema_i18n.conf b/apps/emqx_authz/i18n/emqx_authz_api_schema_i18n.conf index afec5c109..d649dd5a0 100644 --- a/apps/emqx_authz/i18n/emqx_authz_api_schema_i18n.conf +++ b/apps/emqx_authz/i18n/emqx_authz_api_schema_i18n.conf @@ -121,18 +121,14 @@ emqx_authz_api_schema { filter { desc { - en: """ -Conditional expression that defines the filter condition in the query. + en: """Conditional expression that defines the filter condition in the query. Filter supports the following placeholders: - - ${username}: Will be replaced at runtime with Username used by the client when connecting - - ${clientid}: Will be replaced at runtime with Client ID used by the client when connecting -""" - zh: """ -在查询中定义过滤条件的条件表达式。 + - ${username}: Will be replaced at runtime with Username used by the client when connecting; + - ${clientid}: Will be replaced at runtime with Client ID used by the client when connecting.""" + zh: """在查询中定义过滤条件的条件表达式。 过滤器支持如下占位符: - ${username}: 将在运行时被替换为客户端连接时使用的用户名 -- ${clientid}: 将在运行时被替换为客户端连接时使用的客户端标识符 -""" +- ${clientid}: 将在运行时被替换为客户端连接时使用的客户端标识符""" } label { en: """Filter""" diff --git a/apps/emqx_authz/i18n/emqx_authz_schema_i18n.conf b/apps/emqx_authz/i18n/emqx_authz_schema_i18n.conf index a10128592..e48c64b89 100644 --- a/apps/emqx_authz/i18n/emqx_authz_schema_i18n.conf +++ b/apps/emqx_authz/i18n/emqx_authz_schema_i18n.conf @@ -1,8 +1,7 @@ emqx_authz_schema { sources { desc { - en: """ -Authorization data sources.
+ en: """Authorization data sources.
An array of authorization (ACL) data providers. It is designed as an array, not a hash-map, so the sources can be ordered to form a chain of access controls.
@@ -18,10 +17,9 @@ the default action configured in 'authorization.no_match' is applied.
NOTE: The source elements are identified by their 'type'. -It is NOT allowed to configure two or more sources of the same type. -""" - zh: """ -授权数据源。
+It is NOT allowed to configure two or more sources of the same type.""" + + zh: """授权数据源。
授权(ACL)数据源的列表。 它被设计为一个数组,而不是一个散列映射, 所以可以作为链式访问控制。
@@ -36,8 +34,7 @@ It is NOT allowed to configure two or more sources of the same type. 注意: 数据源使用 'type' 进行标识。 -使用同一类型的数据源多于一次不被允许。 -""" +使用同一类型的数据源多于一次不被允许。""" } label { en: """sources""" @@ -93,18 +90,15 @@ It is NOT allowed to configure two or more sources of the same type. path { desc { - en: """ -Path to the file which contains the ACL rules. + en: """Path to the file which contains the ACL rules. If the file provisioned before starting EMQX node, it can be placed anywhere as long as EMQX has read access to it. That is, EMQX will treat it as read only. 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`, -and the old file will not be used anymore. -""" - zh: """ -包含 ACL 规则的文件路径。 +and the old file will not be used anymore.""" + zh: """包含 ACL 规则的文件路径。 如果在启动 EMQX 节点前预先配置该路径, 那么可以将该文件置于任何 EMQX 可以访问到的位置。 @@ -269,18 +263,14 @@ and the old file will not be used anymore. filter { desc { - en: """ -Conditional expression that defines the filter condition in the query. -Filter supports the following placeholders: - - ${username}: Will be replaced at runtime with Username used by the client when connecting - - ${clientid}: Will be replaced at runtime with Client ID used by the client when connecting -""" - zh: """ -在查询中定义过滤条件的条件表达式。 -过滤器支持如下占位符: -- ${username}:将在运行时被替换为客户端连接时使用的用户名 -- ${clientid}:将在运行时被替换为客户端连接时使用的客户端标识符 -""" + en: """Conditional expression that defines the filter condition in the query. +Filter supports the following placeholders
+ - ${username}: Will be replaced at runtime with Username used by the client when connecting
+ - ${clientid}: Will be replaced at runtime with Client ID used by the client when connecting""" + zh: """在查询中定义过滤条件的条件表达式。 +过滤器支持如下占位符:
+- ${username}:将在运行时被替换为客户端连接时使用的用户名
+- ${clientid}:将在运行时被替换为客户端连接时使用的客户端标识符""" } label { en: """Filter""" diff --git a/apps/emqx_bridge/i18n/emqx_bridge_api.conf b/apps/emqx_bridge/i18n/emqx_bridge_api.conf index 9d1911e1b..73f78609d 100644 --- a/apps/emqx_bridge/i18n/emqx_bridge_api.conf +++ b/apps/emqx_bridge/i18n/emqx_bridge_api.conf @@ -57,7 +57,7 @@ emqx_bridge_api { desc_api1 { desc { en: """List all created bridges""" - zh: """列出所有 Birdge """ + zh: """列出所有 Birdge""" } label: { en: "List All Bridges" @@ -144,14 +144,10 @@ emqx_bridge_api { desc_api9 { desc { - en: """ -Test creating a new bridge by given ID
-The ID must be of format '{type}:{name}' -""" - zh: """ -通过给定的 ID 测试创建一个新的桥接。
-ID 的格式必须为 ’{type}:{name}” -""" + en: """Test creating a new bridge by given ID
+The ID must be of format '{type}:{name}'""" + zh: """通过给定的 ID 测试创建一个新的桥接。
+ID 的格式必须为 ’{type}:{name}”""" } label: { en: "Test Bridge Creation" diff --git a/apps/emqx_bridge/i18n/emqx_bridge_webhook_schema.conf b/apps/emqx_bridge/i18n/emqx_bridge_webhook_schema.conf index a6e75a766..cf86b63e0 100644 --- a/apps/emqx_bridge/i18n/emqx_bridge_webhook_schema.conf +++ b/apps/emqx_bridge/i18n/emqx_bridge_webhook_schema.conf @@ -22,22 +22,18 @@ emqx_bridge_webhook_schema { } config_url { desc { - en: """ -The URL of the HTTP Bridge.
+ en: """The URL of the HTTP Bridge.
Template with variables is allowed in the path, but variables cannot be used in the scheme, host, or port part.
For example, http://localhost:9901/${topic} is allowed, but http://${host}:9901/message or http://localhost:${port}/message -is not allowed. -""" - zh: """ -HTTP Bridge 的 URL。
+is not allowed.""" + zh: """HTTP Bridge 的 URL。
路径中允许使用带变量的模板,但是 host, port 不允许使用变量模板。
例如, http://localhost:9901/${topic} 是允许的, 但是 http://${host}:9901/message http://localhost:${port}/message -不允许。 -""" +不允许。""" } label: { en: "HTTP Bridge" @@ -47,17 +43,13 @@ HTTP Bridge 的 URL。
config_local_topic { desc { - en: """ -The MQTT topic filter to be forwarded to the HTTP server. All MQTT 'PUBLISH' messages with the topic + en: """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.
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 -will be forwarded. -""" - zh: """ -发送到 'local_topic' 的消息都会转发到 HTTP 服务器。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HTTP 服务器。 -""" +will be forwarded.""" + zh: """发送到 'local_topic' 的消息都会转发到 HTTP 服务器。
+注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HTTP 服务器。""" } label: { en: "Local Topic" @@ -67,13 +59,10 @@ will be forwarded. config_method { desc { - en: """ -The method of the HTTP request. All the available methods are: post, put, get, delete.
-Template with variables is allowed.
-""" - zh: """ -HTTP 请求的方法。 所有可用的方法包括:post、put、get、delete。
-允许使用带有变量的模板。
""" + en: """The method of the HTTP request. All the available methods are: post, put, get, delete.
+Template with variables is allowed.""" + zh: """HTTP 请求的方法。 所有可用的方法包括:post、put、get、delete。
+允许使用带有变量的模板。""" } label: { en: "HTTP Method" @@ -83,14 +72,10 @@ HTTP 请求的方法。 所有可用的方法包括:post、put、get、delete config_headers { desc { - en: """ -The headers of the HTTP request.
-Template with variables is allowed. -""" - zh: """ -HTTP 请求的标头。
-允许使用带有变量的模板。 -""" + en: """The headers of the HTTP request.
+Template with variables is allowed.""" + zh: """HTTP 请求的标头。
+允许使用带有变量的模板。""" } label: { en: "HTTP Header" @@ -100,22 +85,18 @@ HTTP 请求的标头。
config_body { desc { - en: """ -The body of the HTTP request.
+ en: """The body of the HTTP request.
If not provided, the body will be a JSON object of all the available fields.
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), 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).
-Template with variables is allowed. -""" - zh: """ -HTTP 请求的正文。
+Template with variables is allowed.""" + zh: """HTTP 请求的正文。
如果没有设置该字段,请求正文将是包含所有可用字段的 JSON object。
如果该 webhook 是由于收到 MQTT 消息触发的,'所有可用字段' 将是 MQTT 消息的 上下文信息;如果该 webhook 是由于规则触发的,'所有可用字段' 则为触发事件的上下文信息。
-允许使用带有变量的模板。 -""" +允许使用带有变量的模板。""" } label: { en: "HTTP Body" diff --git a/apps/emqx_conf/i18n/emqx_conf_schema.conf b/apps/emqx_conf/i18n/emqx_conf_schema.conf index 56da34621..2f0c6b938 100644 --- a/apps/emqx_conf/i18n/emqx_conf_schema.conf +++ b/apps/emqx_conf/i18n/emqx_conf_schema.conf @@ -15,12 +15,11 @@ emqx_conf_schema { desc { en: """Maximum number of simultaneously existing processes for this Erlang system. 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系统同时存在的最大进程数。 实际选择的最大值可能比设置的数字大得多。 -参考: https://www.erlang.org/doc/man/erl.html - """ +参考: https://www.erlang.org/doc/man/erl.html""" } label { en: "Erlang Process Limit" @@ -32,12 +31,11 @@ For more information, see: https://www.erlang.org/doc/man/erl.html desc { en: """Maximum number of simultaneously existing ports for this Erlang system. 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系统同时存在的最大端口数。 实际选择的最大值可能比设置的数字大得多。 -参考: https://www.erlang.org/doc/man/erl.html - """ +参考: https://www.erlang.org/doc/man/erl.html""" } label { en: "Erlang Port Limit" @@ -69,15 +67,19 @@ For more information, see: https://www.erlang.org/doc/man/erl.html cluster_discovery_strategy { desc { - en: """Service discovery method for the cluster nodes.""" + en: """Service discovery method for the cluster nodes. Possible values are: +- manual: Use emqx ctl cluster command to manage cluster.
+- static: Configure static nodes list by setting seeds in config file.
+- dns: Use DNS A record to discover peer nodes.
+- etcd: Use etcd to discover peer nodes.
+- k8s: Use Kubernetes API to discover peer pods.""" + zh: """集群节点发现方式。可选值为: -- manual: 手动加入集群
+- manual: 使用 emqx ctl cluster 命令管理集群。
- static: 配置静态节点。配置几个固定的节点,新节点通过连接固定节点中的某一个来加入集群。
-- mcast: 使用 UDP 多播的方式发现节点。
- dns: 使用 DNS A 记录的方式发现节点。
- etcd: 使用 etcd 发现节点。
-- k8s: 使用 Kubernetes 发现节点。
- """ +- k8s: 使用 Kubernetes API 发现节点。""" } label { en: "Cluster Discovery Strategy" @@ -109,12 +111,12 @@ For more information, see: https://www.erlang.org/doc/man/erl.html cluster_proto_dist { desc { - en: """The Erlang distribution protocol for the cluster.""" - zh: """分布式 Erlang 集群协议类型。可选值为: + en: """The Erlang distribution protocol for the cluster.
+- inet_tcp: IPv4 TCP
+- inet_tls: IPv4 TLS, works together with etc/ssl_dist.conf""" + zh: """分布式 Erlang 集群协议类型。可选值为:
- inet_tcp: 使用 IPv4
-- inet6_tcp 使用 IPv6
-- inet_tls: 使用 TLS,需要与 node.ssl_dist_optfile 配置一起使用。
- """ +- inet_tls: 使用 TLS,需要配合 etc/ssl_dist.conf 一起使用。""" } label { en: "Cluster Protocol Distribution" @@ -128,8 +130,7 @@ For more information, see: https://www.erlang.org/doc/man/erl.html zh: """集群中的EMQX节点名称列表, 指定固定的节点列表,多个节点间使用逗号 , 分隔。 当 cluster.discovery_strategy 为 static 时,此配置项才有效。 -适合于节点数量较少且固定的集群。 - """ +适合于节点数量较少且固定的集群。""" } label { en: "Cluster Static Seeds" @@ -141,8 +142,7 @@ For more information, see: https://www.erlang.org/doc/man/erl.html desc { en: """Multicast IPv4 address.""" zh: """指定多播 IPv4 地址。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Multicast Address" @@ -153,11 +153,10 @@ For more information, see: https://www.erlang.org/doc/man/erl.html cluster_mcast_ports { desc { en: """List of UDP ports used for service discovery.
-Note: probe messages are broadcast to all the specified ports. - """ +Note: probe messages are broadcast to all the specified ports.""" + zh: """指定多播端口。如有多个端口使用逗号 , 分隔。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Multicast Ports" @@ -169,8 +168,7 @@ Note: probe messages are broadcast to all the specified ports. desc { en: """Local IP address the node discovery service needs to bind to.""" zh: """指定节点发现服务需要绑定到本地 IP 地址。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Multicast Interface" @@ -182,8 +180,7 @@ Note: probe messages are broadcast to all the specified ports. desc { en: """Time-to-live (TTL) for the outgoing UDP datagrams.""" zh: """指定多播的 Time-To-Live 值。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Multicast TTL" @@ -195,8 +192,7 @@ Note: probe messages are broadcast to all the specified ports. desc { en: """If true, loop UDP datagrams back to the local socket.""" zh: """设置多播的报文是否投递到本地回环地址。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Multicast Loop" @@ -208,8 +204,7 @@ Note: probe messages are broadcast to all the specified ports. desc { en: """Size of the kernel-level buffer for outgoing datagrams.""" zh: """外发数据报的内核级缓冲区的大小。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Muticast Sendbuf" @@ -221,8 +216,7 @@ Note: probe messages are broadcast to all the specified ports. desc { en: """Size of the kernel-level buffer for incoming datagrams.""" zh: """接收数据报的内核级缓冲区的大小。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Muticast Sendbuf" @@ -234,8 +228,7 @@ Note: probe messages are broadcast to all the specified ports. desc { en: """Size of the user-level buffer.""" zh: """用户级缓冲区的大小。 -当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 mcast 时,此配置项才有效。""" } label { en: "Cluster Muticast Buffer" @@ -246,11 +239,9 @@ Note: probe messages are broadcast to all the specified ports. cluster_dns_name { desc { en: """The domain name from which to discover peer EMQX nodes' IP addresses. -Applicable when cluster.discovery_strategy = dns -""" +Applicable when cluster.discovery_strategy = dns""" zh: """指定 DNS A 记录的名字。emqx 会通过访问这个 DNS A 记录来获取 IP 地址列表。 -当cluster.discovery_strategydns 时有效。 -""" +当cluster.discovery_strategydns 时有效。""" } label { en: "Cluster Dns Name" @@ -260,7 +251,7 @@ Applicable when cluster.discovery_strategy = dns cluster_dns_record_type { desc { - en: """DNS record type. """ + en: """DNS record type.""" zh: """DNS 记录类型。""" } label { @@ -273,8 +264,7 @@ Applicable when cluster.discovery_strategy = dns desc { en: """List of endpoint URLs of the etcd cluster""" zh: """指定 etcd 服务的地址。如有多个服务使用逗号 , 分隔。 -当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。""" } label { en: "Cluster Etcd Server" @@ -287,8 +277,7 @@ Applicable when cluster.discovery_strategy = dns en: """Key prefix used for EMQX service discovery.""" zh: """指定 etcd 路径的前缀。每个节点在 etcd 中都会创建一个路径: v2/keys///
-当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。""" } label { en: "Cluster Etcd Prefix" @@ -299,11 +288,10 @@ v2/keys///
cluster_etcd_node_ttl { desc { 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 中节点信息的过期时间。 -当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。""" } label { en: "Cluster Etcd Node TTL" @@ -315,8 +303,7 @@ It is refreshed automatically, as long as the node is alive. desc { en: """Options for the TLS connection to the etcd cluster.""" zh: """当使用 TLS 连接 etcd 时的配置选项。 -当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 etcd 时,此配置项才有效。""" } label { en: "Cluster Etcd SSL Option" @@ -328,8 +315,7 @@ It is refreshed automatically, as long as the node is alive. desc { en: """Kubernetes API endpoint URL.""" zh: """指定 Kubernetes API Server。如有多个 Server 使用逗号 , 分隔。 -当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。""" } label { en: "Cluster k8s ApiServer" @@ -341,8 +327,7 @@ It is refreshed automatically, as long as the node is alive. desc { en: """EMQX broker service name.""" zh: """指定 Kubernetes 中 EMQX 的服务名。 -当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。 - """ +当 cluster.discovery_strategy 为 k8s 时,此配置项才有效。""" } label { en: "K8s Service Name" @@ -354,12 +339,11 @@ It is refreshed automatically, as long as the node is alive. desc { en: """Address type used for connecting to the discovered nodes. Setting cluster.k8s.address_type to ip 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 列表。 指定 cluster.k8s.address_typeip,则将从 Kubernetes 接口中获取集群中其他节点 -的IP地址。 -""" +的IP地址。""" } label { en: "K8s Address Type" @@ -371,8 +355,7 @@ make EMQX to discover IP addresses of peer nodes from Kubernetes API. desc { en: """Kubernetes namespace.""" zh: """当使用 k8s 方式并且 cluster.k8s.address_type 指定为 dns 类型时, -可设置 emqx 节点名的命名空间。与 cluster.k8s.suffix 一起使用用以拼接得到节点名列表。 - """ +可设置 emqx 节点名的命名空间。与 cluster.k8s.suffix 一起使用用以拼接得到节点名列表。""" } label { 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 address_type is dns or hostname.""" zh: """当使用 k8s 方式并且 cluster.k8s.address_type 指定为 dns 类型时,可设置 emqx 节点名的后缀。 -与 cluster.k8s.namespace 一起使用用以拼接得到节点名列表。 - """ +与 cluster.k8s.namespace 一起使用用以拼接得到节点名列表。""" } label { en: "K8s Suffix" @@ -398,11 +380,9 @@ or hostname.""" node_name { desc { en: """Unique name of the EMQX node. It must follow %name%@FQDN or -%name%@IPv4 format. - """ +%name%@IPv4 format.""" zh: """节点名。格式为 \@\。其中 可以是 IP 地址,也可以是 FQDN。 -详见 http://erlang.org/doc/reference_manual/distributed.html。 - """ +详见 http://erlang.org/doc/reference_manual/distributed.html。""" } label { en: "Node Name" @@ -425,8 +405,7 @@ belong to different clusters from accidentally connecting to each other.""" node_data_dir { desc { - en: """ -Path to the persistent data directory.
+ en: """Path to the persistent data directory.
Possible auto-created subdirectories are:
- `mnesia/`: EMQX's built-in database directory.
For example, `mnesia/emqx@127.0.0.1`.
@@ -437,18 +416,17 @@ the old dir should be deleted first.
- `patches`: Hot-patch beam files are to be placed here.
- `trace`: Trace log files.
-**NOTE**: One data dir cannot be shared by two or more EMQX nodes. -""" - zh: """ -节点数据存放目录,可能会自动创建的子目录如下:
+**NOTE**: One data dir cannot be shared by two or more EMQX nodes.""" + + zh: """节点数据存放目录,可能会自动创建的子目录如下:
- `mnesia/`。EMQX的内置数据库目录。例如,`mnesia/emqx@127.0.0.1`。
如果节点要被重新命名(例如,`emqx@10.0.1.1`)。旧目录应该首先被删除。
- `configs`。在启动时生成的配置,以及集群/本地覆盖的配置。
- `patches`: 热补丁文件将被放在这里。
- `trace`: 日志跟踪文件。
-**注意**: 一个数据dir不能被两个或更多的EMQX节点同时使用。 - """ +**注意**: 一个数据dir不能被两个或更多的EMQX节点同时使用。""" + } label { en: "Node Data Dir" @@ -480,16 +458,15 @@ the old dir should be deleted first.
node_crash_dump_seconds { 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. -- If setting to 0 seconds, the runtime system does not even attempt to write the crash dump file. It only terminates. -- 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. -- A negative value causes the termination of the runtime system to wait indefinitely until the crash dump file has been completely written. - """ - zh: """该配置给出了运行时系统允许花费的写入崩溃转储的秒数。当给定的秒数已经过去,运行时系统将被终止。 -- 如果设置为0秒,运行时会立即终止,不会尝试写入崩溃转储文件。 -- 如果设置为一个正数 S,节点会等待 S 秒来完成崩溃转储文件,然后用SIGALRM信号终止运行时系统。 -- 如果设置为一个负值导致运行时系统的终止等待无限期地直到崩溃转储文件已经完全写入。 -""" + 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.
+- If setting to 0 seconds, the runtime system does not even attempt to write the crash dump file. It only terminates.
+- 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.
+- A negative value causes the termination of the runtime system to wait indefinitely until the crash dump file has been completely written.""" + + zh: """该配置给出了运行时系统允许花费的写入崩溃转储的秒数。当给定的秒数已经过去,运行时系统将被终止。
+- 如果设置为0秒,运行时会立即终止,不会尝试写入崩溃转储文件。
+- 如果设置为一个正数 S,节点会等待 S 秒来完成崩溃转储文件,然后用SIGALRM信号终止运行时系统。
+- 如果设置为一个负值导致运行时系统的终止等待无限期地直到崩溃转储文件已经完全写入。""" } label { en: "Crash Dump Seconds" @@ -501,12 +478,11 @@ the old dir should be deleted first.
desc { 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. -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: """限制崩溃文件的大小,当崩溃时节点内存太大, 如果为了保存现场,需要全部存到崩溃文件中,此处限制最多能保存多大的文件。 -如果超过此限制,崩溃转储将被截断。如果设置为0,系统不会尝试写入崩溃转储文件。 -""" +如果超过此限制,崩溃转储将被截断。如果设置为0,系统不会尝试写入崩溃转储文件。""" } label { 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 { desc { 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 { 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 { desc { en: """Maximum depth of the call stack printed in error messages and -process_info. - """ +process_info.""" zh: """错误信息中打印的最大堆栈层数""" } 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 { 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应用程序的列表。""" } 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 { desc { en: """etc 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 { desc { - en: """ -Select the backend for the embedded database.
+ en: """Select the backend for the embedded database.
rlog is the default backend, that is suitable for very large clusters.
-mnesia is a backend that offers decent performance in small clusters. -""" - zh: """ rlog是默认的数据库,他适用于大规模的集群。 -mnesia是备选数据库,在小集群中提供了很好的性能。 - """ +mnesia is a backend that offers decent performance in small clusters.""" + zh: """配置后端数据库驱动,默认值为 rlog 它适用于大规模的集群。 +mnesia 是备选数据库,适合中小集群。""" } label { en: "DB Backend" @@ -582,23 +554,19 @@ mnesia是备选数据库,在小集群中提供了很好的性能。 db_role { desc { - en: """ -Select a node role.
+ en: """Select a node role.
core 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.
replicant nodes are ephemeral worker nodes. Removing them from the cluster doesn't affect database redundancy
It is recommended to have more replicant nodes than core nodes.
Note: this parameter only takes effect when the backend is set -to rlog. -""" - zh: """ -选择节点的角色。
+to rlog.""" + zh: """选择节点的角色。
core 节点提供数据的持久性,并负责写入。建议将核心节点放置在不同的机架或不同的可用区。
repliant 节点是临时工作节点。 从集群中删除它们,不影响数据库冗余
建议复制节点多于核心节点。
-注意:该参数仅在设置backend时生效到 rlog。 - """ +注意:该参数仅在设置backend时生效到 rlog。""" } label { en: "DB Role" @@ -608,20 +576,17 @@ to rlog. db_core_nodes { desc { - en: """ -List of core nodes that the replicant will connect to.
+ en: """List of core nodes that the replicant will connect to.
Note: this parameter only takes effect when the backend is set to rlog and the role is set to replicant.
This value needs to be defined for manual or static cluster discovery mechanisms.
If an automatic cluster discovery mechanism is being used (such as etcd), -there is no need to set this value. -""" +there is no need to set this value.""" zh: """当前节点连接的核心节点列表。
注意:该参数仅在设置backend时生效到 rlog 并且设置rolereplicant时生效。
该值需要在手动或静态集群发现机制下设置。
-如果使用了自动集群发现机制(如etcd),则不需要设置该值。 - """ +如果使用了自动集群发现机制(如etcd),则不需要设置该值。""" } label { en: "Db Core Node" @@ -642,10 +607,8 @@ there is no need to set this value. db_tlog_push_mode { desc { - en: """ -In sync mode the core node waits for an ack from the replicant nodes before sending the next -transaction log entry. -""" + en: """In sync mode the core node waits for an ack from the replicant nodes before sending the next +transaction log entry.""" zh: """同步模式下,核心节点等待复制节点的确认信息,然后再发送下一条事务日志。""" } label { @@ -659,13 +622,11 @@ transaction log entry. en: """Defines the default transport for pushing transaction logs.
This may be overridden on a per-shard basis in db.shard_transports. gen_rpc uses the gen_rpc library, -distr uses the Erlang distribution.
""" - zh: """ -定义用于推送事务日志的默认传输。
+distr uses the Erlang distribution.""" + zh: """定义用于推送事务日志的默认传输。
这可以在 db.shard_transports 中基于每个分片被覆盖。 gen_rpc 使用 gen_rpc 库, -distr 使用 Erlang 发行版。
- """ +distr 使用 Erlang 发行版。""" } label { en: "Default Shard Transport" @@ -682,8 +643,7 @@ the default is to use the value set in db.default_shard_transport." zh: """允许为每个 shard 下的事务日志复制操作的传输方法进行调优。
gen_rpc 使用 gen_rpc 库, distr 使用 Erlang 自带的 rpc 库。
如果未指定, -默认是使用 db.default_shard_transport 中设置的值。 - """ +默认是使用 db.default_shard_transport 中设置的值。""" } label { en: "Shard Transports" @@ -750,8 +710,7 @@ Ensure that the number of completed transactions is less than the max_hist rpc_async_batch_size { desc { 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: """异步模式下,发送的批量消息的最大数量。""" } label { @@ -768,8 +727,7 @@ If node name is emqxN@127.0.0.1, where the N is an integer, then the listening port will be 5370 + N.""" zh: """manual: 通过 tcp_server_port 来发现端口。
stateless: 使用无状态的方式来发现端口,使用如下算法。如果节点名称是 -emqxN@127.0.0.1, N 是一个数字,那么监听端口就是 5370 + N。 - """ +emqxN@127.0.0.1
, N 是一个数字,那么监听端口就是 5370 + N。""" } label { en: "RRC Port Discovery" @@ -782,8 +740,7 @@ emqxN@127.0.0.1, N 是一个数字,那么监听端口就是 5370 + N。 en: """Listening port used by RPC local service.
Note that this config only takes effect when rpc.port_discovery is set to manual.""" zh: """RPC 本地服务使用的 TCP 端口。
-只有当 rpc.port_discovery 设置为 manual 时,此配置才会生效。 - """ +只有当 rpc.port_discovery 设置为 manual 时,此配置才会生效。""" } label { 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 driver is set to ssl.""" zh: """RPC 本地服务使用的监听SSL端口。
只有当 rpc.port_discovery 设置为 manual 且 dirver 设置为 ssl, -此配置才会生效。 - """ +此配置才会生效。""" } label { en: "RPC SSL Server Port" @@ -832,11 +788,10 @@ and driver is set to ssl.""" rpc_certfile { desc { en: """Path to TLS certificate file used to validate identity of the cluster nodes. -Note that this config only takes effect when rpc.driver is set to ssl. - """ +Note that this config only takes effect when rpc.driver is set to ssl.""" + zh: """TLS 证书文件的路径,用于验证集群节点的身份。 -只有当 rpc.driver 设置为 ssl 时,此配置才会生效。 - """ +只有当 rpc.driver 设置为 ssl 时,此配置才会生效。""" } label { en: "RPC Certfile" @@ -849,8 +804,7 @@ Note that this config only takes effect when rpc.driver is set to < en: """Path to the private key file for the rpc.certfile.
Note: contents of this file are secret, so it's necessary to set permissions to 600.""" zh: """rpc.certfile 的私钥文件的路径。
-注意:此文件内容是私钥,所以需要设置权限为 600。 - """ +注意:此文件内容是私钥,所以需要设置权限为 600。""" } label { 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 rpc.certfile.
Note: certificates of all nodes in the cluster must be signed by the same CA.""" zh: """验证 rpc.certfile 的 CA 证书文件的路径。
-注意:集群中所有节点的证书必须使用同一个 CA 签发。 - """ +注意:集群中所有节点的证书必须使用同一个 CA 签发。""" } label { en: "RPC Cacertfile" @@ -1007,14 +960,10 @@ until the RPC connection is considered lost.""" common_handler_level { desc { - en: """ -The log level for the current log handler. -Defaults to warning. -""" - zh: """ -当前日志处理进程的日志级别。 -默认为 warning 级别。 -""" + en: """The log level for the current log handler. +Defaults to warning.""" + zh: """当前日志处理进程的日志级别。 +默认为 warning 级别。""" } label { en: "Log Level" @@ -1024,22 +973,18 @@ Defaults to warning. common_handler_time_offset { desc { - en: """ -The time offset to be used when formatting the timestamp. + en: """The time offset to be used when formatting the timestamp. Can be one of: - system: the time offset used by the local system - utc: the UTC time offset - +-[hh]:[mm]: user specified time offset, such as "-02:00" or "+00:00" -Defaults to: system. -""" - zh: """ -日志中的时间戳使用的时间偏移量。 +Defaults to: system.""" + zh: """日志中的时间戳使用的时间偏移量。 可选值为: - system: 本地系统使用的时区偏移量 - utc: 0 时区的偏移量 - +-[hh]:[mm]: 自定义偏移量,比如 "-02:00" 或者 "+00:00" -默认值为本地系统的时区偏移量:system。 -""" +默认值为本地系统的时区偏移量:system。""" } label { en: "Time Offset" @@ -1049,14 +994,10 @@ Defaults to: system. common_handler_chars_limit { desc { - en: """ -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. -""" - zh: """ -设置单个日志消息的最大长度。 如果超过此长度,则日志消息将被截断。最小可设置的长度为100。 -注意:如果日志格式为 JSON,限制字符长度可能会导致截断不完整的 JSON 数据。 -""" + en: """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.""" + zh: """设置单个日志消息的最大长度。 如果超过此长度,则日志消息将被截断。最小可设置的长度为100。 +注意:如果日志格式为 JSON,限制字符长度可能会导致截断不完整的 JSON 数据。""" } label { 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, 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, -asynchronous operation is resumed. -""" +asynchronous operation is resumed.""" 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被设置为与drop_mode_qlen相同的值,同步模式被禁用。也就是说,处理程序总是以异步模式运行,除非调用drop或flushing。 -- 如果drop_mode_qlen被设置为与flush_qlen相同的值,则drop模式被禁用,永远不会发生。 -""" +- 如果drop_mode_qlen被设置为与flush_qlen相同的值,则drop模式被禁用,永远不会发生。""" } label { 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 { desc { - en: """ -Type of supervisor reports that are logged. Defaults to error - - error: only log errors in the Erlang processes. - - progress: log process startup. -""" - zh: """ -Supervisor 报告的类型。默认为 error 类型。 + en: """Type of supervisor reports that are logged. Defaults to error
+ - error: only log errors in the Erlang processes
. + - progress: log process startup.""" + + zh: """Supervisor 报告的类型。默认为 error 类型。
- error:仅记录 Erlang 进程中的错误。 - - progress:除了 error 信息外,还需要记录进程启动的详细信息。 -""" + - progress:除了 error 信息外,还需要记录进程启动的详细信息。""" } label { en: "Report Type" @@ -1187,8 +1123,7 @@ Supervisor 报告的类型。默认为 error 类型。 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.""" zh: """此参数控制日志文件轮换。 `infinity` 意味着日志文件将无限增长,否则日志文件将在达到 `max_size`(以字节为单位)时进行轮换。 -与 rotation count配合使用。如果 counter 为 10,则是10个文件轮换。 -""" +与 rotation count配合使用。如果 counter 为 10,则是10个文件轮换。""" } label { en: "Rotation Size" @@ -1200,8 +1135,7 @@ Supervisor 报告的类型。默认为 error 类型。 desc { en: """Enable log rotation feature.""" zh: """启用日志轮换功能。启动后生成日志文件后缀会加上对应的索引数字,比如:log/emqx.log.1。 -系统会默认生成*.siz/*.idx用于记录日志位置,请不要手动修改这两个文件。 -""" +系统会默认生成*.siz/*.idx用于记录日志位置,请不要手动修改这两个文件。""" } label { en: "Rotation Enable" @@ -1299,8 +1233,7 @@ Supervisor 报告的类型。默认为 error 类型。 authorization { desc { - en: """ -Authorization a.k.a. ACL.
+ en: """Authorization a.k.a. ACL.
In EMQX, MQTT client access control is extremely flexible.
An out-of-the-box set of authorization data sources are supported. For example,
@@ -1308,9 +1241,9 @@ For example,
'built_in_database' source can be used to store per-client customizable rule sets, natively in the EMQX node;
'http' source to make EMQX call an external HTTP API to make the decision;
-'PostgreSQL' etc. to look up clients or rules from external databases;
-""" - zh: """ 授权(ACL)。EMQX 支持完整的客户端访问控制(ACL)。
""" +'PostgreSQL' etc. to look up clients or rules from external databases""" + + zh: """授权(ACL)。EMQX 支持完整的客户端访问控制(ACL)。""" } label { en: "Authorization" @@ -1470,14 +1403,11 @@ Each sink is represented by a _log handler_, which can be configured independent desc_log_rotation { desc { - en: """ -By default, the logs are stored in `./log` directory (for installation from zip file) or in `/var/log/emqx` (for binary installation).
-This section of the configuration controls the number of files kept for each log handler. -""" - zh: """ -默认情况下,日志存储在 `./log` 目录(用于从 zip 文件安装)或 `/var/log/emqx`(用于二进制安装)。
-这部分配置,控制每个日志处理进程保留的文件数量。 -""" + en: """By default, the logs are stored in `./log` directory (for installation from zip file) or in `/var/log/emqx` (for binary installation).
+This section of the configuration controls the number of files kept for each log handler.""" + + zh: """默认情况下,日志存储在 `./log` 目录(用于从 zip 文件安装)或 `/var/log/emqx`(用于二进制安装)。
+这部分配置,控制每个日志处理进程保留的文件数量。""" } label { 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 { - 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.
-When the overload is detected, the log handler is terminated and restarted after a cooldown period. -""" - zh: """ -日志过载终止,具有过载保护功能。当日志处理进程使用过多内存,或者缓存的日志消息过多时该功能被激活。
-检测到过载时,日志处理进程将终止,并在冷却期后重新启动。 -""" + 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.
+When the overload is detected, the log handler is terminated and restarted after a cooldown period.""" + + zh: """日志过载终止,具有过载保护功能。当日志处理进程使用过多内存,或者缓存的日志消息过多时该功能被激活。
+检测到过载时,日志处理进程将终止,并在冷却期后重新启动。""" } label { en: "Log Overload Kill" diff --git a/apps/emqx_connector/i18n/emqx_connector_api.conf b/apps/emqx_connector/i18n/emqx_connector_api.conf index 2f468fff0..8575f01aa 100644 --- a/apps/emqx_connector/i18n/emqx_connector_api.conf +++ b/apps/emqx_connector/i18n/emqx_connector_api.conf @@ -13,14 +13,10 @@ emqx_connector_api { conn_test_post { desc { - en: """ -Test creating a new connector by given ID
-The ID must be of format '{type}:{name}' -""" - zh: """ -通过给定的 ID 测试创建一个新的连接器
-ID 的格式必须为“{type}:{name}” -""" + en: """Test creating a new connector by given ID
+The ID must be of format '{type}:{name}'""" + zh: """通过给定的 ID 测试创建一个新的连接器
+ID 的格式必须为“{type}:{name}”""" } label: { en: "Create Test Connector" diff --git a/apps/emqx_connector/i18n/emqx_connector_http.conf b/apps/emqx_connector/i18n/emqx_connector_http.conf index da886191b..c6efd03ca 100644 --- a/apps/emqx_connector/i18n/emqx_connector_http.conf +++ b/apps/emqx_connector/i18n/emqx_connector_http.conf @@ -1,17 +1,13 @@ emqx_connector_http { base_url { desc { - en: """ -The base URL is the URL includes only the scheme, host and port.
+ en: """The base URL is the URL includes only the scheme, host and port.
When send an HTTP request, the real URL to be used is the concatenation of the base URL and the path parameter
-For example: `http://localhost:9901/` -""" - zh: """ -base URL 只包含host和port。
+For example: `http://localhost:9901/`""" + zh: """base URL 只包含host和port。
发送HTTP请求时,真实的URL是由base URL 和 path parameter连接而成。
-示例:`http://localhost:9901/` -""" +示例:`http://localhost:9901/`""" } label: { en: "Base Url" diff --git a/apps/emqx_connector/i18n/emqx_connector_mongo.conf b/apps/emqx_connector/i18n/emqx_connector_mongo.conf index 619a8e3b4..1f00083a4 100644 --- a/apps/emqx_connector/i18n/emqx_connector_mongo.conf +++ b/apps/emqx_connector/i18n/emqx_connector_mongo.conf @@ -3,7 +3,7 @@ emqx_connector_mongo { single_mongo_type { desc { 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: { en: "Standalone instance" @@ -46,16 +46,12 @@ emqx_connector_mongo { server { desc { - en: """ -The IPv4 or IPv6 address or the hostname to connect to.
+ en: """The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`.
-The MongoDB default port 27017 is used if `[:Port]` is not specified. -""" - zh: """ -将要连接的 IPv4 或 IPv6 地址,或者主机名。
+The MongoDB default port 27017 is used if `[:Port]` is not specified.""" + zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。
主机名具有以下形式:`Host[:Port]`。
-如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。 -""" +如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。""" } label: { en: "Server Host" @@ -65,18 +61,14 @@ The MongoDB default port 27017 is used if `[:Port]` is not specified. servers { desc { - en: """ -A Node list for Cluster to connect to. The nodes should be separated with commas, such as: `Node[,Node].` + en: """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. A host entry has the following form: `Host[:Port]`. -The MongoDB default port 27017 is used if `[:Port]` is not specified. -""" - zh: """ -集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].` +The MongoDB default port 27017 is used if `[:Port]` is not specified.""" + zh: """集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].` 每个节点的配置为:将要连接的 IPv4 或 IPv6 地址或主机名。 主机名具有以下形式:`Host[:Port]`。 -如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。 -""" +如果未指定 `[:Port]`,则使用 MongoDB 默认端口 27017。""" } label: { en: "Servers" diff --git a/apps/emqx_connector/i18n/emqx_connector_mqtt_schema.conf b/apps/emqx_connector/i18n/emqx_connector_mqtt_schema.conf index 6f573bb73..b0d1e0821 100644 --- a/apps/emqx_connector/i18n/emqx_connector_mqtt_schema.conf +++ b/apps/emqx_connector/i18n/emqx_connector_mqtt_schema.conf @@ -9,8 +9,7 @@ emqx_connector_mqtt_schema { the rule.""" zh: """入口配置定义了该桥接如何从远程 MQTT Broker 接收消息,然后将消息发送到本地 Broker。
以下字段中允许使用带有变量的模板:'remote.qos', 'local.topic', 'local.qos', 'local.retain', 'local.payload'。
- 注意:如果此桥接被用作规则的输入,并且配置了 'local.topic',则从远程代理获取的消息将同时被发送到 'local.topic' 和规则。 - """ + 注意:如果此桥接被用作规则的输入,并且配置了 'local.topic',则从远程代理获取的消息将同时被发送到 'local.topic' 和规则。""" } label: { 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.""" zh: """出口配置定义了该桥接如何将消息从本地 Broker 转发到远程 Broker。 以下字段中允许使用带有变量的模板:'remote.topic', 'local.qos', 'local.retain', 'local.payload'。
-注意:如果此桥接被用作规则的动作,并且配置了 'local.topic',则从规则输出的数据以及匹配到 'local.topic' 的 MQTT 消息都会被转发。 - """ +注意:如果此桥接被用作规则的动作,并且配置了 'local.topic',则从规则输出的数据以及匹配到 'local.topic' 的 MQTT 消息都会被转发。""" } label: { en: "Egress Configs" @@ -82,29 +80,23 @@ is configured, then both the data got from the rule and the MQTT messages that m mode { desc { - en: """ -The mode of the MQTT Bridge.
- + en: """The mode of the MQTT Bridge.
- cluster_shareload: create an MQTT connection on each node in the emqx cluster.
In 'cluster_shareload' mode, the incoming load from the remote broker is shared by using shared subscription.
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 -topic filters for remote.topic of ingress connections. -""" - zh: """ -MQTT 桥的模式。
- +topic filters for remote.topic of ingress connections.""" + zh: """MQTT 桥的模式。
- cluster_shareload:在 emqx 集群的每个节点上创建一个 MQTT 连接。
在“cluster_shareload”模式下,来自远程代理的传入负载通过共享订阅的方式接收。
请注意,clientid 以节点名称为后缀,这是为了避免不同节点之间的 clientid 冲突。 -而且对于入口连接的 remote.topic,我们只能使用共享订阅主题过滤器。 -""" +而且对于入口连接的 remote.topic,我们只能使用共享订阅主题过滤器。""" } label: { - en: "MQTT Bridge Mode" - zh: "MQTT 桥接模式" - } + en: "MQTT Bridge Mode" + zh: "MQTT 桥接模式" + } } server { @@ -113,22 +105,18 @@ MQTT 桥的模式。
zh: "远程 MQTT Broker的主机和端口。" } label: { - en: "Broker IP And Port" - zh: "Broker主机和端口" + en: "Broker IP And Port" + zh: "Broker主机和端口" } } bridge_mode { desc { - en: """ -If enable bridge mode. + en: """If enable bridge mode. NOTE: This setting is only for MQTT protocol version older than 5.0, and the remote MQTT -broker MUST support this feature. - """ - zh: """ -是否启用 Bridge Mode。 -注意:此设置只针对 MQTT 协议版本 < 5.0 有效,并且需要远程 MQTT Broker 支持 Bridge Mode。 - """ +broker MUST support this feature.""" + zh: """是否启用 Bridge Mode。 +注意:此设置只针对 MQTT 协议版本 < 5.0 有效,并且需要远程 MQTT Broker 支持 Bridge Mode。""" } label { en: "Bridge Mode" @@ -215,14 +203,10 @@ broker MUST support this feature. ingress_local_topic { desc { - en: """ -Send messages to which topic of the local broker.
-Template with variables is allowed. -""" - zh: """ -向本地broker的哪个topic发送消息。
-允许使用带有变量的模板。 -""" + en: """Send messages to which topic of the local broker.
+Template with variables is allowed.""" + zh: """向本地broker的哪个topic发送消息。
+允许使用带有变量的模板。""" } label: { en: "Local Topic" @@ -232,14 +216,10 @@ Template with variables is allowed. ingress_local_qos { desc { - en: """ -The QoS of the MQTT message to be sent.
-Template with variables is allowed. -""" - zh: """ -待发送 MQTT 消息的 QoS。
-允许使用带有变量的模板。 -""" + en: """The QoS of the MQTT message to be sent.
+Template with variables is allowed.""" + zh: """待发送 MQTT 消息的 QoS。
+允许使用带有变量的模板。""" } label: { en: "Local QoS" @@ -260,14 +240,10 @@ Template with variables is allowed. egress_remote_topic { desc { - en: """ -Forward to which topic of the remote broker.
-Template with variables is allowed. -""" - zh: """ -转发到远程broker的哪个topic。
-允许使用带有变量的模板。 -""" + en: """Forward to which topic of the remote broker.
+Template with variables is allowed.""" + zh: """转发到远程broker的哪个topic。
+允许使用带有变量的模板。""" } label: { en: "Remote Topic" @@ -277,14 +253,10 @@ Template with variables is allowed. egress_remote_qos { desc { - en: """ -The QoS of the MQTT message to be sent.
-Template with variables is allowed. -""" - zh: """ -待发送 MQTT 消息的 QoS。
-允许使用带有变量的模板。 -""" + en: """The QoS of the MQTT message to be sent.
+Template with variables is allowed.""" + zh: """待发送 MQTT 消息的 QoS。
+允许使用带有变量的模板。""" } label: { en: "Remote QoS" @@ -294,14 +266,10 @@ Template with variables is allowed. retain { desc { - en: """ -The 'retain' flag of the MQTT message to be sent.
-Template with variables is allowed. -""" - zh: """ -要发送的 MQTT 消息的“保留”标志。
-允许使用带有变量的模板。 -""" + en: """The 'retain' flag of the MQTT message to be sent.
+Template with variables is allowed.""" + zh: """要发送的 MQTT 消息的“保留”标志。
+允许使用带有变量的模板。""" } label: { en: "Retain Flag" @@ -311,14 +279,10 @@ Template with variables is allowed. payload { desc { - en: """ -The payload of the MQTT message to be sent.
-Template with variables is allowed. -""" - zh: """ -要发送的 MQTT 消息的负载。
-允许使用带有变量的模板。 -""" + en: """The payload of the MQTT message to be sent.
+Template with variables is allowed.""" + zh: """要发送的 MQTT 消息的负载。
+允许使用带有变量的模板。""" } label: { en: "Payload" @@ -327,15 +291,15 @@ Template with variables is allowed. } server_configs { - desc { - en: """Configs related to the server.""" - zh: """服务器相关的配置。""" - } - label: { - en: "Server Configs" - zh: "服务配置。" - } - } + desc { + en: """Configs related to the server.""" + zh: """服务器相关的配置。""" + } + label: { + en: "Server Configs" + zh: "服务配置。" + } + } clientid_prefix { desc { diff --git a/apps/emqx_connector/i18n/emqx_connector_mysql.conf b/apps/emqx_connector/i18n/emqx_connector_mysql.conf index 499caae12..89e95534b 100644 --- a/apps/emqx_connector/i18n/emqx_connector_mysql.conf +++ b/apps/emqx_connector/i18n/emqx_connector_mysql.conf @@ -2,16 +2,12 @@ emqx_connector_mysql { server { desc { - en: """ -The IPv4 or IPv6 address or the hostname to connect to.
+ en: """The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`.
-The MySQL default port 3306 is used if `[:Port]` is not specified. -""" - zh: """ -将要连接的 IPv4 或 IPv6 地址,或者主机名。
+The MySQL default port 3306 is used if `[:Port]` is not specified.""" + zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。
主机名具有以下形式:`Host[:Port]`。
-如果未指定 `[:Port]`,则使用 MySQL 默认端口 3306。 -""" +如果未指定 `[:Port]`,则使用 MySQL 默认端口 3306。""" } label: { en: "Server Host" diff --git a/apps/emqx_connector/i18n/emqx_connector_pgsql.conf b/apps/emqx_connector/i18n/emqx_connector_pgsql.conf index 6aa792070..33246c844 100644 --- a/apps/emqx_connector/i18n/emqx_connector_pgsql.conf +++ b/apps/emqx_connector/i18n/emqx_connector_pgsql.conf @@ -2,16 +2,12 @@ emqx_connector_pgsql { server { desc { - en: """ -The IPv4 or IPv6 address or the hostname to connect to.
+ en: """The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`.
-The PostgreSQL default port 5432 is used if `[:Port]` is not specified. -""" - zh: """ -将要连接的 IPv4 或 IPv6 地址,或者主机名。
+The PostgreSQL default port 5432 is used if `[:Port]` is not specified.""" + zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。
主机名具有以下形式:`Host[:Port]`。
-如果未指定 `[:Port]`,则使用 PostgreSQL 默认端口 5432。 -""" +如果未指定 `[:Port]`,则使用 PostgreSQL 默认端口 5432。""" } label: { en: "Server Host" diff --git a/apps/emqx_connector/i18n/emqx_connector_redis.conf b/apps/emqx_connector/i18n/emqx_connector_redis.conf index e42e73498..5915725a2 100644 --- a/apps/emqx_connector/i18n/emqx_connector_redis.conf +++ b/apps/emqx_connector/i18n/emqx_connector_redis.conf @@ -46,16 +46,12 @@ emqx_connector_redis { server { desc { - en: """ -The IPv4 or IPv6 address or the hostname to connect to.
+ en: """The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`.
-The Redis default port 6379 is used if `[:Port]` is not specified. -""" - zh: """ -将要连接的 IPv4 或 IPv6 地址,或者主机名。
+The Redis default port 6379 is used if `[:Port]` is not specified.""" + zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。
主机名具有以下形式:`Host[:Port]`。
-如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。 -""" +如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。""" } label: { en: "Server Host" @@ -65,19 +61,14 @@ The Redis default port 6379 is used if `[:Port]` is not specified. servers { desc { - en: """ -A Node list for Cluster to connect to. The nodes should be separated with commas, such as: `Node[,Node].` + en: """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. A host entry has the following form: `Host[:Port]`. -The Redis default port 6379 is used if `[:Port]` is not specified. -""" - zh: """ - -集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].` +The Redis default port 6379 is used if `[:Port]` is not specified.""" + zh: """集群将要连接的节点列表。 节点之间用逗号分隔,如:`Node[,Node].` 每个节点的配置为:将要连接的 IPv4 或 IPv6 地址或主机名。 主机名具有以下形式:`Host[:Port]`。 -如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。 -""" +如果未指定 `[:Port]`,则使用 Redis 默认端口 6379。""" } label: { en: "Servers" diff --git a/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf b/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf index 0b2a3026f..f81816e63 100644 --- a/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf +++ b/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf @@ -10,8 +10,7 @@ Alternatively, the HTTP listener can specify a unique IP address for each listen but use the same port.""" zh: """Dashboard 监听器设置。监听器必须有唯一的端口号和IP地址的组合。 例如,可以通过指定IP地址 0.0.0.0 来监听机器上给定端口上的所有配置的IP地址。 -或者,可以为每个监听器指定唯一的IP地址,但使用相同的端口。 -""" +或者,可以为每个监听器指定唯一的IP地址,但使用相同的端口。""" } label { 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. 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 -and change to a complex password as prompted. -""" +and change to a complex password as prompted.""" zh: """Dashboard 的默认密码,为了安全,应该尽快修改密码。 当通过网页首次登录 Dashboard 并按提示修改成复杂密码后,此值就会失效。""" } diff --git a/apps/emqx_exhook/i18n/emqx_exhook_api_i18n.conf b/apps/emqx_exhook/i18n/emqx_exhook_api_i18n.conf index 492c2c4ec..46854a3db 100644 --- a/apps/emqx_exhook/i18n/emqx_exhook_api_i18n.conf +++ b/apps/emqx_exhook/i18n/emqx_exhook_api_i18n.conf @@ -130,18 +130,17 @@ NOTE: The position should be \"front | rear | before:{name} | after:{name}""" status { desc { - en: """The status of Exhook server. -connected: connection succeeded -connecting: connection failed, reconnecting -disconnected: failed to connect and didn't reconnect -disabled: this server is disabled -error: failed to view the status of this server -""" - zh: """Exhook 服务器的状态。 -connected: 连接成功 -connecting: 连接失败,重连中 -disconnected: 连接失败,且未设置自动重连 -disabled: 该服务器未开启 + en: """The status of Exhook server.
+connected: connection succeeded
+connecting: connection failed, reconnecting
+disconnected: failed to connect and didn't reconnect
+disabled: this server is disabled
+error: failed to view the status of this server""" + zh: """Exhook 服务器的状态。
+connected: 连接成功
+connecting: 连接失败,重连中
+disconnected: 连接失败,且未设置自动重连
+disabled: 该服务器未开启
error: 查看该服务器状态时发生错误""" } } diff --git a/apps/emqx_gateway/i18n/emqx_gateway_api_i18n.conf b/apps/emqx_gateway/i18n/emqx_gateway_api_i18n.conf index 197e6a5ed..ab30a9c22 100644 --- a/apps/emqx_gateway/i18n/emqx_gateway_api_i18n.conf +++ b/apps/emqx_gateway/i18n/emqx_gateway_api_i18n.conf @@ -33,7 +33,7 @@ including current running status, number of connections, listener status, etc."" update_gateway { desc { en: """Update the gateway basic configurations and running status.
-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: """更新指定网关的基础配置、和启用的状态。
注:认证、和监听器的配置更新需参考对应的 API 接口。""" } @@ -49,11 +49,9 @@ Note: The Authentication and Listener configurations should be updated by other gateway_name_in_qs { desc { en: """Gateway Name.
-It's enum with `stomp`, `mqttsn`, `coap`, `lwm2m`, `exproto` -""" +It's enum with `stomp`, `mqttsn`, `coap`, `lwm2m`, `exproto`""" zh: """网关名称.
-可取值为 `stomp`、`mqttsn`、`coap`、`lwm2m`、`exproto` -""" +可取值为 `stomp`、`mqttsn`、`coap`、`lwm2m`、`exproto`""" } } diff --git a/apps/emqx_gateway/i18n/emqx_gateway_api_listeners_i18n.conf b/apps/emqx_gateway/i18n/emqx_gateway_api_listeners_i18n.conf index dc14a7e01..9319bb3e5 100644 --- a/apps/emqx_gateway/i18n/emqx_gateway_api_listeners_i18n.conf +++ b/apps/emqx_gateway/i18n/emqx_gateway_api_listeners_i18n.conf @@ -118,7 +118,7 @@ When authenticator is enabled for a listener, all clients connecting to that lis listener_status { desc { - en: """listener status """ + en: """listener status""" zh: """监听器状态""" } } diff --git a/apps/emqx_gateway/i18n/emqx_gateway_schema_i18n.conf b/apps/emqx_gateway/i18n/emqx_gateway_schema_i18n.conf index a05fec5c4..74a70eb73 100644 --- a/apps/emqx_gateway/i18n/emqx_gateway_schema_i18n.conf +++ b/apps/emqx_gateway/i18n/emqx_gateway_schema_i18n.conf @@ -49,7 +49,7 @@ When the broadcast option is enabled, the gateway will broadcast AD mqttsn_broadcast { desc { 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 { desc { 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 { desc { 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: - - non: Non-confirmable; - - con: Confirmable; - - qos: Mapping from QoS type of received message, QoS0 -> non, QoS1,2 -> con -""" - zh: """投递给 CoAP 客户端的通知消息类型。当客户端 Observe 一个资源(或订阅某个主题)时,网关会向客户端推送新产生的消息。其消息类型可设置为: - - non: 不需要客户端返回确认消息; - - con: 需要客户端返回一个确认消息; - - qos: 取决于消息的 QoS 等级; QoS 0 会以 `non` 类型下发,QoS 1/2 会以 `con` 类型下发 -""" +The type of delivered coap message can be set to:
+ - non: Non-confirmable;
+ - con: Confirmable;
+ - qos: Mapping from QoS type of received message, QoS0 -> non, QoS1,2 -> con""" + zh: """投递给 CoAP 客户端的通知消息类型。当客户端 Observe 一个资源(或订阅某个主题)时,网关会向客户端推送新产生的消息。其消息类型可设置为:
+ - non: 不需要客户端返回确认消息;
+ - con: 需要客户端返回一个确认消息;
+ - qos: 取决于消息的 QoS 等级; QoS 0 会以 `non` 类型下发,QoS 1/2 会以 `con` 类型下发""" } } coap_subscribe_qos { desc { 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: - - qos0, qos1, qos2: Fixed default QoS level - - coap: Dynamic QoS level by the message type of subscribe request - * qos0: If the subscribe request is non-confirmable - * qos1: If the subscribe request is confirmable -""" +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:
+ - qos0, qos1, qos2: Fixed default QoS level
+ - coap: Dynamic QoS level by the message type of subscribe request
+ * qos0: If the subscribe request is non-confirmable
+ * qos1: If the subscribe request is confirmable""" + zh: """客户端订阅请求的默认 QoS 等级。 -当 CoAP 客户端发起订阅请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为: - - qos0、 qos1、qos2: 设置为固定的 QoS 等级 - - coap: 依据订阅操作的 CoAP 报文类型来动态决定 - * 当订阅请求为 `non-confirmable` 类型时,取值为 qos0 - * 当订阅请求为 `confirmable` 类型时,取值为 qos1 -""" +当 CoAP 客户端发起订阅请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为:
+ - qos0、 qos1、qos2: 设置为固定的 QoS 等级
+ - coap: 依据订阅操作的 CoAP 报文类型来动态决定
+ * 当订阅请求为 `non-confirmable` 类型时,取值为 qos0
+ * 当订阅请求为 `confirmable` 类型时,取值为 qos1""" } } coap_publish_qos { desc { 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: - - qos0, qos1, qos2: Fixed default QoS level - - coap: Dynamic QoS level by the message type of publish request - * qos0: If the publish request is non-confirmable +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:
+ - qos0, qos1, qos2: Fixed default QoS level
+ - coap: Dynamic QoS level by the message type of publish request
+ * qos0: If the publish request is non-confirmable
* qos1: If the publish request is confirmable""" zh: """客户端发布请求的默认 QoS 等级。 -当 CoAP 客户端发起发布请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为: - - qos0、qos1、qos2: 设置为固定的 QoS 等级 - - coap: 依据发布操作的 CoAP 报文类型来动态决定 - * 当发布请求为 `non-confirmable` 类型时,取值为 qos0 - * 当发布请求为 `confirmable` 类型时,取值为 qos1 - """ +当 CoAP 客户端发起发布请求时,如果未携带 `qos` 参数则会使用该默认值。默认值可设置为:
+ - qos0、qos1、qos2: 设置为固定的 QoS 等级
+ - coap: 依据发布操作的 CoAP 报文类型来动态决定
+ * 当发布请求为 `non-confirmable` 类型时,取值为 qos0
+ * 当发布请求为 `confirmable` 类型时,取值为 qos1""" } } @@ -220,14 +216,12 @@ For example, after receiving an update message from a client, any messages withi lwm2m_update_msg_publish_condition { desc { - en: """Policy for publishing UPDATE event message. - - always: send update events as long as the UPDATE request is received. - - contains_object_list: send update events only if the UPDATE request carries any Object List -""" - zh: """发布UPDATE事件消息的策略。 - - always: 只要收到 UPDATE 请求,就发送更新事件。 - - contains_object_list: 仅当 UPDATE 请求携带 Object 列表时才发送更新事件。 -""" + en: """Policy for publishing UPDATE event message.
+ - always: send update events as long as the UPDATE request is received.
+ - contains_object_list: send update events only if the UPDATE request carries any Object List""" + zh: """发布UPDATE事件消息的策略。
+ - always: 只要收到 UPDATE 请求,就发送更新事件。
+ - 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 { desc { - en: """ """ - zh: """ """ + en: """""" + zh: """""" } } @@ -439,8 +433,8 @@ After succeed observe a resource of LwM2M client, Gateway will send the notify e tcp_listener { desc { - en: """ """ - zh: """ """ + en: """""" + zh: """""" } } @@ -476,8 +470,8 @@ EMQX will close the TCP connection if proxy protocol packet is not received with ssl_listener { desc { - en: """ """ - zh: """ """ + en: """""" + zh: """""" } } @@ -490,8 +484,8 @@ EMQX will close the TCP connection if proxy protocol packet is not received with udp_listener { desc { - en: """ """ - zh: """ """ + en: """""" + zh: """""" } } @@ -541,8 +535,8 @@ See: https://erlang.org/doc/man/inet.html#setopts-2""" dtls_listener { desc { - en: """ """ - zh: """ """ + en: """""" + zh: """""" } } @@ -601,19 +595,25 @@ When set to false clients will be allowed to connect without authen gateway_common_listener_mountpoint { desc { 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. -For example if a client A subscribes to `t` with `listeners.tcp.\.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. -Variables in mountpoint string: - - ${clientid}: clientid - - ${username}: username -""" +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. +For example if a client A subscribes to `t` with `listeners.tcp.\.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. +Variables in mountpoint string:
+ - ${clientid}: clientid
+ - ${username}: username""" zh: """发布或订阅时,在所有主题前增加前缀字符串。 当消息投递给订阅者时,前缀字符串将从主题名称中删除。挂载点是用户可以用来实现不同监听器之间的消息路由隔离的一种方式。 -例如,如果客户端 A 在 `listeners.tcp.\.mountpoint` 设置为 `some_tenant` 的情况下订阅 `t`,则客户端实际上订阅了 `some_tenant/t` 主题。 类似地,如果另一个客户端 B(连接到与客户端 A 相同的侦听器)向主题 `t` 发送消息,则该消息被路由到所有订阅了 `some_tenant/t` 的客户端,因此客户端 A 将收到该消息,带有 主题名称`t`。 设置为 `\"\"` 以禁用该功能。 -挂载点字符串中可用的变量: - - ${clientid}:clientid - - ${username}:用户名 -""" +例如,如果客户端 A 在 `listeners.tcp.\.mountpoint` 设置为 `some_tenant` 的情况下订阅 `t`, +则客户端实际上订阅了 `some_tenant/t` 主题。 +类似地,如果另一个客户端 B(连接到与客户端 A 相同的侦听器)向主题 `t` 发送消息, +则该消息被路由到所有订阅了 `some_tenant/t` 的客户端,因此客户端 A 将收到该消息,带有 主题名称`t`。 设置为 `\"\"` 以禁用该功能。 +挂载点字符串中可用的变量:
+ - ${clientid}:clientid
+ - ${username}:用户名""" } } diff --git a/apps/emqx_management/i18n/emqx_mgmt_api_key_i18n.conf b/apps/emqx_management/i18n/emqx_mgmt_api_key_i18n.conf index eae559660..f96c5c11b 100644 --- a/apps/emqx_management/i18n/emqx_mgmt_api_key_i18n.conf +++ b/apps/emqx_management/i18n/emqx_mgmt_api_key_i18n.conf @@ -16,14 +16,13 @@ emqx_mgmt_api_key_schema { ``` 7e729ae70d23144b:2QILI9AcQ9BYlVqLDHQNWN2saIjBV4egr1CZneTNKr9CpK ec3907f865805db0:Ee3taYltUKtoBVD9C3XjQl9C6NXheip8Z9B69BpUv5JxVHL - ``` -""" + ```""" + zh: """用于在启动 emqx 时,添加 API 密钥,其格式为: ``` 7e729ae70d23144b:2QILI9AcQ9BYlVqLDHQNWN2saIjBV4egr1CZneTNKr9CpK ec3907f865805db0:Ee3taYltUKtoBVD9C3XjQl9C6NXheip8Z9B69BpUv5JxVHL - ``` -""" + ```""" } label { en: "Initialize api_key file." diff --git a/apps/emqx_management/i18n/emqx_mgmt_api_publish_i18n.conf b/apps/emqx_management/i18n/emqx_mgmt_api_publish_i18n.conf index 4ba7e8dba..4123ceefd 100644 --- a/apps/emqx_management/i18n/emqx_mgmt_api_publish_i18n.conf +++ b/apps/emqx_management/i18n/emqx_mgmt_api_publish_i18n.conf @@ -2,28 +2,24 @@ emqx_mgmt_api_publish { publish_api { desc { - en: """ -Publish one message.
+ en: """Publish one message.
Possible HTTP status response codes are:
200: The message is delivered to at least one subscriber;
202: No matched subscribers;
400: Message is invalid. for example bad topic name, or QoS is out of range;
-503: Failed to deliver the message to subscriber(s);
-""" - zh: """ -发布一个消息。
+503: Failed to deliver the message to subscriber(s)""" + + zh: """发布一个消息。
可能的 HTTP 状态码如下:
200: 消息被成功发送到至少一个订阅。
202: 没有匹配到任何订阅。
400: 消息编码错误,如非法主题,或 QoS 超出范围等。
-503: 服务重启等过程中导致转发失败。

-""" +503: 服务重启等过程中导致转发失败。""" } } publish_bulk_api { desc { - en: """ -Publish a batch of messages.
+ en: """Publish a batch of messages.
Possible HTTP response status code are:
200: All messages are delivered to at least one subscriber;
202: At least one message was not delivered to any subscriber;
@@ -33,10 +29,8 @@ Possible HTTP response status code are:
In case there is at lest one invalid message in the batch, the HTTP response body is the same as for /publish API.
Otherwise the HTTP response body is an array of JSON objects indicating the publish -result of each individual message in the batch. -""" - zh: """ -批量发布一组消息。
+result of each individual message in the batch.""" + zh: """批量发布一组消息。
可能的 HTTP 状态码如下:
200: 所有的消息都被成功发送到至少一个订阅。
202: 至少有一个消息没有匹配到任何订阅。
@@ -45,9 +39,7 @@ result of each individual message in the batch. 请求的 Body 或者 Body 中包含的某个消息无法通过 API 规范的类型检查时,HTTP 响应的消息与发布单个消息的 API /publish 是一样的。 -如果所有的消息都是合法的,那么 HTTP 返回的内容是一个 JSON 数组,每个元素代表了该消息转发的状态。 - -""" +如果所有的消息都是合法的,那么 HTTP 返回的内容是一个 JSON 数组,每个元素代表了该消息转发的状态。""" } } @@ -89,8 +81,7 @@ result of each individual message in the batch. } reason_code { desc { - en: """ -The MQTT reason code, as the same ones used in PUBACK packet.
+ en: """The MQTT reason code, as the same ones used in PUBACK packet.
Currently supported codes are:
16(0x10): No matching subscribers;
@@ -98,18 +89,15 @@ Currently supported codes are:
144(0x90): Topic name invalid;
151(0x97): Publish rate limited, or message size exceeded limit. The global size limit can be configured with mqtt.max_packet_size
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. -""" - zh: """ -MQTT 消息发布的错误码,这些错误码也是 MQTT 规范中 PUBACK 消息可能携带的错误码。
+might be slightly over the limit.""" + zh: """MQTT 消息发布的错误码,这些错误码也是 MQTT 规范中 PUBACK 消息可能携带的错误码。
当前支持如下错误码:
16(0x10):没能匹配到任何订阅;
131(0x81):消息转发时发生错误,例如 EMQX 服务重启;
144(0x90):主题名称非法;
151(0x97):受到了速率限制,或者消息尺寸过大。全局消息大小限制可以通过配置项 mqtt.max_packet_size 来进行修改。
-注意:消息尺寸的是通过主题和消息体的字节数进行估算的。具体发布时所占用的字节数可能会稍大于这个估算的值。 -""" +注意:消息尺寸的是通过主题和消息体的字节数进行估算的。具体发布时所占用的字节数可能会稍大于这个估算的值。""" } } error_message { @@ -127,9 +115,7 @@ MQTT 消息发布的错误码,这些错误码也是 MQTT 规范中 PUBACK 消 msg_payload_format_indicator { desc { 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 的标准要求进行编码的。" } } diff --git a/apps/emqx_plugins/i18n/emqx_plugins_schema.conf b/apps/emqx_plugins/i18n/emqx_plugins_schema.conf index 454d36f6f..c3fed1884 100644 --- a/apps/emqx_plugins/i18n/emqx_plugins_schema.conf +++ b/apps/emqx_plugins/i18n/emqx_plugins_schema.conf @@ -1,17 +1,14 @@ emqx_plugins_schema { plugins { desc { - en: """ -Manage EMQX plugins.
+ en: """Manage EMQX plugins.
Plugins can be pre-built as a part of EMQX package, or installed as a standalone package in a location specified by install_dir config key
-The standalone-installed plugins are referred to as 'external' plugins. -""" +The standalone-installed plugins are referred to as 'external' plugins.""" zh: """管理EMQX插件。
插件可以是EMQX安装包中的一部分,也可以是一个独立的安装包。
-独立安装的插件称为“外部插件”。 - """ +独立安装的插件称为“外部插件”。""" } label { en: "Plugins" @@ -32,8 +29,7 @@ The standalone-installed plugins are referred to as 'external' plugins. desc { en: """The {name}-{version} of the plugin.
It should match the plugin application name-version as the for the plugin release package name
-For example: my_plugin-0.1.0. -""" +For example: my_plugin-0.1.0.""" zh: """插件的名称{name}-{version}。
它应该与插件的发布包名称一致,如my_plugin-0.1.0。""" } @@ -65,14 +61,12 @@ The plugins are started in the defined order""" } install_dir { desc { - en: """ -The installation directory for the external plugins. + en: """The installation directory for the external plugins. The plugin beam files and configuration files should reside in the subdirectory named as emqx_foo_bar-0.1.0.
NOTE: For security reasons, this directory should **NOT** be writable -by anyone except emqx (or any user which runs EMQX). -""" +by anyone except emqx (or any user which runs EMQX).""" zh: "插件安装包的目录,出于安全考虑,该目录应该值允许 emqx,或用于运行 EMQX 服务的用户拥有写入权限。" } label { @@ -83,11 +77,9 @@ by anyone except emqx (or any user which runs EMQX). check_interval { desc { en: """Check interval: check if the status of the plugins in the cluster is consistent,
-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: """检查间隔:检查集群中插件的状态是否一致,
-如果连续3次检查结果不一致,则报警。 -""" +如果连续3次检查结果不一致,则报警。""" } } } diff --git a/apps/emqx_prometheus/i18n/emqx_prometheus_schema_i18n.conf b/apps/emqx_prometheus/i18n/emqx_prometheus_schema_i18n.conf index f25e35219..e9a0fc11e 100644 --- a/apps/emqx_prometheus/i18n/emqx_prometheus_schema_i18n.conf +++ b/apps/emqx_prometheus/i18n/emqx_prometheus_schema_i18n.conf @@ -40,15 +40,11 @@ For example, { Authorization = "some-authz-tokens"}""" - ${name}: Name of EMQX node.
- ${host}: Host name of EMQX node.
For example, when the EMQX node name is emqx@127.0.0.1 then the name variable takes value emqx and the host variable takes value 127.0.0.1.
- -Default value is: ${name}/instance/${name}~${host} -""" +Default value is: ${name}/instance/${name}~${host}""" zh: """推送到 Push Gateway 的 Job 名称。可用变量为:
- ${name}: EMQX 节点的名称。 - ${host}: EMQX 节点主机名。 - 例如,当 EMQX 节点名为 emqx@127.0.0.1 则 name 变量的值为 emqx,host 变量的值为 127.0.0.1
- 默认值为: ${name}/instance/${name}~${host}""" } } diff --git a/apps/emqx_psk/i18n/emqx_psk_i18n.conf b/apps/emqx_psk/i18n/emqx_psk_i18n.conf index 6bba9c6d5..60d45977a 100644 --- a/apps/emqx_psk/i18n/emqx_psk_i18n.conf +++ b/apps/emqx_psk/i18n/emqx_psk_i18n.conf @@ -10,8 +10,7 @@ configured, such as RSA-PSK-AES256-GCM-SHA384. See listener SSL options config for more details. -The IDs and secrets can be provided from a file which is configurable by the init_file field. -""" +The IDs and secrets can be provided from a file which is configurable by the init_file field.""" zh: """此配置用于启用 TLS-PSK 身份验证。 PSK 是 “Pre-Shared-Keys” 的缩写。 diff --git a/apps/emqx_retainer/i18n/emqx_retainer_i18n.conf b/apps/emqx_retainer/i18n/emqx_retainer_i18n.conf index 1808f3fe7..274c260d4 100644 --- a/apps/emqx_retainer/i18n/emqx_retainer_i18n.conf +++ b/apps/emqx_retainer/i18n/emqx_retainer_i18n.conf @@ -24,8 +24,7 @@ emqx_retainer_schema { msg_clear_interval { desc { en: """Periodic interval for cleaning up expired messages. -Never clear if the value is 0. - """ +Never clear if the value is 0.""" zh: "消息清理间隔。0 代表不进行清理" } } @@ -99,8 +98,7 @@ If this field is empty, limiter is not used.""" zh: """批量发送的限流器的名称。 限流器可以用来防止短时间内向客户端发送太多的消息,从而避免过多的消息导致客户端队列堵塞甚至崩溃。 这个名称需要是指向 `limiter.batch` 下的一个真实存在的限流器。 -如果这个字段为空,则不使用限流器。 - """ +如果这个字段为空,则不使用限流器。""" } } diff --git a/apps/emqx_rule_engine/i18n/emqx_rule_api_schema.conf b/apps/emqx_rule_engine/i18n/emqx_rule_api_schema.conf index 88a5313ad..e4c2314de 100644 --- a/apps/emqx_rule_engine/i18n/emqx_rule_api_schema.conf +++ b/apps/emqx_rule_engine/i18n/emqx_rule_api_schema.conf @@ -344,11 +344,11 @@ emqx_rule_api_schema { rule_id { desc { en: "The ID of the rule" - zh: "规则的 ID " + zh: "规则的 ID" } label: { en: "Rule ID" - zh: "规则 ID " + zh: "规则 ID" } } diff --git a/apps/emqx_rule_engine/i18n/emqx_rule_engine_schema.conf b/apps/emqx_rule_engine/i18n/emqx_rule_engine_schema.conf index bc5735c67..ca0a73f0f 100644 --- a/apps/emqx_rule_engine/i18n/emqx_rule_engine_schema.conf +++ b/apps/emqx_rule_engine/i18n/emqx_rule_engine_schema.conf @@ -13,14 +13,10 @@ emqx_rule_engine_schema { rules_sql { desc { - en: """ -SQL query to transform the messages. -Example: SELECT * FROM "test/topic" WHERE payload.x = 1 -""" - zh: """ -用于处理消息的 SQL 。 -示例:SELECT * FROM "test/topic" WHERE payload.x = 1 -""" + en: """SQL query to transform the messages. +Example: SELECT * FROM "test/topic" WHERE payload.x = 1""" + zh: """用于处理消息的 SQL 。 +示例:SELECT * FROM "test/topic" WHERE payload.x = 1""" } label: { en: "Rule SQL" @@ -30,8 +26,7 @@ Example: SELECT * FROM "test/topic" WHERE payload.x = 1 rules_actions { desc { - en: """ -A list of actions of the rule. + en: """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 that refers to a function. 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 original order. 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. -""" - zh: """ -规则的动作列表。 +counter of the function action or the bridge channel will increase.""" + + zh: """规则的动作列表。 动作可以是指向 EMQX bridge 的引用,也可以是一个指向函数的对象。 我们支持一些内置函数,如“republish”和“console”,我们还支持用户提供的函数,它的格式为:“{module}:{function}”。 列表中的动作按顺序执行。这意味着如果其中一个动作执行缓慢,则以下所有动作都不会被执行直到它返回。 如果其中一个动作崩溃,在它之后的所有动作仍然会被按照原始顺序执行。 -如果运行动作时出现任何错误,则会出现错误消息,并且相应的计数器会增加。 -""" +如果运行动作时出现任何错误,则会出现错误消息,并且相应的计数器会增加。""" } label: { en: "Rule Action List" @@ -116,19 +109,16 @@ counter of the function action or the bridge channel will increase. user_provided_function_function { desc { - en: """ -The user provided function. Should be in the format: '{module}:{function}'. + en: """The user provided function. Should be in the format: '{module}:{function}'. Where {module} is the Erlang callback module and {function} is the Erlang function. To write your own function, checkout the function console and republish in the source file: -apps/emqx_rule_engine/src/emqx_rule_actions.erl as an example. -""" - zh: """ -用户提供的函数。 格式应为:'{module}:{function}'。 +apps/emqx_rule_engine/src/emqx_rule_actions.erl as an example.""" + + zh: """用户提供的函数。 格式应为:'{module}:{function}'。 其中 {module} 是 Erlang 回调模块, {function} 是 Erlang 函数。 -要编写自己的函数,请检查源文件:apps/emqx_rule_engine/src/emqx_rule_actions.erl 中的示例函数 consolerepublish 。 -""" +要编写自己的函数,请检查源文件:apps/emqx_rule_engine/src/emqx_rule_actions.erl 中的示例函数 consolerepublish 。""" } label: { en: "User Provided Function" @@ -138,15 +128,11 @@ To write your own function, checkout the function console and user_provided_function_args { desc { - en: """ -The args will be passed as the 3rd argument to module:function/3, + en: """The args will be passed as the 3rd argument to module:function/3, checkout the function console and republish in the source file: -apps/emqx_rule_engine/src/emqx_rule_actions.erl as an example. -""" - zh: """ -用户提供的参数将作为函数 module:function/3 的第三个参数, -请检查源文件:apps/emqx_rule_engine/src/emqx_rule_actions.erl 中的示例函数 consolerepublish 。 -""" +apps/emqx_rule_engine/src/emqx_rule_actions.erl as an example.""" + zh: """用户提供的参数将作为函数 module:function/3 的第三个参数, +请检查源文件:apps/emqx_rule_engine/src/emqx_rule_actions.erl 中的示例函数 consolerepublish 。""" } label: { en: "User Provided Function Args" @@ -156,14 +142,10 @@ checkout the function console and republish in the sou republish_args_topic { desc { - en: """ -The target topic of message to be re-published. -Template with variables is allowed, see description of the 'republish_args'. -""" - zh: """ -重新发布消息的目标主题。 -允许使用带有变量的模板,请参阅“republish_args”的描述。 -""" + en: """The target topic of message to be re-published. +Template with variables is allowed, see description of the 'republish_args'.""" + zh: """重新发布消息的目标主题。 +允许使用带有变量的模板,请参阅“republish_args”的描述。""" } label: { en: "Target Topic" @@ -173,16 +155,12 @@ Template with variables is allowed, see description of the 'republish_args'. republish_args_qos { desc { - en: """ -The qos of the message to be re-published. + en: """The qos of the message to be re-published. 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, -0 is used. -""" - zh: """ -要重新发布的消息的 qos。允许使用带有变量的模板,请参阅“republish_args”的描述。 -默认为 ${qos}。 如果从规则的选择结果中没有找到变量 ${qos},则使用 0。 -""" +0 is used.""" + zh: """要重新发布的消息的 qos。允许使用带有变量的模板,请参阅“republish_args”的描述。 +默认为 ${qos}。 如果从规则的选择结果中没有找到变量 ${qos},则使用 0。""" } label: { en: "Message QoS" @@ -192,16 +170,12 @@ Defaults to ${qos}. If variable ${qos} is not found from the selected result of republish_args_retain { desc { - en: """ -The 'retain' flag of the message to be re-published. + en: """The 'retain' flag of the message to be re-published. Template with variables is allowed, see description of the 'republish_args'. Defaults to ${retain}. If variable ${retain} is not found from the selected result -of the rule, false is used. -""" - zh: """ -要重新发布的消息的“保留”标志。允许使用带有变量的模板,请参阅“republish_args”的描述。 -默认为 ${retain}。 如果从所选结果中未找到变量 ${retain},则使用 false。 -""" +of the rule, false is used.""" + zh: """要重新发布的消息的“保留”标志。允许使用带有变量的模板,请参阅“republish_args”的描述。 +默认为 ${retain}。 如果从所选结果中未找到变量 ${retain},则使用 false。""" } label: { en: "Retain Flag" @@ -211,16 +185,12 @@ of the rule, false is used. republish_args_payload { desc { - en: """ -The payload of the message to be re-published. + en: """The payload of the message to be re-published. Template with variables is allowed, see description of the 'republish_args'. Defaults to ${payload}. If variable ${payload} is not found from the selected result -of the rule, then the string "undefined" is used. -""" - zh: """ -要重新发布的消息的有效负载。允许使用带有变量的模板,请参阅“republish_args”的描述。 -默认为 ${payload}。 如果从所选结果中未找到变量 ${payload},则使用字符串 "undefined"。 -""" +of the rule, then the string "undefined" is used.""" + zh: """要重新发布的消息的有效负载。允许使用带有变量的模板,请参阅“republish_args”的描述。 +默认为 ${payload}。 如果从所选结果中未找到变量 ${payload},则使用字符串 "undefined"。""" } label: { en: "Message Payload" @@ -229,8 +199,7 @@ of the rule, then the string "undefined" is used. } republish_args_user_properties { desc { - en: """ -From which variable should the MQTT message's User-Property pairs be taken from. + en: """From which variable should the MQTT message's User-Property pairs be taken from. The value must be a map. You may configure it to ${pub_props.'User-Property'} or use SELECT *,pub_props.'User-Property' as user_properties @@ -238,17 +207,15 @@ to forward the original user properties to the republished message. You may also call map_put function like map_put('my-prop-name', 'my-prop-value', user_properties) as user_properties to inject user properties. -NOTE: MQTT spec allows duplicated user property names, but EMQX Rule-Engine does not. -""" - zh: """ -指定使用哪个变量来填充 MQTT 消息的 User-Property 列表。这个变量的值必须是一个 map 类型。 +NOTE: MQTT spec allows duplicated user property names, but EMQX Rule-Engine does not.""" + + zh: """指定使用哪个变量来填充 MQTT 消息的 User-Property 列表。这个变量的值必须是一个 map 类型。 可以设置成 ${pub_props.'User-Property'} 或者 使用 SELECT *,pub_props.'User-Property' as user_properties 来把源 MQTT 消息 的 User-Property 列表用于填充。 也可以使用 map_put 函数来添加新的 User-Property, map_put('my-prop-name', 'my-prop-value', user_properties) as user_properties -注意:MQTT 协议允许一个消息中出现多次同一个 property 名,但是 EMQX 的规则引擎不允许。 -""" +注意:MQTT 协议允许一个消息中出现多次同一个 property 名,但是 EMQX 的规则引擎不允许。""" } } @@ -370,8 +337,7 @@ Then there are 3 variables available: clientid, qos an 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`, payload = `msg: hello`, and `qos = 1`.""" - zh: """ -内置 'republish' 动作的参数。 + zh: """内置 'republish' 动作的参数。 可以在参数中使用变量。 变量是规则中选择的字段。 例如规则 SQL 定义如下: diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_gcp_pubsub.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_gcp_pubsub.conf index dd7ce49ec..af2a93f82 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_gcp_pubsub.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_gcp_pubsub.conf @@ -103,11 +103,9 @@ emqx_ee_bridge_gcp_pubsub { matching `local_topic` will be forwarded.
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 -will be forwarded. -""" +will be forwarded.""" zh: """发送到 'local_topic' 的消息都会转发到 GCP PubSub。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 GCP PubSub。 -""" +注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 GCP PubSub。""" } label { en: "Local Topic" diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_hstreamdb.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_hstreamdb.conf index dd3346579..dce40aa85 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_hstreamdb.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_hstreamdb.conf @@ -1,17 +1,13 @@ emqx_ee_bridge_hstreamdb { local_topic { desc { - en: """ -The MQTT topic filter to be forwarded to the HStreamDB. All MQTT 'PUBLISH' messages with the topic + en: """The MQTT topic filter to be forwarded to the HStreamDB. All MQTT 'PUBLISH' messages with the topic matching the local_topic will be forwarded.
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 -will be forwarded. -""" - zh: """ -发送到 'local_topic' 的消息都会转发到 HStreamDB。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HStreamDB。 -""" +will be forwarded.""" + zh: """发送到 'local_topic' 的消息都会转发到 HStreamDB。
+注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 HStreamDB。""" } label { en: "Local Topic" diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_influxdb.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_influxdb.conf index b2c3c5a73..8b2eadcfa 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_influxdb.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_influxdb.conf @@ -5,11 +5,9 @@ emqx_ee_bridge_influxdb { matching the local_topic will be forwarded.
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 -will be forwarded. -""" +will be forwarded.""" zh: """发送到 'local_topic' 的消息都会转发到 InfluxDB。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 InfluxDB。 -""" +注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 InfluxDB。""" } label { en: "Local Topic" @@ -24,16 +22,14 @@ See also [InfluxDB 2.3 Line Protocol](https://docs.influxdata.com/influxdb/v2.3/ TLDR:
``` [,=[,=]] =[,=] [] -``` -""" +```""" zh: """使用 InfluxDB API Line Protocol 写入 InfluxDB 的数据,支持占位符
参考 [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/)
TLDR:
``` [,=[,=]] =[,=] [] -``` -""" +```""" } label { en: "Write Syntax" diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf index fff798e19..e72da2323 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf @@ -325,10 +325,10 @@ emqx_ee_bridge_kafka { desc { en: "Partition strategy is to tell the producer how to dispatch messages to Kafka partitions.\n\n" "random: Randomly pick a partition for each message\n" - "key_dispatch: Hash Kafka message key to a partition number\n" + "key_dispatch: Hash Kafka message key to a partition number" zh: "设置消息发布时应该如何选择 Kafka 分区。\n\n" "random: 为每个消息随机选择一个分区。\n" - "key_dispatch: Hash Kafka message key to a partition number\n" + "key_dispatch: Hash Kafka message key to a partition number" } label { en: "Partition Strategy" @@ -341,11 +341,11 @@ emqx_ee_bridge_kafka { "before it sends back the acknowledgement to EMQX Kafka producer\n\n" "all_isr: Require all in-sync replicas to acknowledge.\n" "leader_only: Require only the partition-leader's acknowledgement.\n" - "none: No need for Kafka to acknowledge at all.\n" + "none: No need for Kafka to acknowledge at all." zh: "设置 Kafka leader 在返回给 EMQX 确认之前需要等待多少个 follower 的确认。\n\n" "all_isr: 需要所有的在线复制者都确认。\n" "leader_only: 仅需要分区 leader 确认。\n" - "none: 无需 Kafka 回复任何确认。\n" + "none: 无需 Kafka 回复任何确认。" } label { en: "Required Acks" @@ -382,7 +382,7 @@ emqx_ee_bridge_kafka { desc { en: "Configure producer message buffer.\n\n" "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" "当 EMQX 需要发送的消息超过 Kafka 处理能力,或者当 Kafka 临时下线时,EMQX 内部会将消息缓存起来。" } diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_mysql.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_mysql.conf index 0c56b1976..345fd9cba 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_mysql.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_mysql.conf @@ -6,11 +6,9 @@ emqx_ee_bridge_mysql { matching the local_topic will be forwarded.
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 -will be forwarded. -""" +will be forwarded.""" zh: """发送到 'local_topic' 的消息都会转发到 MySQL。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。 -""" +注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。""" } label { en: "Local Topic" diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_pgsql.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_pgsql.conf index 0f80e1a1b..81d2330c5 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_pgsql.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_pgsql.conf @@ -6,11 +6,9 @@ emqx_ee_bridge_pgsql { matching the local_topic will be forwarded.
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 -will be forwarded. -""" +will be forwarded.""" zh: """发送到 'local_topic' 的消息都会转发到 PostgreSQL。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。 -""" +注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。""" } label { en: "Local Topic" diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_redis.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_redis.conf index 0589899b5..4de42b4e3 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_redis.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_redis.conf @@ -5,11 +5,9 @@ emqx_ee_bridge_redis { matching the local_topic will be forwarded.
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 -will be forwarded. -""" +will be forwarded.""" zh: """发送到 'local_topic' 的消息都会转发到 Redis。
-注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 Redis。 -""" +注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发到 Redis。""" } label { en: "Local Topic" @@ -21,11 +19,9 @@ will be forwarded. desc { 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: -`rpush`, `msgs`, `${payload}`. -""" +`rpush`, `msgs`, `${payload}`.""" zh: """用于推送数据的 Redis 命令模板。 每个列表元素代表一个命令名称或其参数。 -例如,要通过键值 `msgs` 将消息体推送到 Redis 列表中,数组元素应该是: `rpush`, `msgs`, `${payload}`。 -""" +例如,要通过键值 `msgs` 将消息体推送到 Redis 列表中,数组元素应该是: `rpush`, `msgs`, `${payload}`。""" } label { en: "Redis Command Template" diff --git a/lib-ee/emqx_ee_connector/i18n/emqx_ee_connector_influxdb.conf b/lib-ee/emqx_ee_connector/i18n/emqx_ee_connector_influxdb.conf index 81ea39d49..c00e88ef9 100644 --- a/lib-ee/emqx_ee_connector/i18n/emqx_ee_connector_influxdb.conf +++ b/lib-ee/emqx_ee_connector/i18n/emqx_ee_connector_influxdb.conf @@ -4,12 +4,10 @@ emqx_ee_connector_influxdb { desc { en: """The IPv4 or IPv6 address or the hostname to connect to.
A host entry has the following form: `Host[:Port]`.
-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 地址,或者主机名。
主机名具有以下形式:`Host[:Port]`。
-如果未指定 `[:Port]`,则使用 InfluxDB 默认端口 8086。 -""" +如果未指定 `[:Port]`,则使用 InfluxDB 默认端口 8086。""" } label { en: "Server Host" diff --git a/lib-ee/emqx_license/i18n/emqx_license_schema_i18n.conf b/lib-ee/emqx_license/i18n/emqx_license_schema_i18n.conf index 379cb3358..c330f1cb2 100644 --- a/lib-ee/emqx_license/i18n/emqx_license_schema_i18n.conf +++ b/lib-ee/emqx_license/i18n/emqx_license_schema_i18n.conf @@ -12,7 +12,7 @@ emqx_license_schema { "EMQX 自带一个默认的试用许可证," "默认试用许可允许最多接入 100 个连接,签发时间是 2023年1月9日,有效期是 5 年(1825 天)。" "若需要在生产环境部署,\n" - "请访问 https://www.emqx.com/apply-licenses/emqx 来申请。\n" + "请访问 https://www.emqx.com/apply-licenses/emqx 来申请。" } label { en: "License" diff --git a/scripts/check-i18n-style.escript b/scripts/check-i18n-style.escript new file mode 100755 index 000000000..6ad6c1770 --- /dev/null +++ b/scripts/check-i18n-style.escript @@ -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"); + "
" -> + Err("remove leading
"); + "
" -> + Err("remove leading
"); + _ -> + ok + end, + case lists:reverse(Str) of + [$\s | _] -> + Err("remove trailing whitespace"); + [$\n | _] -> + Err("remove trailing line-break"); + ">/rb<" ++ _ -> + Err("remove trailing
"); + ">/ rb<" ++ _ -> + Err("remove trailing
"); + _ -> + ok + end. diff --git a/scripts/check-i18n-style.sh b/scripts/check-i18n-style.sh new file mode 100755 index 000000000..0be565f30 --- /dev/null +++ b/scripts/check-i18n-style.sh @@ -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"