Compare commits
4 Commits
master
...
0328-zmsto
Author | SHA1 | Date |
---|---|---|
![]() |
3f9bf9a159 | |
![]() |
f4d3cf4c33 | |
![]() |
f25e8680be | |
![]() |
1ada840bc9 |
2
Makefile
2
Makefile
|
@ -82,7 +82,7 @@ ct: $(REBAR) merge-config
|
|||
static_checks:
|
||||
@$(REBAR) as check do xref, dialyzer
|
||||
@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
|
||||
./scripts/check-i18n-style.sh
|
||||
|
||||
APPS=$(shell $(SCRIPTS)/find-apps.sh)
|
||||
|
||||
|
|
|
@ -6,11 +6,9 @@ emqx_ee_bridge_clickhouse {
|
|||
matching the local_topic will be forwarded.</br>
|
||||
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
|
||||
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' 的消息都会转发到 Clickhouse。 </br>
|
||||
注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。
|
||||
"""
|
||||
注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。"""
|
||||
}
|
||||
label {
|
||||
en: "Local Topic"
|
|
@ -546,7 +546,7 @@ emqx_ee_bridge_kafka {
|
|||
"<code>ts</code>: message timestamp.\n"
|
||||
"<code>ts_type</code>: message timestamp type, which is one of"
|
||||
" <code>create</code>, <code>append</code> or <code>undefined</code>.\n"
|
||||
"<code>value</code>: Kafka message value (uses the chosen value encoding).\n"
|
||||
"<code>value</code>: Kafka message value (uses the chosen value encoding)."
|
||||
zh: "用于转换收到的 Kafka 消息的模板。 "
|
||||
"默认情况下,它将使用 JSON 格式来序列化来自 Kafka 的所有字段。 "
|
||||
"这些字段包括:"
|
||||
|
@ -557,7 +557,7 @@ emqx_ee_bridge_kafka {
|
|||
"<code>ts</code>: 消息的时间戳。\n"
|
||||
"<code>ts_type</code>:消息的时间戳类型,值可能是:"
|
||||
" <code>create</code>, <code>append</code> 或 <code>undefined</code>。\n"
|
||||
"<code>value</code>: Kafka 消息值(使用选择的编码方式编码)。\n"
|
||||
"<code>value</code>: Kafka 消息值(使用选择的编码方式编码)。"
|
||||
|
||||
}
|
||||
label {
|
|
@ -6,11 +6,9 @@ emqx_ee_bridge_tdengine {
|
|||
matching the local_topic will be forwarded.</br>
|
||||
NOTE: if this bridge is used as the action of a rule (EMQX rule engine), and also local_topic is
|
||||
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' 的消息都会转发到 TDengine。 </br>
|
||||
注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。
|
||||
"""
|
||||
注意:如果这个 Bridge 被用作规则(EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。"""
|
||||
}
|
||||
label {
|
||||
en: "Local Topic"
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
emqx_ee_connector_clickhouse {
|
||||
|
||||
base_url {
|
|
@ -2,8 +2,8 @@ emqx_ee_connector_dynamo {
|
|||
|
||||
url {
|
||||
desc {
|
||||
en: """The url of DynamoDB endpoint.<br/>"""
|
||||
zh: """DynamoDB 的地址。<br/>"""
|
||||
en: """The url of DynamoDB endpoint."""
|
||||
zh: """DynamoDB 的地址。"""
|
||||
}
|
||||
label: {
|
||||
en: "DynamoDB Endpoint"
|
|
@ -2,16 +2,12 @@ emqx_ee_connector_rocketmq {
|
|||
|
||||
server {
|
||||
desc {
|
||||
en: """
|
||||
The IPv4 or IPv6 address or the hostname to connect to.<br/>
|
||||
en: """The IPv4 or IPv6 address or the hostname to connect to.<br/>
|
||||
A host entry has the following form: `Host[:Port]`.<br/>
|
||||
The RocketMQ default port 9876 is used if `[:Port]` is not specified.
|
||||
"""
|
||||
zh: """
|
||||
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
|
||||
The RocketMQ default port 9876 is used if `[:Port]` is not specified."""
|
||||
zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
|
||||
主机名具有以下形式:`Host[:Port]`。<br/>
|
||||
如果未指定 `[:Port]`,则使用 RocketMQ 默认端口 9876。
|
||||
"""
|
||||
如果未指定 `[:Port]`,则使用 RocketMQ 默认端口 9876。"""
|
||||
}
|
||||
label: {
|
||||
en: "Server Host"
|
|
@ -2,16 +2,12 @@ emqx_ee_connector_tdengine {
|
|||
|
||||
server {
|
||||
desc {
|
||||
en: """
|
||||
The IPv4 or IPv6 address or the hostname to connect to.<br/>
|
||||
en: """The IPv4 or IPv6 address or the hostname to connect to.<br/>
|
||||
A host entry has the following form: `Host[:Port]`.<br/>
|
||||
The TDengine default port 6041 is used if `[:Port]` is not specified.
|
||||
"""
|
||||
zh: """
|
||||
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
|
||||
The TDengine default port 6041 is used if `[:Port]` is not specified."""
|
||||
zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
|
||||
主机名具有以下形式:`Host[:Port]`。<br/>
|
||||
如果未指定 `[:Port]`,则使用 TDengine 默认端口 6041。
|
||||
"""
|
||||
如果未指定 `[:Port]`,则使用 TDengine 默认端口 6041。"""
|
||||
}
|
||||
label: {
|
||||
en: "Server Host"
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
emqx_mgmt_api_publish {
|
||||
publish_api {
|
||||
desc {
|
|
@ -1503,8 +1503,8 @@ In case PSK cipher suites are intended, make sure to configure
|
|||
|
||||
common_ssl_opts_schema_hibernate_after {
|
||||
desc {
|
||||
en: """ Hibernate the SSL process after idling for amount of time reducing its memory footprint. """
|
||||
zh: """ 在闲置一定时间后休眠 SSL 进程,减少其内存占用。"""
|
||||
en: """Hibernate the SSL process after idling for amount of time reducing its memory footprint."""
|
||||
zh: """在闲置一定时间后休眠 SSL 进程,减少其内存占用。"""
|
||||
}
|
||||
label: {
|
||||
en: "hibernate after"
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env escript
|
||||
|
||||
%% called from check-i18n-style.sh
|
||||
|
||||
-mode(compile).
|
||||
|
||||
-define(YELLOW, "\e[33m").
|
||||
|
|
|
@ -3,6 +3,6 @@ set -euo pipefail
|
|||
|
||||
cd -P -- "$(dirname -- "$0")/.."
|
||||
|
||||
all_files="$(git ls-files '*i18n*.conf')"
|
||||
all_files="$(git ls-files 'rel/i18n/*.hocon')"
|
||||
|
||||
./scripts/check-i18n-style.escript "$all_files"
|
||||
|
|
|
@ -4,12 +4,8 @@
|
|||
|
||||
main(_) ->
|
||||
BaseConf = <<"">>,
|
||||
Cfgs0 = get_all_cfgs("apps/"),
|
||||
Cfgs1 = get_all_cfgs("lib-ee/"),
|
||||
Conf0 = merge(BaseConf, Cfgs0),
|
||||
Conf = [merge(Conf0, Cfgs1),
|
||||
io_lib:nl()
|
||||
],
|
||||
Cfgs0 = get_all_files(),
|
||||
Conf = merge(BaseConf, Cfgs0),
|
||||
OutputFile = "apps/emqx_dashboard/priv/i18n.conf",
|
||||
ok = filelib:ensure_dir(OutputFile),
|
||||
ok = file:write_file(OutputFile, Conf).
|
||||
|
@ -25,39 +21,7 @@ merge(BaseConf, Cfgs) ->
|
|||
end
|
||||
end, BaseConf, Cfgs).
|
||||
|
||||
get_all_cfgs(Root) ->
|
||||
Apps = filelib:wildcard("*", Root) -- ["emqx_machine"],
|
||||
Dirs = [filename:join([Root, App]) || App <- Apps],
|
||||
lists:foldl(fun get_cfgs/2, [], Dirs).
|
||||
|
||||
get_all_cfgs(Dir, Cfgs) ->
|
||||
Fun = fun(E, Acc) ->
|
||||
Path = filename:join([Dir, E]),
|
||||
get_cfgs(Path, Acc)
|
||||
end,
|
||||
lists:foldl(Fun, Cfgs, filelib:wildcard("*", Dir)).
|
||||
|
||||
get_cfgs(Dir, Cfgs) ->
|
||||
case filelib:is_dir(Dir) of
|
||||
false ->
|
||||
Cfgs;
|
||||
_ ->
|
||||
Files = filelib:wildcard("*", Dir),
|
||||
case lists:member("i18n", Files) of
|
||||
false ->
|
||||
try_enter_child(Dir, Files, Cfgs);
|
||||
true ->
|
||||
EtcDir = filename:join([Dir, "i18n"]),
|
||||
Confs = filelib:wildcard("*.conf", EtcDir),
|
||||
NewCfgs = [filename:join([EtcDir, Name]) || Name <- Confs],
|
||||
try_enter_child(Dir, Files, NewCfgs ++ Cfgs)
|
||||
end
|
||||
end.
|
||||
|
||||
try_enter_child(Dir, Files, Cfgs) ->
|
||||
case lists:member("src", Files) of
|
||||
false ->
|
||||
Cfgs;
|
||||
true ->
|
||||
get_all_cfgs(filename:join([Dir, "src"]), Cfgs)
|
||||
end.
|
||||
get_all_files() ->
|
||||
Dir = filename:join(["rel","i18n"]),
|
||||
Files = filelib:wildcard("*.hocon", Dir),
|
||||
lists:map(fun(Name) -> filename:join([Dir, Name]) end, Files).
|
||||
|
|
Loading…
Reference in New Issue