style: make hocon style check and spellcheck happy

- with more human readable i18n style check format
This commit is contained in:
JimMoen 2023-04-11 11:11:09 +08:00
parent 675f9894ab
commit 35ab1c0190
No known key found for this signature in database
GPG Key ID: 87A520B4F76BA86D
7 changed files with 19 additions and 25 deletions

View File

@ -1 +1 @@
Add MicroSoft SQL Server data Bridge support.
Implement Microsoft SQL Server bridge.

View File

@ -39,7 +39,7 @@ will be forwarded."""
desc_config {
desc {
en: """Configuration for an DynamoDB bridge."""
en: """Configuration for a DynamoDB bridge."""
zh: """DynamoDB 桥接配置"""
}
label: {

View File

@ -39,7 +39,7 @@ will be forwarded."""
desc_config {
desc {
en: """Configuration for an PostgreSQL bridge."""
en: """Configuration for a PostgreSQL bridge."""
zh: """PostgreSQL 桥接配置"""
}
label: {

View File

@ -2,15 +2,13 @@ emqx_ee_bridge_sqlserver {
local_topic {
desc {
en: """The MQTT topic filter to be forwarded to MicroSoft SQL Server. All MQTT 'PUBLISH' messages with the topic
en: """The MQTT topic filter to be forwarded to Microsoft SQL Server. All MQTT 'PUBLISH' messages with the topic
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.
"""
zh: """发送到 'local_topic' 的消息都会转发到 MicroSoft SQL Server。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。
"""
will be forwarded."""
zh: """发送到 'local_topic' 的消息都会转发到 Microsoft SQL Server。 </br>
注意:如果这个 Bridge 被用作规则EMQX 规则引擎)的输出,同时也配置了 'local_topic' ,那么这两部分的消息都会被转发。"""
}
label {
en: """Local Topic"""
@ -53,12 +51,12 @@ will be forwarded.
desc_config {
desc {
en: """Configuration for an MicroSoft SQL Server bridge."""
zh: """MicroSoft SQL Server 桥接配置"""
en: """Configuration for a Microsoft SQL Server bridge."""
zh: """Microsoft SQL Server 桥接配置"""
}
label: {
en: """MicroSoft SQL Server Bridge Configuration"""
zh: """MicroSoft SQL Server 桥接配置"""
en: """Microsoft SQL Server Bridge Configuration"""
zh: """Microsoft SQL Server 桥接配置"""
}
}

View File

@ -39,7 +39,7 @@ will be forwarded."""
desc_config {
desc {
en: """Configuration for an TDengine bridge."""
en: """Configuration for a TDengine bridge."""
zh: """TDengine 桥接配置"""
}
label: {

View File

@ -2,16 +2,12 @@ emqx_ee_connector_sqlserver {
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 SQL Server default port 1433 is used if `[:Port]` is not specified.
"""
zh: """
将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
The SQL Server default port 1433 is used if `[:Port]` is not specified."""
zh: """将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
主机名具有以下形式:`Host[:Port]`。<br/>
如果未指定 `[:Port]`,则使用 SQL Server 默认端口 1433。
"""
如果未指定 `[:Port]`,则使用 SQL Server 默认端口 1433。"""
}
label: {
en: "Server Host"

View File

@ -9,7 +9,7 @@
-define(RESET, "\e[39m").
main([Files0]) ->
io:format(user, "checking i18n file styles", []),
io:format(user, "checking i18n file styles~n", []),
_ = put(errors, 0),
Files = string:tokens(Files0, "\n"),
ok = load_hocon(),
@ -20,7 +20,7 @@ main([Files0]) ->
N when is_integer(N) andalso N > 1 ->
logerr("~p errors found~n", [N]);
_ ->
io:format(user, "OK~n", [])
io:format(user, "~nOK~n", [])
end.
load_hocon() ->
@ -42,7 +42,7 @@ die(Msg, Args) ->
halt(1).
logerr(Fmt, Args) ->
io:format(standard_error, ?RED ++ "ERROR: " ++ Fmt ++ ?RESET, Args),
io:format(standard_error, "~n" ++ ?RED ++ "ERROR: " ++ Fmt ++ ?RESET, Args),
N = get(errors),
_ = put(errors, N + 1),
ok.