diff --git a/locale/en_US/LC_MESSAGES/koko.po b/locale/en_US/LC_MESSAGES/koko.po index 064dc58a..40679cac 100644 --- a/locale/en_US/LC_MESSAGES/koko.po +++ b/locale/en_US/LC_MESSAGES/koko.po @@ -92,13 +92,18 @@ msgstr "" #. lang.T #: pkg/handler/asset.go:223 msgid "" -"Face verification is not supported yet. Please use the WebTerminal to " -"connect the asset." +"Face ACL is not supported yet. Please use the WebTerminal to connect the " +"asset." msgstr "" #. lang.T #. lang.T -#: pkg/handler/asset.go:238 pkg/handler/asset.go:255 +#: pkg/handler/asset.go:238 pkg/handler/asset.go:247 +msgid "Unknown error code: %s, detail: %s" +msgstr "" + +#. lang.T +#: pkg/handler/asset.go:258 msgid "get connect token err" msgstr "" @@ -233,12 +238,18 @@ msgstr "" #. lang.T #. lang.T #. lang.T +#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 +#: pkg/handler/direct_handler.go:445 +msgid "" +"Face verification is not supported yet. Please use the WebTerminal to " +"connect the asset." +msgstr "" + #. lang.T #. lang.T #. lang.T -#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 -#: pkg/handler/direct_handler.go:445 pkg/handler/direct_handler.go:460 -#: pkg/handler/direct_handler.go:476 pkg/handler/dispatch.go:139 +#: pkg/handler/direct_handler.go:460 pkg/handler/direct_handler.go:476 +#: pkg/handler/dispatch.go:139 msgid "Node: [ ID.Name(Asset amount) ]" msgstr "" diff --git a/locale/ja_JP/LC_MESSAGES/koko.po b/locale/ja_JP/LC_MESSAGES/koko.po index 68ae364d..f0af95da 100644 --- a/locale/ja_JP/LC_MESSAGES/koko.po +++ b/locale/ja_JP/LC_MESSAGES/koko.po @@ -99,14 +99,20 @@ msgstr "は拒否されました" #: pkg/handler/asset.go:223 #, fuzzy msgid "" -"Face verification is not supported yet. Please use the WebTerminal to " -"connect the asset." +"Face ACL is not supported yet. Please use the WebTerminal to connect the " +"asset." msgstr "" -"顔認証はまだサポートされていません。資産に接続するにはWebTerminalをご利用ください" +"該端末は顔認証アクセスルールをサポートしていません。資産に接続するにはWebTerminalをご利用くだ" +"さい" #. lang.T #. lang.T -#: pkg/handler/asset.go:238 pkg/handler/asset.go:255 +#: pkg/handler/asset.go:238 pkg/handler/asset.go:247 +msgid "Unknown error code: %s, detail: %s" +msgstr "不明なエラーコード: %s, 詳細: %s" + +#. lang.T +#: pkg/handler/asset.go:258 msgid "get connect token err" msgstr "接続トークン取得エラー" @@ -245,12 +251,21 @@ msgstr "一致したユーザー名 %s が見つかりません" #. lang.T #. lang.T #. lang.T +#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 +#: pkg/handler/direct_handler.go:445 +#, fuzzy +msgid "" +"Face verification is not supported yet. Please use the WebTerminal to " +"connect the asset." +msgstr "" +"顔認証はまだサポートされていません。資産に接続するにはWebTerminalをご利用くだ" +"さい" + #. lang.T #. lang.T #. lang.T -#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 -#: pkg/handler/direct_handler.go:445 pkg/handler/direct_handler.go:460 -#: pkg/handler/direct_handler.go:476 pkg/handler/dispatch.go:139 +#: pkg/handler/direct_handler.go:460 pkg/handler/direct_handler.go:476 +#: pkg/handler/dispatch.go:139 msgid "Node: [ ID.Name(Asset amount) ]" msgstr "ノード: [ID.Name(アセット量)]" diff --git a/locale/zh_CN/LC_MESSAGES/koko.po b/locale/zh_CN/LC_MESSAGES/koko.po index 6796beb5..b801c4b4 100644 --- a/locale/zh_CN/LC_MESSAGES/koko.po +++ b/locale/zh_CN/LC_MESSAGES/koko.po @@ -100,13 +100,18 @@ msgstr "本次登录已拒绝,原因是访问控制策略的限制" #: pkg/handler/asset.go:223 #, fuzzy msgid "" -"Face verification is not supported yet. Please use the WebTerminal to " -"connect the asset." -msgstr "该终端不支持人脸识别认证,请使用web终端登录" +"Face ACL is not supported yet. Please use the WebTerminal to connect the " +"asset." +msgstr "该终端不支持人脸访问规则,请使用web终端登录" #. lang.T #. lang.T -#: pkg/handler/asset.go:238 pkg/handler/asset.go:255 +#: pkg/handler/asset.go:238 pkg/handler/asset.go:247 +msgid "Unknown error code: %s, detail: %s" +msgstr "未知错误代码:%s,详情:%s" + +#. lang.T +#: pkg/handler/asset.go:258 msgid "get connect token err" msgstr "获取 connect token 错误" @@ -252,12 +257,19 @@ msgstr "未发现匹配的用户名 %s" #. lang.T #. lang.T #. lang.T +#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 +#: pkg/handler/direct_handler.go:445 +#, fuzzy +msgid "" +"Face verification is not supported yet. Please use the WebTerminal to " +"connect the asset." +msgstr "该终端不支持人脸识别认证,请使用web终端登录" + #. lang.T #. lang.T #. lang.T -#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 -#: pkg/handler/direct_handler.go:445 pkg/handler/direct_handler.go:460 -#: pkg/handler/direct_handler.go:476 pkg/handler/dispatch.go:139 +#: pkg/handler/direct_handler.go:460 pkg/handler/direct_handler.go:476 +#: pkg/handler/dispatch.go:139 msgid "Node: [ ID.Name(Asset amount) ]" msgstr "节点:[ ID.名称(资产数量) ]" diff --git a/locale/zh_Hant/LC_MESSAGES/koko.po b/locale/zh_Hant/LC_MESSAGES/koko.po index 96d192e9..7612ef22 100644 --- a/locale/zh_Hant/LC_MESSAGES/koko.po +++ b/locale/zh_Hant/LC_MESSAGES/koko.po @@ -100,13 +100,18 @@ msgstr "本次登入已拒絕,原因是訪問控制策略的限制" #: pkg/handler/asset.go:223 #, fuzzy msgid "" -"Face verification is not supported yet. Please use the WebTerminal to " -"connect the asset." +"Face ACL is not supported yet. Please use the WebTerminal to connect the " +"asset." msgstr "該終端不支持人臉識別認證,請使用網頁終端登錄" #. lang.T #. lang.T -#: pkg/handler/asset.go:238 pkg/handler/asset.go:255 +#: pkg/handler/asset.go:238 pkg/handler/asset.go:247 +msgid "Unknown error code: %s, detail: %s" +msgstr "未知錯誤碼:%s,詳情:%s" + +#. lang.T +#: pkg/handler/asset.go:258 msgid "get connect token err" msgstr "獲取 connect token 錯誤" @@ -252,12 +257,19 @@ msgstr "未發現匹配的使用者名稱 %s" #. lang.T #. lang.T #. lang.T +#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 +#: pkg/handler/direct_handler.go:445 +#, fuzzy +msgid "" +"Face verification is not supported yet. Please use the WebTerminal to " +"connect the asset." +msgstr "該終端不支持人臉識別認證,請使用網頁終端登錄" + #. lang.T #. lang.T #. lang.T -#: pkg/handler/direct_handler.go:433 pkg/handler/direct_handler.go:439 -#: pkg/handler/direct_handler.go:445 pkg/handler/direct_handler.go:460 -#: pkg/handler/direct_handler.go:476 pkg/handler/dispatch.go:139 +#: pkg/handler/direct_handler.go:460 pkg/handler/direct_handler.go:476 +#: pkg/handler/dispatch.go:139 msgid "Node: [ ID.Name(Asset amount) ]" msgstr "節點:[ ID.名稱(資產數量) ]" diff --git a/pkg/handler/asset.go b/pkg/handler/asset.go index 92b2a601..0f30224b 100644 --- a/pkg/handler/asset.go +++ b/pkg/handler/asset.go @@ -217,10 +217,10 @@ func (u *UserSelectHandler) proxyAsset(asset model.PermAsset) { utils.IgnoreErrWriteString(u.h.term, lang.T("ACL reject")) utils.IgnoreErrWriteString(u.h.term, utils.CharNewLine) return - case model.ACLFaceVerify: + case model.ACLFaceVerify, model.ACLFaceOnline, model.ACLFaceOnlineNotSupported: // todo: 需要人脸验证 后续需要发站内信通知用户,并且等待用户人脸验证通过 logger.Errorf("Create connect token and auth info failed: %s %s", tokenInfo.Code, tokenInfo.Detail) - msg := lang.T("Face verification is not supported yet. Please use the WebTerminal to connect the asset.") + msg := lang.T("Face ACL is not supported yet. Please use the WebTerminal to connect the asset.") utils.IgnoreErrWriteString(u.h.term, msg) utils.IgnoreErrWriteString(u.h.term, utils.CharNewLine) return @@ -244,6 +244,9 @@ func (u *UserSelectHandler) proxyAsset(asset model.PermAsset) { } tokenInfo = reviewHandler.tokenInfo default: + msg := lang.T("Unknown error code: %s, detail: %s") + utils.IgnoreErrWriteString(u.h.term, fmt.Sprintf(msg, tokenInfo.Code, tokenInfo.Detail)) + utils.IgnoreErrWriteString(u.h.term, utils.CharNewLine) logger.Errorf("Create connect token and auth info failed: %s %s", tokenInfo.Code, tokenInfo.Detail) return } diff --git a/pkg/jms-sdk-go/model/token.go b/pkg/jms-sdk-go/model/token.go index 3dcf33c4..f8347330 100644 --- a/pkg/jms-sdk-go/model/token.go +++ b/pkg/jms-sdk-go/model/token.go @@ -70,7 +70,9 @@ const ( ACLReview = "acl_review" ACLReject = "acl_reject" - ACLFaceVerify = "acl_face_verify" + ACLFaceVerify = "acl_face_verify" + ACLFaceOnline = "acl_face_online" + ACLFaceOnlineNotSupported = "acl_face_online_not_supported" ) type ConnectOptions struct {