perf: i18n settings-Auth done.

pull/12719/head
Bai 2024-02-27 11:25:42 +08:00
parent 10394dbb1c
commit c8b274031f
13 changed files with 76 additions and 88 deletions

View File

@ -50,7 +50,7 @@ class PrepareRequestMixin:
if idp_metadata_xml.strip():
xml_idp_settings = IdPMetadataParse.parse(idp_metadata_xml)
except Exception as err:
logger.warning('Failed to get IDP metadata XML settings, error: %s', str(err))
logger.warning('Failed to get IDP Metadata XML settings, error: %s', str(err))
url_idp_settings = None
try:
@ -59,7 +59,7 @@ class PrepareRequestMixin:
idp_metadata_url, timeout=20
)
except Exception as err:
logger.warning('Failed to get IDP metadata URL settings, error: %s', str(err))
logger.warning('Failed to get IDP Metadata URL settings, error: %s', str(err))
idp_settings = url_idp_settings or xml_idp_settings

View File

@ -5099,11 +5099,11 @@ msgid "Client Secret"
msgstr ""
#: settings/serializers/auth/oauth2.py:39 settings/serializers/auth/oidc.py:68
msgid "Provider auth endpoint"
msgid "Authorization endpoint"
msgstr ""
#: settings/serializers/auth/oauth2.py:42 settings/serializers/auth/oidc.py:71
msgid "Provider token endpoint"
msgid "Token endpoint"
msgstr ""
#: settings/serializers/auth/oauth2.py:45 settings/serializers/auth/oidc.py:30
@ -5111,11 +5111,11 @@ msgid "Client authentication method"
msgstr ""
#: settings/serializers/auth/oauth2.py:49 settings/serializers/auth/oidc.py:77
msgid "Provider userinfo endpoint"
msgid "Userinfo endpoint"
msgstr ""
#: settings/serializers/auth/oauth2.py:52 settings/serializers/auth/oidc.py:80
msgid "Provider end session endpoint"
msgid "End session endpoint"
msgstr ""
#: settings/serializers/auth/oauth2.py:59 settings/serializers/auth/oidc.py:98
@ -5136,7 +5136,7 @@ msgid "Share session"
msgstr ""
#: settings/serializers/auth/oidc.py:34
msgid "Ignore ssl verification"
msgid "Ignore SSL verification"
msgstr ""
#: settings/serializers/auth/oidc.py:38
@ -5166,15 +5166,15 @@ msgid "Provider endpoint"
msgstr ""
#: settings/serializers/auth/oidc.py:74
msgid "Provider jwks endpoint"
msgid "JWKS endpoint"
msgstr ""
#: settings/serializers/auth/oidc.py:83
msgid "Provider sign alg"
msgid "Signature algorithm"
msgstr ""
#: settings/serializers/auth/oidc.py:86
msgid "Provider sign key"
msgid "Signing key"
msgstr ""
#: settings/serializers/auth/oidc.py:88
@ -5182,11 +5182,11 @@ msgid "Scopes"
msgstr ""
#: settings/serializers/auth/oidc.py:90
msgid "Id token max age (s)"
msgid "ID Token max age (s)"
msgstr ""
#: settings/serializers/auth/oidc.py:93
msgid "Id token include claims"
msgid "ID Token include claims"
msgstr ""
#: settings/serializers/auth/oidc.py:95
@ -5228,11 +5228,11 @@ msgid "SAML2"
msgstr ""
#: settings/serializers/auth/saml2.py:16
msgid "IDP metadata URL"
msgid "IDP Metadata URL"
msgstr ""
#: settings/serializers/auth/saml2.py:19
msgid "IDP metadata XML"
msgid "IDP Metadata XML"
msgstr ""
#: settings/serializers/auth/saml2.py:22
@ -5315,10 +5315,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: settings/serializers/auth/sms.py:106
msgid "Request method"
msgstr ""
#: settings/serializers/auth/sso.py:16
msgid "Enable SSO auth"
msgstr ""

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6da7aefc64a80f4087d6067571d10f37da3b328abf175feb380a717931313257
size 168890
oid sha256:6386a18d95935085c5b31597f5de7f93887f01d7e41a896e28931b6c6b6365b6
size 168785

View File

@ -5257,23 +5257,23 @@ msgid "Client Secret"
msgstr "クライアント秘密"
#: settings/serializers/auth/oauth2.py:39 settings/serializers/auth/oidc.py:68
msgid "Provider auth endpoint"
msgid "Authorization endpoint"
msgstr "認証エンドポイントアドレス"
#: settings/serializers/auth/oauth2.py:42 settings/serializers/auth/oidc.py:71
msgid "Provider token endpoint"
msgid "Token endpoint"
msgstr "プロバイダートークンエンドポイント"
#: settings/serializers/auth/oauth2.py:45 settings/serializers/auth/oidc.py:30
msgid "Client authentication method"
msgid "Request method"
msgstr "クライアント認証方式"
#: settings/serializers/auth/oauth2.py:49 settings/serializers/auth/oidc.py:77
msgid "Provider userinfo endpoint"
msgid "Userinfo endpoint"
msgstr "プロバイダーuserinfoエンドポイント"
#: settings/serializers/auth/oauth2.py:52 settings/serializers/auth/oidc.py:80
msgid "Provider end session endpoint"
msgid "End session endpoint"
msgstr "プロバイダーのセッション終了エンドポイント"
#: settings/serializers/auth/oauth2.py:59 settings/serializers/auth/oidc.py:98
@ -5294,7 +5294,7 @@ msgid "Share session"
msgstr "セッションの共有"
#: settings/serializers/auth/oidc.py:34
msgid "Ignore ssl verification"
msgid "Ignore SSL verification"
msgstr "Ssl検証を無視する"
#: settings/serializers/auth/oidc.py:38
@ -5326,15 +5326,15 @@ msgid "Provider endpoint"
msgstr "プロバイダーエンドポイント"
#: settings/serializers/auth/oidc.py:74
msgid "Provider jwks endpoint"
msgid "JWKS endpoint"
msgstr "プロバイダーjwksエンドポイント"
#: settings/serializers/auth/oidc.py:83
msgid "Provider sign alg"
msgid "Signature algorithm"
msgstr "プロビダーサインalg"
#: settings/serializers/auth/oidc.py:86
msgid "Provider sign key"
msgid "Signing key"
msgstr "プロバイダ署名キー"
#: settings/serializers/auth/oidc.py:88
@ -5342,11 +5342,11 @@ msgid "Scopes"
msgstr "スコープ"
#: settings/serializers/auth/oidc.py:90
msgid "Id token max age (s)"
msgid "ID Token max age (s)"
msgstr "IDトークンの最大年齢 (秒)"
#: settings/serializers/auth/oidc.py:93
msgid "Id token include claims"
msgid "ID Token include claims"
msgstr "IDトークンにはクレームが含まれます"
#: settings/serializers/auth/oidc.py:95
@ -5362,7 +5362,7 @@ msgid "Only SSL domain can use passkey auth"
msgstr "SSLドメインのみがパスキー認証を使用できます"
#: settings/serializers/auth/passkey.py:15
msgid "FIDO server ID"
msgid "FIDO Server ID"
msgstr "FIDOサーバーID"
#: settings/serializers/auth/passkey.py:17
@ -5375,7 +5375,7 @@ msgstr ""
"ます"
#: settings/serializers/auth/passkey.py:22
msgid "FIDO server name"
msgid "FIDO Server name"
msgstr "FIDOサーバー名"
#: settings/serializers/auth/radius.py:13
@ -5391,12 +5391,12 @@ msgid "SAML2"
msgstr "SAML2"
#: settings/serializers/auth/saml2.py:16
msgid "IDP metadata URL"
msgstr "IDP metadata アドレス"
msgid "IDP Metadata URL"
msgstr "IDP Metadataアドレス"
#: settings/serializers/auth/saml2.py:19
msgid "IDP metadata XML"
msgstr "IDP metadata XML"
msgid "IDP Metadata XML"
msgstr "IDP Metadata XML"
#: settings/serializers/auth/saml2.py:22
msgid "SP advanced settings"
@ -5481,10 +5481,6 @@ msgstr "署名+テンプレートの長さは65文字以内"
msgid "URL"
msgstr "URL"
#: settings/serializers/auth/sms.py:106
msgid "Request method"
msgstr "請求方法です"
#: settings/serializers/auth/sso.py:16
msgid "Enable SSO auth"
msgstr "SSO Token認証の有効化"

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb1dbb645c2345048bdbeb9b842a695a222533c0362b8101db18b87bfeaaf326
size 139633
oid sha256:07fc143922960ec9d8f76f3353c8fc8c74cd8a68f0c52cd27686cdf05fca925d
size 139535

View File

@ -5148,23 +5148,23 @@ msgid "Client Secret"
msgstr "客户端密钥"
#: settings/serializers/auth/oauth2.py:39 settings/serializers/auth/oidc.py:68
msgid "Provider auth endpoint"
msgid "Authorization endpoint"
msgstr "授权端点地址"
#: settings/serializers/auth/oauth2.py:42 settings/serializers/auth/oidc.py:71
msgid "Provider token endpoint"
msgid "Token endpoint"
msgstr "token 端点地址"
#: settings/serializers/auth/oauth2.py:45 settings/serializers/auth/oidc.py:30
msgid "Client authentication method"
msgid "Request method"
msgstr "客户端认证方式"
#: settings/serializers/auth/oauth2.py:49 settings/serializers/auth/oidc.py:77
msgid "Provider userinfo endpoint"
msgid "Userinfo endpoint"
msgstr "用户信息端点地址"
#: settings/serializers/auth/oauth2.py:52 settings/serializers/auth/oidc.py:80
msgid "Provider end session endpoint"
msgid "End session endpoint"
msgstr "注销会话端点地址"
#: settings/serializers/auth/oauth2.py:59 settings/serializers/auth/oidc.py:98
@ -5181,7 +5181,7 @@ msgid "Share session"
msgstr "共享会话"
#: settings/serializers/auth/oidc.py:34
msgid "Ignore ssl verification"
msgid "Ignore SSL verification"
msgstr "忽略 SSL 证书验证"
#: settings/serializers/auth/oidc.py:38
@ -5217,15 +5217,15 @@ msgid "Provider endpoint"
msgstr "端点地址"
#: settings/serializers/auth/oidc.py:74
msgid "Provider jwks endpoint"
msgid "JWKS endpoint"
msgstr "jwks 端点地址"
#: settings/serializers/auth/oidc.py:83
msgid "Provider sign alg"
msgid "Signature algorithm"
msgstr "签名算法"
#: settings/serializers/auth/oidc.py:86
msgid "Provider sign key"
msgid "Signing key"
msgstr "签名 Key"
#: settings/serializers/auth/oidc.py:88
@ -5233,11 +5233,11 @@ msgid "Scopes"
msgstr "连接范围"
#: settings/serializers/auth/oidc.py:90
msgid "Id token max age (s)"
msgid "ID Token max age (s)"
msgstr "令牌有效时间 (秒)"
#: settings/serializers/auth/oidc.py:93
msgid "Id token include claims"
msgid "ID Token include claims"
msgstr "声明"
#: settings/serializers/auth/oidc.py:95
@ -5253,7 +5253,7 @@ msgid "Only SSL domain can use passkey auth"
msgstr "只有 SSL 域名可以使用 Passkey(通行密钥)认证"
#: settings/serializers/auth/passkey.py:15
msgid "FIDO server ID"
msgid "FIDO Server ID"
msgstr "Passkey 服务域名"
#: settings/serializers/auth/passkey.py:17
@ -5265,7 +5265,7 @@ msgstr ""
"DOMAINS中), 如果有多个域名,使用逗号分隔, 不需要端口号"
#: settings/serializers/auth/passkey.py:22
msgid "FIDO server name"
msgid "FIDO Server name"
msgstr "Passkey 服务名称"
#: settings/serializers/auth/radius.py:13
@ -5281,12 +5281,12 @@ msgid "SAML2"
msgstr "SAML2"
#: settings/serializers/auth/saml2.py:16
msgid "IDP metadata URL"
msgstr "IDP metadata 地址"
msgid "IDP Metadata URL"
msgstr "IDP Metadata 地址"
#: settings/serializers/auth/saml2.py:19
msgid "IDP metadata XML"
msgstr "IDP metadata XML"
msgstr "IDP Metadata XML"
#: settings/serializers/auth/saml2.py:22
msgid "SP advanced settings"
@ -5370,10 +5370,6 @@ msgstr "模板+签名不能超过65个字"
msgid "URL"
msgstr "URL"
#: settings/serializers/auth/sms.py:106
msgid "Request method"
msgstr "请求方式"
#: settings/serializers/auth/sso.py:16
msgid "Enable SSO auth"
msgstr "启用 SSO 令牌认证"

View File

@ -507,7 +507,7 @@
"Id": "ID",
"IdeaContent": "I want you to act as a Linux terminal. I will input the commands, you will respond with what the terminal should display. I hope you to reply only in a unique code block, not others. No interpretations. When I need to tell you something, I'm gonna put the words in braces {note text}",
"IdeaTitle": "🌱 Linux Terminal",
"IdpMetadataHelpText": "Either IDP metadata URL or IDP metadata XML is acceptable, with IDP metadata URL having higher priority",
"IdpMetadataHelpText": "Either IDP Metadata URL or IDP Metadata XML is acceptable, with IDP Metadata URL having higher priority",
"IdpMetadataUrlHelpText": "Load IDP Metadata from Remote Address",
"ImageName": "Image Name",
"Images": "Image",

View File

@ -501,7 +501,7 @@
"Id": "ID",
"IdeaContent": "我想让你充当一个 Linux 终端。我将输入命令,你将回答终端应该显示的内容。我希望你只在一个独特的代码块内回复终端输出,而不是其他。不要写解释。当我需要告诉你一些事情时,我会把文字放在大括号里{备注文本}。",
"IdeaTitle": "🌱 Linux 终端",
"IdpMetadataHelpText": "IDP metadata URL 和 IDP metadata XML参数二选一即可IDP metadata URL的优先级高",
"IdpMetadataHelpText": "IDP Metadata URL 和 IDP MetadataXML参数二选一即可IDP MetadataURL的优先级高",
"IdpMetadataUrlHelpText": "从远端地址中加载 IDP Metadata",
"ImageName": "镜像名",
"Images": "图片",

View File

@ -36,20 +36,20 @@ class OAuth2SettingSerializer(serializers.Serializer):
required=True, max_length=1024, label=_('Scope'), allow_blank=True
)
AUTH_OAUTH2_PROVIDER_AUTHORIZATION_ENDPOINT = serializers.CharField(
required=True, max_length=1024, label=_('Provider auth endpoint')
required=True, max_length=1024, label=_('Authorization endpoint')
)
AUTH_OAUTH2_ACCESS_TOKEN_ENDPOINT = serializers.CharField(
required=True, max_length=1024, label=_('Provider token endpoint')
required=True, max_length=1024, label=_('Token endpoint')
)
AUTH_OAUTH2_ACCESS_TOKEN_METHOD = serializers.ChoiceField(
default='GET', label=_('Client authentication method'),
default='GET', label=_('Request method'),
choices=(('GET', 'GET'), ('POST', 'POST-DATA'), ('POST_JSON', 'POST-JSON'))
)
AUTH_OAUTH2_PROVIDER_USERINFO_ENDPOINT = serializers.CharField(
required=True, max_length=1024, label=_('Provider userinfo endpoint')
required=True, max_length=1024, label=_('Userinfo endpoint')
)
AUTH_OAUTH2_PROVIDER_END_SESSION_ENDPOINT = serializers.CharField(
required=False, allow_blank=True, max_length=1024, label=_('Provider end session endpoint')
required=False, allow_blank=True, max_length=1024, label=_('End session endpoint')
)
AUTH_OAUTH2_LOGOUT_COMPLETELY = serializers.BooleanField(required=False, label=_('Logout completely'))
AUTH_OAUTH2_USER_ATTR_MAP = serializers.JSONField(

View File

@ -27,11 +27,11 @@ class CommonSettingSerializer(serializers.Serializer):
('client_secret_basic', 'Client Secret Basic'),
('client_secret_post', 'Client Secret Post')
),
label=_('Client authentication method')
label=_('Request method')
)
AUTH_OPENID_SHARE_SESSION = serializers.BooleanField(required=False, label=_('Share session'))
AUTH_OPENID_IGNORE_SSL_VERIFICATION = serializers.BooleanField(
required=False, label=_('Ignore ssl verification')
required=False, label=_('Ignore SSL verification')
)
AUTH_OPENID_USER_ATTR_MAP = serializers.JSONField(
required=True, label=_('User attribute'),
@ -65,32 +65,32 @@ class OIDCSettingSerializer(KeycloakSettingSerializer):
required=False, max_length=1024, label=_('Provider endpoint')
)
AUTH_OPENID_PROVIDER_AUTHORIZATION_ENDPOINT = serializers.CharField(
required=False, max_length=1024, label=_('Provider auth endpoint')
required=False, max_length=1024, label=_('Authorization endpoint')
)
AUTH_OPENID_PROVIDER_TOKEN_ENDPOINT = serializers.CharField(
required=False, max_length=1024, label=_('Provider token endpoint')
required=False, max_length=1024, label=_('Token endpoint')
)
AUTH_OPENID_PROVIDER_JWKS_ENDPOINT = serializers.CharField(
required=False, max_length=1024, label=_('Provider jwks endpoint')
required=False, max_length=1024, label=_('JWKS endpoint')
)
AUTH_OPENID_PROVIDER_USERINFO_ENDPOINT = serializers.CharField(
required=False, max_length=1024, label=_('Provider userinfo endpoint')
required=False, max_length=1024, label=_('Userinfo endpoint')
)
AUTH_OPENID_PROVIDER_END_SESSION_ENDPOINT = serializers.CharField(
required=False, max_length=1024, label=_('Provider end session endpoint')
required=False, max_length=1024, label=_('End session endpoint')
)
AUTH_OPENID_PROVIDER_SIGNATURE_ALG = serializers.CharField(
required=False, max_length=1024, label=_('Provider sign alg')
required=False, max_length=1024, label=_('Signature algorithm')
)
AUTH_OPENID_PROVIDER_SIGNATURE_KEY = serializers.CharField(
required=False, max_length=1024, allow_null=True, label=_('Provider sign key')
required=False, max_length=1024, allow_null=True, label=_('Signing key')
)
AUTH_OPENID_SCOPES = serializers.CharField(required=False, max_length=1024, label=_('Scopes'))
AUTH_OPENID_ID_TOKEN_MAX_AGE = serializers.IntegerField(
required=False, label=_('Id token max age (s)')
required=False, label=_('ID Token max age (s)')
)
AUTH_OPENID_ID_TOKEN_INCLUDE_CLAIMS = serializers.BooleanField(
required=False, label=_('Id token include claims')
required=False, label=_('ID Token include claims')
)
AUTH_OPENID_USE_STATE = serializers.BooleanField(required=False, label=_('Use state'))
AUTH_OPENID_USE_NONCE = serializers.BooleanField(required=False, label=_('Use nonce'))

View File

@ -12,11 +12,11 @@ class PasskeySettingSerializer(serializers.Serializer):
help_text=_('Only SSL domain can use passkey auth')
)
FIDO_SERVER_ID = serializers.CharField(
max_length=255, label=_('FIDO server ID'), required=False, allow_blank=True,
max_length=255, label=_('FIDO Server ID'), required=False, allow_blank=True,
help_text=_(
'The hostname can using passkey auth, If not set, '
'will use request host and the request host in DOMAINS, '
'If multiple domains, use comma to separate'
)
)
FIDO_SERVER_NAME = serializers.CharField(max_length=255, label=_('FIDO server name'))
FIDO_SERVER_NAME = serializers.CharField(max_length=255, label=_('FIDO Server name'))

View File

@ -13,10 +13,10 @@ class SAML2SettingSerializer(serializers.Serializer):
default=False, required=False, label=_('SAML2')
)
SAML2_IDP_METADATA_URL = serializers.URLField(
allow_blank=True, required=False, label=_('IDP metadata URL')
allow_blank=True, required=False, label=_('IDP Metadata URL')
)
SAML2_IDP_METADATA_XML = serializers.CharField(
allow_blank=True, required=False, label=_('IDP metadata XML')
allow_blank=True, required=False, label=_('IDP Metadata XML')
)
SAML2_SP_ADVANCED_SETTINGS = serializers.JSONField(
required=False, label=_('SP advanced settings')

View File

@ -9,7 +9,7 @@ __all__ = ['WeComSettingSerializer']
class WeComSettingSerializer(serializers.Serializer):
PREFIX_TITLE = _('WeCom')
WECOM_CORPID = serializers.CharField(max_length=256, required=True, label='corpid')
WECOM_AGENTID = serializers.CharField(max_length=256, required=True, label='agentid')
WECOM_SECRET = EncryptedField(max_length=256, required=False, label='secret')
WECOM_CORPID = serializers.CharField(max_length=256, required=True, label='Corporation ID')
WECOM_AGENTID = serializers.CharField(max_length=256, required=True, label='App Agent ID')
WECOM_SECRET = EncryptedField(max_length=256, required=False, label='App Secret')
AUTH_WECOM = serializers.BooleanField(default=False, label=_('WeCom'))