From a58b88aeecd8a2d01fe175475c6a0f5246d61a23 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Mon, 25 Apr 2022 17:52:50 +0800 Subject: [PATCH] chore(i18n): fix more and more typos --- apps/emqx/i18n/emqx_schema_i18n.conf | 127 +++++++++++++----- apps/emqx/src/emqx_schema.erl | 42 +----- apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf | 48 +++---- .../i18n/emqx_authn_mysql_i18n.conf | 10 +- .../i18n/emqx_dashboard_i18n.conf | 20 +-- apps/emqx_psk/i18n/emqx_psk_i18n.conf | 19 +-- .../i18n/emqx_rule_engine_schema.conf | 58 ++++---- 7 files changed, 180 insertions(+), 144 deletions(-) diff --git a/apps/emqx/i18n/emqx_schema_i18n.conf b/apps/emqx/i18n/emqx_schema_i18n.conf index ae82da5eb..a7d15fbbe 100644 --- a/apps/emqx/i18n/emqx_schema_i18n.conf +++ b/apps/emqx/i18n/emqx_schema_i18n.conf @@ -1323,9 +1323,8 @@ In case PSK cipher suites are intended, make sure to configured """ zh: """ 支持所有TLS/DTLS版本
-注:PSK密码被“tlsv1”抑制。3'版本配置
-如果打算使用PSK密码套件,请确保这里已配置 -['tlsv1.2','tlsv1.1']。 + +注:PSK 的 Ciphers 无法在 tlsv1.3 中使用,如果打算使用 PSK 密码套件,请确保这里配置为 ["tlsv1.2","tlsv1.1"]。 """ } label: { @@ -1334,7 +1333,7 @@ In case PSK cipher suites are intended, make sure to configured } } -ciphers_schema_0 { +ciphers_schema_common { desc { en: """ This config holds TLS cipher suite names separated by comma, @@ -1367,8 +1366,8 @@ 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”]。 +"TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256"或 +["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
密码(及其顺序)定义了客户端和服务器通过网络连接加密信息的方式。 选择一个好的密码套件对于应用程序的数据安全性、机密性和性能至关重要。 @@ -1378,14 +1377,14 @@ EMQX 配置文档提供的所有默认值和示例都是 OpenSSL 格式
注意:某些密码套件仅与特定的 TLS 版本兼容('tlsv1.1'、'tlsv1.2'或'tlsv1.3')。 不兼容的密码套件将被自动删除。 -例如,如果只有“tlsv1.3”。在版本中给出,为其他版本配置密码套件将无效。 +例如,如果只有 versions 仅配置为 tlsv1.3。为其他版本配置密码套件将无效。
-注:PSK密码被“tlsv1.3”抑制。版本配置
-如果打算使用PSK密码套件,“tlsv1.3”。应在版本中禁用。 +注:PSK 的 Ciphers 不支持 tlsv1.3
+如果打算使用PSK密码套件 tlsv1.3。应在ssl.versions中禁用。
-PSK密码套件: +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, @@ -1398,6 +1397,74 @@ RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA"
} } +ciphers_schema_quic { + desc { + 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"]. +
+Ciphers (and their ordering) define the way in which the +client and server encrypts information over the network connection. +Selecting a good cipher suite is critical for the +application's data security, confidentiality and performance. + +The names should be in OpenSSL string format (not RFC format). +All default values and examples provided by EMQX config +documentation are all in OpenSSL format.
+ +NOTE: Certain cipher suites are only compatible with +specific TLS versions ('tlsv1.1', 'tlsv1.2' or 'tlsv1.3') +incompatible cipher suites will be silently dropped. +For instance, if only 'tlsv1.3' is given in the versions, +configuring cipher suites for other versions will have no effect. +
+ +NOTE: PSK ciphers are suppressed by 'tlsv1.3' version config
+If PSK cipher suites are intended, 'tlsv1.3' should be disabled from versions.
+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"
+ +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"]。 +
+密码(及其顺序)定义了客户端和服务器通过网络连接加密信息的方式。 +选择一个好的密码套件对于应用程序的数据安全性、机密性和性能至关重要。 + +名称应为 OpenSSL 字符串格式(而不是 RFC 格式)。 +EMQX 配置文档提供的所有默认值和示例都是 OpenSSL 格式
+注意:某些密码套件仅与特定的 TLS 版本兼容('tlsv1.1'、'tlsv1.2'或'tlsv1.3')。 +不兼容的密码套件将被自动删除。 + +例如,如果只有 versions 仅配置为 tlsv1.3。为其他版本配置密码套件将无效。 + +
+注:PSK 的 Ciphers 不支持 tlsv1.3
+如果打算使用PSK密码套件,tlsv1.3。应在ssl.versions中禁用。 + +
+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"
+ +注:QUIC 监听器不支持 tlsv1.3 的 ciphers +""" + } + label: { + en: "" + zh: "" + } +} + common_ssl_opts_schema_user_lookup_fun { desc { en: """ @@ -1699,30 +1766,30 @@ base_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.
+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 +Variables in mountpoint string: + - ${clientid}: clientid + - ${username}: username """ zh: """ 发布或订阅时,请在所有主题前面加上 mountpoint 字符串。 将消息传递给订阅者时,将从主题名称中删除带前缀的字符串。挂载点是一种用户可以用来实现不同侦听器之间消息路由隔离的方法。 -例如,如果客户机a使用`侦听器订阅` t'。tcp<名称>。mountpoint`设置为'some_tenant',那么客户端实际上订阅了主题'some_tenant/t'。
-类似地,如果另一个客户端B(与客户端A连接到同一个侦听器)向主题“t”发送消息,该消息将路由到所有订阅了“some_租户/t”的客户端,因此客户端A将接收主题名为“t”的消息
+例如,如果客户机 A 使用 listeners.tcp..mountpoint 设置为'some_tenant',那么客户端实际上订阅了主题'some_tenant/t'。
+类似地,如果另一个客户端B(与客户端A连接到同一个侦听器)向主题 't' 发送消息,该消息将路由到所有订阅了'some_租户/t'的客户端,因此客户端 A 将接收主题名为't'的消息
-设置为“”“”以禁用该功能
+设置为"" 以禁用该功能
mountpoint 字符串中的变量: - ${clientid}: clientid @@ -1894,12 +1961,12 @@ verification check. """ zh: """ 指定要在 TLS 服务器名称指示扩展中使用的主机名
-例如,当连接到“server.example.net”时,接受连接并执行TLS握手的真正服务器可能与TLS客户端最初连接到的主机不同, -例如,当连接到IP地址时,或者当主机具有多个可解析的DNS记录时
+例如,当连接到 "server.example.net" 时,接受连接并执行 TLS 握手的真正服务器可能与 TLS 客户端最初连接到的主机不同, +例如,当连接到 IP 地址时,或者当主机具有多个可解析的 DNS 记录时
如果未指定,它将默认为使用的主机名字符串 -建立连接,除非使用IP地址
+建立连接,除非使用 IP 地址
然后,主机名也用于对等机的主机名验证 -证书
特殊值“disable”阻止发送服务器名称指示扩展,并禁用主机名验证检查。 +证书
特殊值'disable'阻止发送服务器名称指示扩展,并禁用主机名验证检查。 """ } label: { diff --git a/apps/emqx/src/emqx_schema.erl b/apps/emqx/src/emqx_schema.erl index 52bd3c2e8..d35df2b65 100644 --- a/apps/emqx/src/emqx_schema.erl +++ b/apps/emqx/src/emqx_schema.erl @@ -1933,6 +1933,10 @@ default_tls_vsns(tls_all_available) -> -spec ciphers_schema(quic | dtls_all_available | tls_all_available | undefined) -> hocon_schema:field_schema(). ciphers_schema(Default) -> + Desc = case Default of + quic -> ?DESC(ciphers_schema_quic); + _ -> ?DESC(ciphers_schema_common) + end, sc( hoconsc:array(string()), #{ @@ -1949,43 +1953,7 @@ ciphers_schema(Default) -> true -> undefined; false -> fun validate_ciphers/1 end, - desc_id => "ciphers_schema_" ++ - case Default of - quic -> "quic"; - _ -> "0" - end, - desc_en => - "This config holds TLS cipher suite names separated by comma,\n" - "or as an array of strings. e.g.\n" - "\"TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256\" or\n" - "[\"TLS_AES_256_GCM_SHA384\",\"TLS_AES_128_GCM_SHA256\"].\n" - "
\n" - "Ciphers (and their ordering) define the way in which the\n" - "client and server encrypts information over the network connection.\n" - "Selecting a good cipher suite is critical for the\n" - "application's data security, confidentiality and performance.\n" - "\n" - "The names should be in OpenSSL string format (not RFC format).\n" - "All default values and examples provided by EMQX config\n" - "documentation are all in OpenSSL format.
\n" - "\n" - "NOTE: Certain cipher suites are only compatible with\n" - "specific TLS versions ('tlsv1.1', 'tlsv1.2' or 'tlsv1.3')\n" - "incompatible cipher suites will be silently dropped.\n" - "For instance, if only 'tlsv1.3' is given in the versions,\n" - "configuring cipher suites for other versions will have no effect.\n" - "
\n" - "\n" - "NOTE: PSK ciphers are suppressed by 'tlsv1.3' version config
\n" - "If PSK cipher suites are intended, 'tlsv1.3' should be disabled from versions.
\n" - "PSK cipher suites: \"RSA-PSK-AES256-GCM-SHA384,RSA-PSK-AES256-CBC-SHA384,\n" - "RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256,\n" - "RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA,\n" - "RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA\"
\n" ++ - case Default of - quic -> "NOTE: QUIC listener supports only 'tlsv1.3' ciphers
"; - _ -> "" - end + desc => Desc } ). diff --git a/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf index 44a903f47..91290a0ed 100644 --- a/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf @@ -1,7 +1,7 @@ emqx_authn_jwt { use_jwks { desc { - en: """jwks flag""" + en: """JWKs flag""" zh: """jwks 状态""" } label { @@ -16,7 +16,7 @@ emqx_authn_jwt { zh: """签名算法""" } label { - en: """algorithm""" + en: """Algorithm""" zh: """算法""" } } @@ -27,7 +27,7 @@ emqx_authn_jwt { zh: """用于签名token的证书""" } label { - en: """certificate""" + en: """Certificate""" zh: """证书""" } } @@ -35,10 +35,10 @@ emqx_authn_jwt { secret_base64_encoded { desc { en: """Enable/disable base64 encoding of the secret.""" - zh: """启用/关闭私匙 base64 编码""" + zh: """启用/关闭私私钥 base64 编码""" } label { - en: """secret_base64_encoded""" + en: """Secret with base64 encoded""" zh: """密钥 base64 编码""" } } @@ -49,8 +49,8 @@ emqx_authn_jwt { zh: """使用对称加密的算法""" } label { - en: """secret""" - zh: """secret""" + en: """Secret""" + zh: """密钥""" } } @@ -60,8 +60,8 @@ emqx_authn_jwt { zh: """JWKs endpoint""" } label { - en: """endpoint""" - zh: """endpoint""" + en: """Endpoint""" + zh: """Endpoint""" } } @@ -71,7 +71,7 @@ emqx_authn_jwt { zh: """JWKs 更新间隔""" } label { - en: """refresh_interval""" + en: """Refresh Interval""" zh: """更新间隔""" } } @@ -82,7 +82,7 @@ emqx_authn_jwt { zh: """SSL CA 证书公钥文件路径""" } label { - en: """cacertfile""" + en: """CA Certificate File""" zh: """CA 证书文件""" } } @@ -93,7 +93,7 @@ emqx_authn_jwt { zh: """证书文件路径""" } label { - en: """certfile""" + en: """Certificate File""" zh: """证书文件""" } } @@ -104,7 +104,7 @@ emqx_authn_jwt { zh: """SSL 私钥文件路径""" } label { - en: """keyfile""" + en: """Key File""" zh: """私钥文件""" } } @@ -115,8 +115,8 @@ emqx_authn_jwt { zh: """指定握手过程中是否校验客户端""" } label { - en: """verify""" - zh: """verify""" + en: """Verify""" + zh: """Verify""" } } @@ -126,7 +126,7 @@ emqx_authn_jwt { zh: """SSL SNI (服务器名称指示)""" } label { - en: """server_name_indication""" + en: """Server Name Indication""" zh: """服务器名称指示""" } } @@ -137,8 +137,8 @@ emqx_authn_jwt { zh: """The list of claims to verify.""" } label { - en: """verify_claims""" - zh: """verify_claims""" + en: """Verify Claims""" + zh: """Verify Claims""" } } @@ -148,8 +148,8 @@ emqx_authn_jwt { zh: """JWKs 连接数量""" } label { - en: """pool_size""" - zh: """pool_size""" + en: """Pool Size""" + zh: """连接池大小""" } } @@ -159,8 +159,8 @@ emqx_authn_jwt { zh: """SSL 选项""" } label { - en: """ssl""" - zh: """ssl""" + en: """SSL Options""" + zh: """SSL 选项""" } } @@ -170,8 +170,8 @@ emqx_authn_jwt { zh: """启用/禁用 SSL""" } label { - en: """enable""" - zh: """启用""" + en: """Enable/disable SSL.""" + zh: """启用/禁用 SSL""" } } diff --git a/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf index 1c931cd0e..2a6d86055 100644 --- a/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf @@ -5,7 +5,7 @@ emqx_authn_mysql { zh: """MySQL 认证配置""" } label: { - en: """authentication""" + en: """Authentication Options""" zh: """认证配置""" } } @@ -16,18 +16,18 @@ emqx_authn_mysql { zh: """客户端数据查询 SQL 语句""" } label: { - en: """query""" - zh: """请求""" + en: """SQL Query""" + zh: """SQL 查询语句""" } } query_timeout { - dsec { + desc { en: """Timeout for the SQL query.""" zh: """SQL 查询超时时长""" } label: { - en: """query_timeout""" + en: """Query Timeout""" zh: """请求超时""" } } diff --git a/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf b/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf index 79d4375ab..07bd75f9b 100644 --- a/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf +++ b/apps/emqx_dashboard/i18n/emqx_dashboard_i18n.conf @@ -1,11 +1,11 @@ emqx_dashboard_schema { listeners { desc { - en: """HTTP(s) listeners are identified by their protocol type and are
-used to serve dashboard UI and restful HTTP API.
-Listeners must have a unique combination of port number and IP address.
+ en: """HTTP(s) listeners are identified by their protocol type and are +used to serve dashboard UI and restful HTTP API. +Listeners must have a unique combination of port number and IP address. For example, an HTTP listener can listen on all configured IP addresses -on a given port for a machine by specifying the IP address 0.0.0.0.
+on a given port for a machine by specifying the IP address 0.0.0.0. Alternatively, the HTTP listener can specify a unique IP address for each listener, but use the same port.""" zh: """仪表盘监听器设置。""" @@ -17,7 +17,7 @@ but use the same port.""" } sample_interval { desc { - en: """How often to update metrics displayed in the dashboard.
+ en: """How often to update metrics displayed in the dashboard. Note: `sample_interval` should be a divisor of 60.""" zh: """更新仪表板中显示的指标的时间间隔。必须小于60,且被60的整除。""" } @@ -154,9 +154,9 @@ Note: `sample_interval` should be a divisor of 60.""" } default_password { desc { - en: """The initial default password for dashboard 'admin' user.
+ en: """The initial default password for dashboard 'admin' user. For safety, it should be changed as soon as possible.""" - zh: """默认的仪表板用户密码
+ zh: """默认的仪表板用户密码 为了安全,应该尽快修改密码。""" } label { @@ -166,10 +166,10 @@ For safety, it should be changed as soon as possible.""" } cors { desc { - en: """Support Cross-Origin Resource Sharing (CORS).
-Allows a server to indicate any origins (domain, scheme, or port) other than
+ zh: """支持跨域资源共享(CORS) 允许服务器指示任何来源(域名、协议或端口),除了本服务器之外的任何浏览器应允许加载资源。""" } label { diff --git a/apps/emqx_psk/i18n/emqx_psk_i18n.conf b/apps/emqx_psk/i18n/emqx_psk_i18n.conf index 96a5378c6..3a4e27ca3 100644 --- a/apps/emqx_psk/i18n/emqx_psk_i18n.conf +++ b/apps/emqx_psk/i18n/emqx_psk_i18n.conf @@ -5,12 +5,12 @@ emqx_psk_schema { en: """PSK stands for 'Pre-Shared Keys'. This config to enable TLS-PSK authentication. -Important! Make sure the SSL listener with only `tlsv1.2` enabled, and also PSK cipher suites -configured, such as `RSA-PSK-AES256-GCM-SHA384`. +Important! Make sure the SSL listener with only tlsv1.2 enabled, and also PSK cipher suites +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 身份验证。 @@ -34,18 +34,19 @@ PSK 是 “Pre-Shared-Keys” 的缩写。 init_file { desc { en: """If init_file is specified, EMQX will import PSKs from the file into the built-in database at startup for use by the runtime. -The file has to be structured line-by-line, each line must be in the format of `PSKIdentity:SharedSecret`. -For example: `mydevice1:c2VjcmV0`""" +The file has to be structured line-by-line, each line must be in the format of PSKIdentity:SharedSecret. +For example: mydevice1:c2VjcmV0""" zh: """如果设置了初始化文件,EMQX 将在启动时从初始化文件中导入 PSK 信息到内建数据库中。 -这个文件需要按行进行组织,每一行必须遵守如下格式: `PSKIdentity:SharedSecret` -例如: `mydevice1:c2VjcmV0`""" +这个文件需要按行进行组织,每一行必须遵守如下格式: PSKIdentity:SharedSecret +例如: mydevice1:c2VjcmV0""" } } separator { desc { - en: "The separator between 'PSKIdentity' and 'SharedSecret' in the PSK file" - zh: "PSK 文件中 'PSKIdentity' 和 'SharedSecret' 之间的分隔符" + en: "The separator between PSKIdentity and SharedSecret in the PSK file" + + zh: "PSK 文件中 PSKIdentitySharedSecret 之间的分隔符" } } 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 135fe27eb..db469ba82 100644 --- a/apps/emqx_rule_engine/i18n/emqx_rule_engine_schema.conf +++ b/apps/emqx_rule_engine/i18n/emqx_rule_engine_schema.conf @@ -14,12 +14,12 @@ emqx_rule_engine_schema { rules_sql { desc { en: """ -SQL query to transform the messages.
-Example: SELECT * FROM "test/topic" WHERE payload.x = 1
+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
+用于处理消息的 SQL 。 +示例:SELECT * FROM "test/topic" WHERE payload.x = 1 """ } label: { @@ -31,25 +31,25 @@ Example: SELECT * FROM "test/topic" WHERE payload.x = 1
rules_outputs { desc { en: """ -A list of outputs of the rule.
+A list of outputs of the rule. An output can be a string that refers to the channel ID of an EMQX bridge, or an object -that refers to a function.
+that refers to a function. There a some built-in functions like "republish" and "console", and we also support user -provided functions in the format: "{module}:{function}".
+provided functions in the format: "{module}:{function}". The outputs in the list are executed sequentially. This means that if one of the output is executing slowly, all the following outputs will not -be executed until it returns.
+be executed until it returns. If one of the output crashed, all other outputs come after it will still be executed, in the -original order.
+original order. If there's any error when running an output, there will be an error message, and the 'failure' counter of the function output or the bridge channel will increase. """ zh: """ -规则的动作列表。
-动作可以是指向 EMQX bridge 的引用,也可以是一个指向函数的对象。
-我们支持一些内置函数,如“republish”和“console”,我们还支持用户提供的函数,它的格式为:“{module}:{function}”。
-列表中的动作按顺序执行。这意味着如果其中一个动作执行缓慢,则以下所有动作都不会被执行直到它返回。
-如果其中一个动作崩溃,在它之后的所有动作仍然会被按照原始顺序执行。
+规则的动作列表。 +动作可以是指向 EMQX bridge 的引用,也可以是一个指向函数的对象。 +我们支持一些内置函数,如“republish”和“console”,我们还支持用户提供的函数,它的格式为:“{module}:{function}”。 +列表中的动作按顺序执行。这意味着如果其中一个动作执行缓慢,则以下所有动作都不会被执行直到它返回。 +如果其中一个动作崩溃,在它之后的所有动作仍然会被按照原始顺序执行。 如果运行动作时出现任何错误,则会出现错误消息,并且相应的计数器会增加。 """ } @@ -106,16 +106,16 @@ counter of the function output or the bridge channel will increase. user_provided_function_function { desc { en: """ -The user provided function. Should be in the format: '{module}:{function}'.
+The user provided function. Should be in the format: '{module}:{function}'. Where {module} is the Erlang callback module and {function} is the Erlang function. -
+ To write your own function, checkout the function console and republish in the source file: apps/emqx_rule_engine/src/emqx_rule_outputs.erl as an example. """ zh: """ -用户提供的函数。 格式应为:'{module}:{function}'。
-其中 {module} 是 Erlang 回调模块, {function} 是 Erlang 函数。
+用户提供的函数。 格式应为:'{module}:{function}'。 +其中 {module} 是 Erlang 回调模块, {function} 是 Erlang 函数。 要编写自己的函数,请检查源文件:apps/emqx_rule_engine/src/emqx_rule_outputs.erl 中的示例函数 consolerepublish 。 """ } @@ -146,11 +146,11 @@ checkout the function console and republish in the sou republish_args_topic { desc { en: """ -The target topic of message to be re-published.
+The target topic of message to be re-published. Template with variables is allowed, see description of the 'republish_args'. """ zh: """ -重新发布消息的目标主题。
+重新发布消息的目标主题。 允许使用带有变量的模板,请参阅“republish_args”的描述。 """ } @@ -164,12 +164,12 @@ Template with variables is allowed, see description of the 'republish_args'. desc { en: """ The qos of the message to be re-published. -Template with variables is allowed, see description of the 'republish_args'.
+Template with variables is allowed, see description of the 'republish_args'. Defaults to ${qos}. If variable ${qos} is not found from the selected result of the rule, 0 is used. """ zh: """ -要重新发布的消息的 qos。允许使用带有变量的模板,请参阅“republish_args”的描述。
+要重新发布的消息的 qos。允许使用带有变量的模板,请参阅“republish_args”的描述。 默认为 ${qos}。 如果从规则的选择结果中没有找到变量 ${qos},则使用 0。 """ } @@ -183,12 +183,12 @@ Defaults to ${qos}. If variable ${qos} is not found from the selected result of desc { en: """ The 'retain' flag of the message to be re-published. -Template with variables is allowed, see description of the 'republish_args'.
+Template with variables is allowed, see description of the 'republish_args'. Defaults to ${retain}. If variable ${retain} is not found from the selected result of the rule, false is used. """ zh: """ -要重新发布的消息的“保留”标志。允许使用带有变量的模板,请参阅“republish_args”的描述。
+要重新发布的消息的“保留”标志。允许使用带有变量的模板,请参阅“republish_args”的描述。 默认为 ${retain}。 如果从所选结果中未找到变量 ${retain},则使用 false。 """ } @@ -202,12 +202,12 @@ of the rule, false is used. desc { en: """ The payload of the message to be re-published. -Template with variables is allowed, see description of the 'republish_args'.
. +Template with variables is allowed, see description of the 'republish_args'. Defaults to ${payload}. If variable ${payload} is not found from the selected result of the rule, then the string "undefined" is used. """ zh: """ -要重新发布的消息的有效负载。允许使用带有变量的模板,请参阅“republish_args”的描述。
。 +要重新发布的消息的有效负载。允许使用带有变量的模板,请参阅“republish_args”的描述。。 默认为 ${payload}。 如果从所选结果中未找到变量 ${payload},则使用字符串 "undefined"。 """ } @@ -296,7 +296,7 @@ of the rule, then the string "undefined" is used. desc_republish_args { desc { - en: """The arguments of the built-in 'republish' output.
One can use variables in the args.
+ en: """The arguments of the built-in 'republish' output.One can use variables in the args. The variables are selected by the rule. For example, if the rule SQL is defined as following: SELECT clientid, qos, payload FROM "t/1" @@ -314,8 +314,8 @@ 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' 动作的参数。
-可以在参数中使用变量。
+内置 'republish' 动作的参数。 +可以在参数中使用变量。 变量是规则中选择的字段。 例如规则 SQL 定义如下: SELECT clientid, qos, payload FROM "t/1"