From a863dcb61d0aa26dc13e6c9a5fb637194a1db09c Mon Sep 17 00:00:00 2001 From: zhouzb Date: Tue, 26 Apr 2022 15:10:44 +0800 Subject: [PATCH] docs(authn): optimize i18n in authn --- apps/emqx_authn/i18n/emqx_authn_api_i18n.conf | 124 +++++++------- .../emqx_authn/i18n/emqx_authn_http_i18n.conf | 60 +++---- apps/emqx_authn/i18n/emqx_authn_i18n.conf | 155 ------------------ apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf | 116 ++++++------- .../i18n/emqx_authn_mnesia_i18n.conf | 18 +- .../i18n/emqx_authn_mongo_i18n.conf | 99 ----------- .../i18n/emqx_authn_mongodb_i18n.conf | 87 ++++++++++ .../i18n/emqx_authn_mysql_i18n.conf | 20 +-- .../i18n/emqx_authn_pgsql_i18n.conf | 16 +- .../i18n/emqx_authn_redis_i18n.conf | 32 ++-- .../i18n/emqx_authn_schema_i18n.conf | 155 ++++++++++++++++++ apps/emqx_dashboard/etc/emqx_dashboard.conf | 2 +- 12 files changed, 411 insertions(+), 473 deletions(-) delete mode 100644 apps/emqx_authn/i18n/emqx_authn_i18n.conf delete mode 100644 apps/emqx_authn/i18n/emqx_authn_mongo_i18n.conf create mode 100644 apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf create mode 100644 apps/emqx_authn/i18n/emqx_authn_schema_i18n.conf diff --git a/apps/emqx_authn/i18n/emqx_authn_api_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_api_i18n.conf index 56f41aa89..1878662ea 100644 --- a/apps/emqx_authn/i18n/emqx_authn_api_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_api_i18n.conf @@ -2,212 +2,212 @@ emqx_authn_api { authentication_get { desc { - en: """List authenticators for global authentication""" - zh: """列出全局认证链上的认证器信息""" + en: """List authenticators for global authentication.""" + zh: """列出全局认证链上的认证器。""" } } authentication_post { desc { - en: """Create authenticator for global authentication""" - zh: """为全局认证链创建认证器信息""" + en: """Create authenticator for global authentication.""" + zh: """为全局认证链创建认证器。""" } } authentication_id_get { desc { - en: """Get authenticator from global authentication chain""" - zh: """获取全局认证链上指定的认证器信息""" + en: """Get authenticator from global authentication chain.""" + zh: """获取全局认证链上的指定认证器。""" } } authentication_id_put { desc { - en: """Update authenticator from global authentication chain""" - zh: """更新全局认证链上指定的认证器""" + en: """Update authenticator from global authentication chain.""" + zh: """更新全局认证链上的指定认证器。""" } } authentication_id_delete { desc { - en: """Delete authenticator from global authentication chain""" - zh: """删除全局认证链上指定的认证器信息""" + en: """Delete authenticator from global authentication chain.""" + zh: """删除全局认证链上的指定认证器。""" } } authentication_id_status_get { desc { - en: """Get authenticator status from global authentication chain""" - zh: """获取全局认证链上指定的认证器状态""" + en: """Get authenticator status from global authentication chain.""" + zh: """获取全局认证链上指定认证器的状态。""" } } listeners_listener_id_authentication_get { desc { - en: """List authenticators for listener authentication""" - zh: """列出监听器上的认证器信息""" + en: """List authenticators for listener authentication.""" + zh: """列出监听器认证链上的认证器。""" } } listeners_listener_id_authentication_post { desc { - en: """Create authenticator for listener authentication""" - zh: """在指定的监听器上创建认证器""" + en: """Create authenticator for listener authentication.""" + zh: """在监听器认证链上创建认证器。""" } } listeners_listener_id_authentication_id_get { desc { - en: """Get authenticator from listener authentication chain""" - zh: """获取监听器上指定的认证器信息""" + en: """Get authenticator from listener authentication chain.""" + zh: """获取监听器认证链上的指定认证器。""" } } listeners_listener_id_authentication_id_put { desc { - en: """Update authenticator from listener authentication chain""" - zh: """更新监听器上指定的认证器""" + en: """Update authenticator from listener authentication chain.""" + zh: """更新监听器认证链上的指定认证器。""" } } listeners_listener_id_authentication_id_delete { desc { - en: """Delete authenticator from listener authentication chain""" - zh: """删除监听器上指定的认证器""" + en: """Delete authenticator from listener authentication chain.""" + zh: """删除监听器认证链上的指定认证器。""" } } listeners_listener_id_authentication_id_status_get { desc { - en: """Get authenticator status from listener authentication chain""" - zh: """获取监听器上指定的认证器状态""" + en: """Get authenticator status from listener authentication chain.""" + zh: """获取监听器认证链上指定认证器的状态。""" } } authentication_id_move_post { desc { - en: """Move authenticator in global authentication chain""" - zh: """移动全局认证链上认证器的顺序""" + en: """Move authenticator in global authentication chain.""" + zh: """更改全局认证链上指定认证器的顺序。""" } } listeners_listener_id_authentication_id_move_post { desc { - en: """Move authenticator in listener authentication chain""" - zh: """移动监听器上认证器的顺序""" + en: """Move authenticator in listener authentication chain.""" + zh: """更改监听器认证链上指定认证器的顺序。""" } } authentication_id_import_users_post { desc { - en: """Import users into authenticator in global authentication chain""" - zh: """为全局认证链上的认证器导入用户数据""" + en: """Import users into authenticator in global authentication chain.""" + zh: """为全局认证链上的指定认证器导入用户数据。""" } } listeners_listener_id_authentication_id_import_users_post { desc { - en: """Import users into authenticator in listener authentication chain""" - zh: """为监听器上的认证器导入用户数据""" + en: """Import users into authenticator in listener authentication chain.""" + zh: """为监听器认证链上的指定认证器导入用户数据。""" } } authentication_id_users_post { desc { - en: """Create users for authenticator in global authentication chain""" - zh: """为全局认证链上的认证器创建用户数据""" + en: """Create users for authenticator in global authentication chain.""" + zh: """为全局认证链上的指定认证器创建用户数据。""" } } authentication_id_users_get { desc { - en: """List users in authenticator in global authentication chain""" - zh: """获取全局认证链上指定的认证器中的用户数据""" + en: """List users in authenticator in global authentication chain.""" + zh: """获取全局认证链上指定认证器中的用户数据。""" } } listeners_listener_id_authentication_id_users_post { desc { - en: """Create users for authenticator in listener authentication chain""" - zh: """更新指定监听器上认证器中的用户数据""" + en: """Create users for authenticator in listener authentication chain.""" + zh: """为监听器认证链上的指定认证器创建用户数据。""" } } listeners_listener_id_authentication_id_users_get { desc { - en: """List users in authenticator in listener authentication chain""" - zh: """列出指定监听器上认证器中的用户数据""" + en: """List users in authenticator in listener authentication chain.""" + zh: """列出监听器认证链上指定认证器中的用户数据。""" } } authentication_id_users_user_id_get { desc { - en: """Get user from authenticator in global authentication chain""" - zh: """获取指定监听器上认证器中指定的用户数据""" + en: """Get user from authenticator in global authentication chain.""" + zh: """获取全局认证链上指定认证器中的指定用户数据。""" } } authentication_id_users_user_id_put { desc { - en: """Update user in authenticator in global authentication chain""" - zh: """为指定监听器上认证器添加用户数据""" + en: """Update user in authenticator in global authentication chain.""" + zh: """更新全局认证链上指定认证器中的指定用户数据。""" } } authentication_id_users_user_id_delete { desc { - en: """Update user in authenticator in global authentication chain""" - zh: """更新指定监听器上认证器中的用户数据""" + en: """Delete user in authenticator in global authentication chain.""" + zh: """删除全局认证链上指定认证器中的指定用户数据。""" } } listeners_listener_id_authentication_id_users_user_id_get { desc { - en: """Get user from authenticator in listener authentication chain""" - zh: """获取指定监听器上认证器中指定的用户数据""" + en: """Get user from authenticator in listener authentication chain.""" + zh: """获取监听器认证链上指定认证器中的指定用户数据。""" } } listeners_listener_id_authentication_id_users_user_id_put { desc { - en: """Update user in authenticator in listener authentication chain""" - zh: """更新指定监听器上认证器中的用户数据""" + en: """Update user in authenticator in listener authentication chain.""" + zh: """更新监听器认证链上指定认证器中的指定用户数据。""" } } listeners_listener_id_authentication_id_users_user_id_delete { desc { - en: """Delete user in authenticator in listener authentication chain""" - zh: """删除指定监听器上认证器中的用户数据""" + en: """Delete user in authenticator in listener authentication chain.""" + zh: """删除监听器认证链上指定认证器中的指定用户数据。""" } } param_auth_id { desc { - en: """Authenticator ID""" - zh: """认证器 ID""" + en: """Authenticator ID.""" + zh: """认证器 ID。""" } } param_listener_id { desc { - en: """Listener ID""" - zh: """监听器 ID""" + en: """Listener ID.""" + zh: """监听器 ID。""" } } param_user_id { desc { - en: """User ID""" - zh: """用户 ID""" + en: """User ID.""" + zh: """用户 ID。""" } } like_username { desc { - en: """Fuzzy search username""" - zh: """使用用户名模糊查询""" + en: """Fuzzy search username.""" + zh: """使用用户名模糊查询。""" } label { en: """like_username""" @@ -217,8 +217,8 @@ emqx_authn_api { like_clientid { desc { - en: """Fuzzy search clientid""" - zh: """使用客户端标识符模糊查询""" + en: """Fuzzy search clientid.""" + zh: """使用客户端标识符模糊查询。""" } label { en: """like_clientid""" diff --git a/apps/emqx_authn/i18n/emqx_authn_http_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_http_i18n.conf index 634d5433f..35a5b4973 100644 --- a/apps/emqx_authn/i18n/emqx_authn_http_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_http_i18n.conf @@ -1,88 +1,80 @@ emqx_authn_http { get { desc { - en: """Settings for HTTP-based authentication (GET).""" - zh: """基于 HTTP 的认证请求 (GET)""" - } - label: { - en: """get""" - zh: """get""" + en: """Configuration of authenticator using HTTP Server as authentication service (Using GET request).""" + zh: """使用 HTTP Server 作为认证服务的认证器的配置项 (使用 GET 请求)。""" } } post { desc { - en: """Settings for HTTP-based authentication (POST).""" - zh: """基于 HTTP 的认证请求 (POST)""" - } - label: { - en: """post""" - zh: """post""" + en: """Configuration of authenticator using HTTP Server as authentication service (Using POST request).""" + zh: """使用 HTTP Server 作为认证服务的认证器的配置项 (使用 POST 请求)。""" } } method { desc { - en: """HTTP method.""" - zh: """HTTP 请求方法""" + en: """HTTP request method.""" + zh: """HTTP 请求方法。""" } label: { - en: """method""" + en: """Request Method""" zh: """请求方法""" } } url { desc { - en: """URL of the auth server.""" - zh: """认证服务器地址""" + en: """URL of the HTTP server.""" + zh: """HTTP 服务器地址。""" } label: { - en: """url""" - zh: """统一资源定位符""" + en: """URL""" + zh: """URL""" } } headers { desc { - en: """List of HTTP headers.""" - zh: """HTTP 请求头列表""" + en: """HTTP request headers.""" + zh: """HTTP request headers。""" } label: { - en: """headers""" - zh: """请求头""" + en: """Request Headers""" + zh: """Request Headers""" } } headers_no_content_type { desc { - en: """List of HTTP headers. (without content-type)""" - zh: """HTTP 请求头列表(无 content-type)""" + en: """HTTP request headers (without content-type).""" + zh: """HTTP request headers(无 content-type)。""" } label: { - en: """headers_no_content_type""" - zh: """无content_type的请求头""" + en: """Request Headers""" + zh: """Request Headers""" } } body { desc { - en: """Body of the HTTP request.""" - zh: """HTTP 请求体""" + en: """HTTP request body.""" + zh: """HTTP request body。""" } label: { - en: """body""" - zh: """请求体""" + en: """Request Body""" + zh: """Request Body""" } } request_timeout { desc { - en: """HTTP request timeout""" - zh: """HTTP 请求超时时长""" + en: """HTTP request timeout.""" + zh: """HTTP 请求超时时长。""" } label: { - en: """request_timeout""" + en: """Request Timeout""" zh: """请求超时时间""" } } diff --git a/apps/emqx_authn/i18n/emqx_authn_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_i18n.conf deleted file mode 100644 index b2573357c..000000000 --- a/apps/emqx_authn/i18n/emqx_authn_i18n.conf +++ /dev/null @@ -1,155 +0,0 @@ -emqx_authn_schema { - enable { - desc { - en: """Set to true or false to disable this auth provider""" - zh: """设为 truefalse 以启用或禁用此认证数据源""" - } - label: { - en: """enable""" - zh: """启用""" - } - } - - mechanism { - desc { - en: """Authentication mechanism.""" - zh: """认证机制""" - } - label: { - en: """mechanism""" - zh: """机制""" - } - } - - backend { - desc { - en: """Backend type.""" - zh: """后端类型""" - } - label: { - en: """backend""" - zh: """后端""" - } - } - - metrics { - desc { - en: """The metrics of the resource""" - zh: """统计指标""" - } - label: { - en: """metrics""" - zh: """指标""" - } - } - - node_metrics { - desc { - en: """The metrics of the resource for each node""" - zh: """每个节点上资源的统计指标""" - } - label: { - en: """node_metrics""" - zh: """节点指标""" - } - } - - status { - desc { - en: """The status of the resource""" - zh: """资源状态""" - } - label: { - en: """status""" - zh: """状态""" - } - } - - node_status { - desc { - en: """The status of the resource for each node""" - zh: """每个节点上资源的状态""" - } - label: { - en: """node_status""" - zh: """节点状态""" - } - } - - matched { - desc { - en: """Count of this resource is queried""" - zh: """请求命中次数""" - } - label: { - en: """matched""" - zh: """已命中""" - } - } - - success { - desc { - en: """Count of query success""" - zh: """请求成功次数""" - } - label: { - en: """success""" - zh: """成功""" - } - } - - failed { - desc { - en: """Count of query failed""" - zh: """请求失败次数""" - } - label: { - en: """failed""" - zh: """失败""" - } - } - - rate { - desc { - en: """The rate of matched, times/second""" - zh: """命中速率,单位: 次/秒""" - } - label: { - en: """rate""" - zh: """速率""" - } - } - - rate_max { - desc { - en: """The max rate of matched, times/second""" - zh: """最大命中速率,单位: 次/秒""" - } - label: { - en: """rate_max""" - zh: """最大速率""" - } - } - - rate_last5m { - desc { - en: """The average rate of matched in the last 5 minutes, times/second""" - zh: """5分钟内平均命中速率,单位: 次/秒""" - } - label: { - en: """rate_last5m""" - zh: """5分钟内速率""" - } - } - - node { - desc { - en: """The node name""" - zh: """节点名""" - } - label: { - en: """node""" - zh: """节点""" - } - } -} diff --git a/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf index 91290a0ed..5c3568c25 100644 --- a/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_jwt_i18n.conf @@ -1,30 +1,30 @@ emqx_authn_jwt { use_jwks { desc { - en: """JWKs flag""" - zh: """jwks 状态""" + en: """Whether to use JWKS.""" + zh: """是否使用 JWKS。""" } label { - en: """use_jwks""" - zh: """使用jwks""" + en: """Whether to Use JWKS""" + zh: """是否使用 JWKS""" } } algorithm { desc { - en: """Signing algorithm.""" - zh: """签名算法""" + en: """JWT signing algorithm, Supports HMAC (configured as hmac-based) and RSA, ECDSA (configured as public-key).""" + zh: """JWT 签名算法,支持 HMAC (配置为 hmac-based)和 RSA、ECDSA (配置为 public-key)。""" } label { - en: """Algorithm""" - zh: """算法""" + en: """JWT Signing Algorithm""" + zh: """JWT 签名算法""" } } certificate { desc { - en: """The certificate used for signing the token.""" - zh: """用于签名token的证书""" + en: """The public key used to verify the JWT.""" + zh: """用于验证 JWT 的公钥。""" } label { en: """Certificate""" @@ -34,52 +34,52 @@ emqx_authn_jwt { secret_base64_encoded { desc { - en: """Enable/disable base64 encoding of the secret.""" - zh: """启用/关闭私私钥 base64 编码""" + en: """Whether secret is base64 encoded.""" + zh: """密钥是否为 Base64 编码。""" } label { - en: """Secret with base64 encoded""" - zh: """密钥 base64 编码""" + en: """Whether Secret is Base64 Encoded""" + zh: """密钥是否为 Base64 编码""" } } secret { desc { - en: """The key to verify the JWT Token using HMAC algorithm.""" - zh: """使用对称加密的算法""" + en: """The key to verify the JWT using HMAC algorithm.""" + zh: """使用 HMAC 算法时用于验证 JWT 的密钥""" } label { en: """Secret""" - zh: """密钥""" + zh: """Secret""" } } endpoint { desc { - en: """JWKs endpoint""" - zh: """JWKs endpoint""" + en: """JWKS endpoint, it's a read-only endpoint that returns the server's public key set in the JWKS format.""" + zh: """JWKS 端点, 它是一个以 JWKS 格式返回服务端的公钥集的只读端点。""" } label { - en: """Endpoint""" - zh: """Endpoint""" + en: """JWKS Endpoint""" + zh: """JWKS Endpoint""" } } refresh_interval { desc { - en: """JWKs refresh interval""" - zh: """JWKs 更新间隔""" + en: """JWKS refresh interval.""" + zh: """JWKS 刷新间隔。""" } label { - en: """Refresh Interval""" - zh: """更新间隔""" + en: """JWKS Refresh Interval""" + zh: """JWKS 刷新间隔""" } } cacertfile { desc { - en: """Path to the SSL CA certificate file.""" - zh: """SSL CA 证书公钥文件路径""" + en: """Path to a file containing PEM-encoded CA certificates.""" + zh: """包含 PEM 编码的 CA 证书的文件的路径。""" } label { en: """CA Certificate File""" @@ -89,8 +89,8 @@ emqx_authn_jwt { certfile { desc { - en: """Path to the SSL certificate file.""" - zh: """证书文件路径""" + en: """Path to a file containing the user certificate.""" + zh: """包含用户证书的文件的路径。""" } label { en: """Certificate File""" @@ -100,8 +100,8 @@ emqx_authn_jwt { keyfile { desc { - en: """Path to the SSL secret key file.""" - zh: """SSL 私钥文件路径""" + en: """Path to a file containing the user's private PEM-encoded key.""" + zh: """包含 PEM 编码的用户私钥的文件的路径。""" } label { en: """Key File""" @@ -112,7 +112,7 @@ emqx_authn_jwt { verify { desc { en: """Enable or disable SSL peer verification.""" - zh: """指定握手过程中是否校验客户端""" + zh: """指定握手过程中是否校验对端证书。""" } label { en: """Verify""" @@ -122,8 +122,8 @@ emqx_authn_jwt { server_name_indication { desc { - en: """SSL SNI (Server Name Indication)""" - zh: """SSL SNI (服务器名称指示)""" + en: """Server Name Indication (SNI), .""" + zh: """服务器名称指示(SNI),未指定时将使用 endpoint 作为 SNI。""" } label { en: """Server Name Indication""" @@ -144,8 +144,8 @@ emqx_authn_jwt { pool_size { desc { - en: """JWKs connection count""" - zh: """JWKs 连接数量""" + en: """JWKS connection count.""" + zh: """JWKS 连接数量。""" } label { en: """Pool Size""" @@ -156,7 +156,7 @@ emqx_authn_jwt { ssl { desc { en: """SSL options.""" - zh: """SSL 选项""" + zh: """SSL 选项。""" } label { en: """SSL Options""" @@ -167,66 +167,46 @@ emqx_authn_jwt { enable { desc { en: """Enable/disable SSL.""" - zh: """启用/禁用 SSL""" + zh: """启用/禁用 SSL。""" } label { - en: """Enable/disable SSL.""" + en: """Enable/disable SSL""" zh: """启用/禁用 SSL""" } } hmac-based { desc { - en: """Settings for HMAC-based token signing algorithm.""" - zh: """HMAC-based token 签名配置""" - } - label { - en: """hmac-based""" - zh: """hmac-based""" + en: """Configuration when the JWT for authentication is issued using the HMAC algorithm.""" + zh: """用于认证的 JWT 使用 HMAC 算法签发时的配置。""" } } public-key { desc { - en: """Settings for public key-based token signing algorithm.""" - zh: """公钥token签名配置""" - } - label { - en: """public-key""" - zh: """public-key""" + en: """Configuration when the JWT for authentication is issued using RSA or ECDSA algorithm.""" + zh: """用于认证的 JWT 使用 RSA 或 ECDSA 算法签发时的配置。""" } } jwks { desc { - en: """Settings for a signing using JSON Web Key Set (JWKs).""" - zh: """JWks 签名配置""" - } - label { - en: """jwks""" - zh: """jwks""" + en: """Configuration when JWTs used for authentication need to be fetched from the JWKS endpoint.""" + zh: """用于认证的 JWTs 需要从 JWKS 端点获取时的配置。""" } } ssl_disable { desc { - en: """SSL disabled""" - zh: """SSL 关闭""" - } - label { - en: """ssl_disable""" - zh: """关闭SSL""" + en: """SSL configuration.""" + zh: """SSL 配置。""" } } ssl_enable { desc { en: """SSL configuration.""" - zh: """SSL 配置""" - } - label { - en: """ssl_enable""" - zh: """启用SSL""" + zh: """SSL 配置。""" } } } diff --git a/apps/emqx_authn/i18n/emqx_authn_mnesia_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_mnesia_i18n.conf index a545acaa7..5287bf3ef 100644 --- a/apps/emqx_authn/i18n/emqx_authn_mnesia_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_mnesia_i18n.conf @@ -1,23 +1,21 @@ emqx_authn_mnesia { authentication { desc { - en: """Configuration for authentication using the built-in database.""" - zh: """内置数据库认证配置""" - } - label: { - en: """authentication""" - zh: """认证配置""" + en: """Configuration of authenticator using built-in database as authentication data source.""" + zh: """使用内置数据库作为认证数据源的认证器的配置项。""" } } user_id_type { desc { - en: """Authenticate by Client ID or Username.""" - zh: """认证类型,基于 Client ID 或 Username""" + en: """Specify whether to use ClientID or Username as User ID for authentication.""" + zh: """指定使用 ClientID 还是 Username 作为 User ID 进行认证。""" } + label: { - en: """user_id_type""" - zh: """用户标识类型""" + en: """User ID Type""" + zh: """用户 ID 类型""" } } + } diff --git a/apps/emqx_authn/i18n/emqx_authn_mongo_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_mongo_i18n.conf deleted file mode 100644 index 740d842ec..000000000 --- a/apps/emqx_authn/i18n/emqx_authn_mongo_i18n.conf +++ /dev/null @@ -1,99 +0,0 @@ -emqx_authn_mongodb { - standalone { - desc { - en: """Configuration for a standalone MongoDB instance.""" - zh: """MongoDB 单节点认证配置""" - } - label: { - en: """standalone""" - zh: """standalone 模式""" - } - } - - replica-set { - desc { - en: """Configuration for a replica set.""" - zh: """MongoDB replica set 模式认证配置""" - } - label: { - en: """replica-set""" - zh: """replica-set 模式""" - } - } - - sharded-cluster { - desc { - en: """Configuration for a sharded cluster.""" - zh: """MongoDB sharded cluster 模式认证配置""" - } - label: { - en: """sharded-cluster""" - zh: """sharded-cluster 模式""" - } - } - - collection { - desc { - en: """Collection used to store authentication data.""" - zh: """认证数据集名称""" - } - label: { - en: """collection""" - zh: """数据集""" - } - } - - selector { - desc { - en: """ -Statement that is executed during the authentication process. -Commands can support following wildcards:\n -- `${username}`: substituted with client's username\n -- `${clientid}`: substituted with the clientid -""" - zh: """ -认证过程中所使用的查询命令。 -查询命令支持如下占位符: -- `${username}`: 代替客户端的用户名 -- `${clientid}`: 代替客户端的客户端标识符 -""" - } - label: { - en: """selector""" - zh: """认证查询""" - } - } - - password_hash_field { - desc { - en: """Document field that contains password hash.""" - zh: """数据文档中的密码散列值""" - } - label: { - en: """password_hash_field""" - zh: """密码散列字段""" - } - } - - salt_field { - desc { - en: """Document field that contains the password salt.""" - zh: """数据文档中的密码加盐""" - } - label: { - en: """salt_field""" - zh: """加盐字段""" - } - } - - is_superuser_field { - desc { - en: """Document field that defines if the user has superuser privileges.""" - zh: """数据文档中的超级用户权限记录""" - } - label: { - en: """is_superuser_field""" - zh: """超级用户字段""" - } - } -} diff --git a/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf new file mode 100644 index 000000000..b96544f29 --- /dev/null +++ b/apps/emqx_authn/i18n/emqx_authn_mongodb_i18n.conf @@ -0,0 +1,87 @@ +emqx_authn_mongodb { + standalone { + desc { + en: """Configuration of authenticator using MongoDB (Standalone) as authentication data source.""" + zh: """使用 MongoDB (Standalone) 作为认证数据源的认证器的配置项。""" + } + } + + replica-set { + desc { + en: """Configuration of authenticator using MongoDB (Replica Set) as authentication data source.""" + zh: """使用 MongoDB (Replica Set) 作为认证数据源的认证器的配置项。""" + } + } + + sharded-cluster { + desc { + en: """Configuration of authenticator using MongoDB (Sharded Cluster) as authentication data source.""" + zh: """使用 MongoDB (Sharded Cluster) 作为认证数据源的认证器的配置项。""" + } + } + + collection { + desc { + en: """Collection used to store authentication data.""" + zh: """存储认证数据的集合。""" + } + label: { + en: """Collection""" + zh: """集合""" + } + } + + selector { + desc { + en: """ +Statement that is executed during the authentication process. +Commands can support following wildcards:\n +- `${username}`: substituted with client's username\n +- `${clientid}`: substituted with the clientid +""" + zh: """ +认证过程中所使用的查询命令。 +查询命令支持如下占位符: +- `${username}`: 将在运行时被替换为客户端连接时使用的用户名 +- `${clientid}`: 将在运行时被替换为客户端连接时使用的客户端标识符 +""" + } + label: { + en: """Selector""" + zh: """查询""" + } + } + + password_hash_field { + desc { + en: """Document field that contains password hash.""" + zh: """文档中用于存放密码散列的字段。""" + } + label: { + en: """Password Hash Field""" + zh: """密码散列字段""" + } + } + + salt_field { + desc { + en: """Document field that contains the password salt.""" + zh: """文档中用于存放盐值的字段。""" + } + label: { + en: """Salt Field""" + zh: """盐值字段""" + } + } + + is_superuser_field { + desc { + en: """Document field that defines if the user has superuser privileges.""" + zh: """文档中用于定义用户是否具有超级用户权限的字段。""" + } + label: { + en: """Is Superuser Field""" + zh: """超级用户字段""" + } + } +} diff --git a/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf index 2a6d86055..4ddfd5701 100644 --- a/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_mysql_i18n.conf @@ -1,34 +1,30 @@ emqx_authn_mysql { authentication { desc { - en: """Configuration for authentication using MySQL database.""" - zh: """MySQL 认证配置""" - } - label: { - en: """Authentication Options""" - zh: """认证配置""" + en: """Configuration of authenticator using MySQL as authentication data source.""" + zh: """使用 MySQL 作为认证数据源的认证器的配置项。""" } } query { desc { - en: """SQL query used to lookup client data.""" - zh: """客户端数据查询 SQL 语句""" + en: """SQL used to query data for authentication, such as password hash.""" + zh: """用于查询密码散列等用于认证的数据的 SQL 语句。""" } label: { - en: """SQL Query""" - zh: """SQL 查询语句""" + en: """Query""" + zh: """查询语句""" } } query_timeout { desc { en: """Timeout for the SQL query.""" - zh: """SQL 查询超时时长""" + zh: """SQL 查询的超时时间。""" } label: { en: """Query Timeout""" - zh: """请求超时""" + zh: """查询超时""" } } } diff --git a/apps/emqx_authn/i18n/emqx_authn_pgsql_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_pgsql_i18n.conf index 4f936be1d..298e38774 100644 --- a/apps/emqx_authn/i18n/emqx_authn_pgsql_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_pgsql_i18n.conf @@ -1,23 +1,19 @@ emqx_authn_pgsql { authentication { desc { - en: """Configuration for PostgreSQL authentication backend.""" - zh: """PostgreSQL 认证配置""" - } - label: { - en: """authentication""" - zh: """认证配置""" + en: """Configuration of authenticator using PostgreSQL as authentication data source.""" + zh: """使用 PostgreSQL 作为认证数据源的认证器的配置项。""" } } query { desc { - en: """`SQL` query for looking up authentication data.""" - zh: """客户端数据查询 SQL 语句""" + en: """SQL used to query data for authentication, such as password hash.""" + zh: """用于查询密码散列等用于认证的数据的 SQL 语句。""" } label: { - en: """query""" - zh: """请求""" + en: """Query""" + zh: """查询语句""" } } } diff --git a/apps/emqx_authn/i18n/emqx_authn_redis_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_redis_i18n.conf index 0ae12b959..fd24ed3d7 100644 --- a/apps/emqx_authn/i18n/emqx_authn_redis_i18n.conf +++ b/apps/emqx_authn/i18n/emqx_authn_redis_i18n.conf @@ -1,45 +1,33 @@ emqx_authn_redis { standalone { desc { - en: """Configuration for a standalone Redis instance.""" - zh: """Redis 单节点认证配置""" - } - label: { - en: """standalone""" - zh: """standalone""" + en: """Configuration of authenticator using Redis (Standalone) as authentication data source.""" + zh: """使用 Redis (Standalone) 作为认证数据源的认证器的配置项。""" } } cluster { desc { - en: """Configuration for a Redis cluster.""" - zh: """Redis 集群模式认证配置""" - } - label: { - en: """cluster""" - zh: """cluster""" + en: """Configuration of authenticator using Redis (Cluster) as authentication data source.""" + zh: """使用 Redis (Cluster) 作为认证数据源的认证器的配置项。""" } } sentinel { desc { - en: """Configuration for a Redis Sentinel.""" - zh: """Redis 哨兵模式认证配置""" - } - label: { - en: """sentinel""" - zh: """sentinel""" + en: """Configuration of authenticator using Redis (Sentinel) as authentication data source.""" + zh: """使用 Redis (Sentinel) 作为认证数据源的认证器的配置项。""" } } cmd { desc { - en: """Database query used to retrieve authentication data.""" - zh: """Redis 认证数据查询语句""" + en: """The Redis Command used to query data for authentication such as password hash, currently only supports HGET and HMGET.""" + zh: """用于查询密码散列等用于认证的数据的 Redis Command,目前仅支持 HGET 与 HMGET。""" } label: { - en: """cmd""" - zh: """查询命令""" + en: """Command""" + zh: """Command""" } } } diff --git a/apps/emqx_authn/i18n/emqx_authn_schema_i18n.conf b/apps/emqx_authn/i18n/emqx_authn_schema_i18n.conf new file mode 100644 index 000000000..6caa1808f --- /dev/null +++ b/apps/emqx_authn/i18n/emqx_authn_schema_i18n.conf @@ -0,0 +1,155 @@ +emqx_authn_schema { + enable { + desc { + en: """Set to true or false to disable this auth provider.""" + zh: """设为 truefalse 以启用或禁用此认证数据源。""" + } + label: { + en: """Enable""" + zh: """启用""" + } + } + + mechanism { + desc { + en: """Authentication mechanism.""" + zh: """认证机制。""" + } + label: { + en: """Authentication Mechanism""" + zh: """认证机制""" + } + } + + backend { + desc { + en: """Backend type.""" + zh: """后端类型。""" + } + label: { + en: """Backend Type""" + zh: """后端类型""" + } + } + + metrics { + desc { + en: """The metrics of the resource.""" + zh: """资源统计指标。""" + } + label: { + en: """Metrics""" + zh: """指标""" + } + } + + node_metrics { + desc { + en: """The metrics of the resource for each node.""" + zh: """每个节点上资源的统计指标。""" + } + label: { + en: """Resource Metrics in Node""" + zh: """节点资源指标""" + } + } + + status { + desc { + en: """The status of the resource.""" + zh: """资源状态。""" + } + label: { + en: """Status""" + zh: """状态""" + } + } + + node_status { + desc { + en: """The status of the resource for each node.""" + zh: """每个节点上资源的状态。""" + } + label: { + en: """Resource Status in Node""" + zh: """节点资源状态""" + } + } + + matched { + desc { + en: """Count of this resource is queried.""" + zh: """请求命中次数。""" + } + label: { + en: """Matched""" + zh: """已命中""" + } + } + + success { + desc { + en: """Count of query success.""" + zh: """请求成功次数。""" + } + label: { + en: """Success""" + zh: """成功""" + } + } + + failed { + desc { + en: """Count of query failed.""" + zh: """请求失败次数。""" + } + label: { + en: """Failed""" + zh: """失败""" + } + } + + rate { + desc { + en: """The rate of matched, times/second.""" + zh: """命中速率,单位:次/秒。""" + } + label: { + en: """Rate""" + zh: """速率""" + } + } + + rate_max { + desc { + en: """The max rate of matched, times/second.""" + zh: """最大命中速率,单位:次/秒。""" + } + label: { + en: """Max Rate""" + zh: """最大速率""" + } + } + + rate_last5m { + desc { + en: """The average rate of matched in the last 5 minutes, times/second.""" + zh: """5分钟内平均命中速率,单位:次/秒。""" + } + label: { + en: """Rate in Last 5min""" + zh: """5分钟内速率""" + } + } + + node { + desc { + en: """Node name.""" + zh: """节点名称。""" + } + label: { + en: """Node Name.""" + zh: """节点名称。""" + } + } +} diff --git a/apps/emqx_dashboard/etc/emqx_dashboard.conf b/apps/emqx_dashboard/etc/emqx_dashboard.conf index f0d77c589..e727460e6 100644 --- a/apps/emqx_dashboard/etc/emqx_dashboard.conf +++ b/apps/emqx_dashboard/etc/emqx_dashboard.conf @@ -3,7 +3,7 @@ ##-------------------------------------------------------------------- dashboard { - default_username = "admin" + default_username = "test" default_password = "public" ## Note: sample_interval should be a divisor of 60. ## like 1s, 2s, 3s, 5s, 10s, 12s, 15s, 20s, 30s, 60s