chore(i18n): improve i18n

This commit is contained in:
Fu Diwei
2026-08-10 19:17:02 +08:00
parent e685958f7f
commit 97e78943e6
11 changed files with 63 additions and 61 deletions

View File

@@ -501,14 +501,14 @@ type AccessConfigForPowerDNS struct {
type AccessConfigForProxmoxBS struct {
ServerUrl string `json:"serverUrl"`
ApiToken string `json:"apiToken"`
ApiTokenSecret string `json:"apiTokenSecret,omitempty"`
ApiTokenSecret string `json:"apiTokenSecret"`
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
}
type AccessConfigForProxmoxVE struct {
ServerUrl string `json:"serverUrl"`
ApiToken string `json:"apiToken"`
ApiTokenSecret string `json:"apiTokenSecret,omitempty"`
ApiTokenSecret string `json:"apiTokenSecret"`
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
}

View File

@@ -21,7 +21,7 @@ type DeployerConfig struct {
// Proxmox BS API Token。
ApiToken string `json:"apiToken"`
// Proxmox BS API Token Secret。
ApiTokenSecret string `json:"apiTokenSecret,omitempty"`
ApiTokenSecret string `json:"apiTokenSecret"`
// 是否允许不安全的连接。
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
// 节点名称。

View File

@@ -21,10 +21,10 @@ type DeployerConfig struct {
// Proxmox VE API Token。
ApiToken string `json:"apiToken"`
// Proxmox VE API Token Secret。
ApiTokenSecret string `json:"apiTokenSecret,omitempty"`
ApiTokenSecret string `json:"apiTokenSecret"`
// 是否允许不安全的连接。
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
// 集群节点名称。
// 节点名称。
NodeName string `json:"nodeName"`
// 是否自动重启。
AutoRestart bool `json:"autoRestart"`

View File

@@ -43,7 +43,7 @@ const AccessConfigFormFieldsProviderProxmoxBS = () => {
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.proxmoxbs_api_token_secret.tooltip") }}></span>}
>
<Input.Password allowClear autoComplete="new-password" placeholder={t("access.form.proxmoxbs_api_token_secret.placeholder")} />
<Input.Password autoComplete="new-password" placeholder={t("access.form.proxmoxbs_api_token_secret.placeholder")} />
</Form.Item>
<Form.Item
@@ -62,6 +62,7 @@ const getInitialValues = (): Nullish<z.infer<ReturnType<typeof getSchema>>> => {
return {
serverUrl: "http://<your-host-addr>:8007/",
apiToken: "",
apiTokenSecret: "",
};
};
@@ -71,7 +72,7 @@ const getSchema = ({ i18n = getI18n() }: { i18n: ReturnType<typeof getI18n> }) =
return z.object({
serverUrl: z.url({ protocol: z.core.regexes.httpProtocol }),
apiToken: z.string().nonempty(),
apiTokenSecret: z.string().nullish(),
apiTokenSecret: z.string().nonempty(),
allowInsecureConnections: z.boolean().nullish(),
});
};

View File

@@ -43,7 +43,7 @@ const AccessConfigFormFieldsProviderProxmoxVE = () => {
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.proxmoxve_api_token_secret.tooltip") }}></span>}
>
<Input.Password allowClear autoComplete="new-password" placeholder={t("access.form.proxmoxve_api_token_secret.placeholder")} />
<Input.Password autoComplete="new-password" placeholder={t("access.form.proxmoxve_api_token_secret.placeholder")} />
</Form.Item>
<Form.Item
@@ -62,6 +62,7 @@ const getInitialValues = (): Nullish<z.infer<ReturnType<typeof getSchema>>> => {
return {
serverUrl: "http://<your-host-addr>:8006/",
apiToken: "",
apiTokenSecret: "",
};
};
@@ -71,7 +72,7 @@ const getSchema = ({ i18n = getI18n() }: { i18n: ReturnType<typeof getI18n> }) =
return z.object({
serverUrl: z.url({ protocol: z.core.regexes.httpProtocol }),
apiToken: z.string().nonempty(),
apiTokenSecret: z.string().nullish(),
apiTokenSecret: z.string().nonempty(),
allowInsecureConnections: z.boolean().nullish(),
});
};

View File

@@ -1134,20 +1134,6 @@
"placeholder": "Please enter PowerDNS API key",
"tooltip": "For more information, see <a href=\"https://doc.powerdns.com/authoritative/http-api/index.html#enabling-the-api\" target=\"_blank\">https://doc.powerdns.com/authoritative/http-api/index.html#enabling-the-api</a>"
},
"proxmoxve_server_url": {
"label": "Proxmox VE server URL",
"placeholder": "Please enter Proxmox VE server URL"
},
"proxmoxve_api_token": {
"label": "Proxmox VE API token",
"placeholder": "Please enter Proxmox VE API token",
"tooltip": "For more information, see <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"proxmoxve_api_token_secret": {
"label": "Proxmox VE API token secret (Optional)",
"placeholder": "Please enter Proxmox VE API token secret",
"tooltip": "For more information, see <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"proxmoxbs_server_url": {
"label": "Proxmox BS server URL",
"placeholder": "Please enter Proxmox BS server URL"
@@ -1158,10 +1144,24 @@
"tooltip": "For more information, see <a href=\"https://pbs.proxmox.com/docs/user-management.html#api-tokens\" target=\"_blank\">https://pbs.proxmox.com/docs/user-management.html#api-tokens</a>"
},
"proxmoxbs_api_token_secret": {
"label": "Proxmox BS API token secret (Optional)",
"label": "Proxmox BS API token secret",
"placeholder": "Please enter Proxmox BS API token secret",
"tooltip": "For more information, see <a href=\"https://pbs.proxmox.com/docs/user-management.html#api-tokens\" target=\"_blank\">https://pbs.proxmox.com/docs/user-management.html#api-tokens</a>"
},
"proxmoxve_server_url": {
"label": "Proxmox VE server URL",
"placeholder": "Please enter Proxmox VE server URL"
},
"proxmoxve_api_token": {
"label": "Proxmox VE API token",
"placeholder": "Please enter Proxmox VE API token",
"tooltip": "For more information, see <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"proxmoxve_api_token_secret": {
"label": "Proxmox VE API token secret",
"placeholder": "Please enter Proxmox VE API token secret",
"tooltip": "For more information, see <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"qingcloud_access_key_id": {
"label": "QingCloud AccessKeyID",
"placeholder": "Please enter QingCloud AccessKeyID",

View File

@@ -53,7 +53,7 @@
"errmsg": {
"domain_invalid": "Invalid domain name",
"host_invalid": "Invalid domain name or IP address",
"host_invalid": "Invalid host: not a domain name or IP address",
"port_invalid": "Invalid port",
"ip_invalid": "Invalid IP address",
"json_invalid": "Invalid JSON string",

View File

@@ -2022,16 +2022,6 @@
"placeholder": "Please enter OCI compartment OCID",
"tooltip": "For more information, see <a href=\"https://docs.oracle.com/en-us/iaas/Content/Identity/compartments/managingcompartments.htm\" target=\"_blank\">https://docs.oracle.com/en-us/iaas/Content/Identity/compartments/managingcompartments.htm</a>"
},
"proxmoxve": {
"guide": "Requires Proxmox Virtual Environment v5.2 or higher."
},
"proxmoxve_node_name": {
"label": "Proxmox VE cluster node name",
"placeholder": "Please enter Proxmox VE cluster node name"
},
"proxmoxve_auto_restart": {
"label": "Auto restart Proxmox VE after deployment"
},
"proxmoxbs": {
"guide": "Requires Proxmox Backup Server v2.1 or higher."
},
@@ -2042,6 +2032,16 @@
"proxmoxbs_auto_restart": {
"label": "Auto restart Proxmox BS after deployment"
},
"proxmoxve": {
"guide": "Requires Proxmox Virtual Environment v5.2 or higher."
},
"proxmoxve_node_name": {
"label": "Proxmox VE node name",
"placeholder": "Please enter Proxmox VE node name"
},
"proxmoxve_auto_restart": {
"label": "Auto restart Proxmox VE after deployment"
},
"qingcloud_lb_zone_id": {
"label": "QingCloud zone ID",
"placeholder": "Please enter QingCloud LBC zone ID (e.g. pek3a)",

View File

@@ -1134,20 +1134,6 @@
"placeholder": "请输入 PowerDNS API Key",
"tooltip": "这是什么?请参阅 <a href=\"https://doc.powerdns.com/authoritative/http-api/index.html#enabling-the-api\" target=\"_blank\">https://doc.powerdns.com/authoritative/http-api/index.html#enabling-the-api</a>"
},
"proxmoxve_server_url": {
"label": "Proxmox VE 服务地址",
"placeholder": "请输入 Proxmox VE 服务地址"
},
"proxmoxve_api_token": {
"label": "Proxmox VE API Token",
"placeholder": "请输入 Proxmox VE API Token",
"tooltip": "这是什么?请参阅 <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"proxmoxve_api_token_secret": {
"label": "Proxmox VE API Token Secret可选",
"placeholder": "请输入 Proxmox VE API Token Secret",
"tooltip": "这是什么?请参阅 <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"proxmoxbs_server_url": {
"label": "Proxmox BS 服务地址",
"placeholder": "请输入 Proxmox BS 服务地址"
@@ -1158,10 +1144,24 @@
"tooltip": "这是什么?请参阅 <a href=\"https://pbs.proxmox.com/docs/user-management.html#api-tokens\" target=\"_blank\">https://pbs.proxmox.com/docs/user-management.html#api-tokens</a>"
},
"proxmoxbs_api_token_secret": {
"label": "Proxmox BS API Token Secret(可选)",
"label": "Proxmox BS API Token Secret",
"placeholder": "请输入 Proxmox BS API Token Secret",
"tooltip": "这是什么?请参阅 <a href=\"https://pbs.proxmox.com/docs/user-management.html#api-tokens\" target=\"_blank\">https://pbs.proxmox.com/docs/user-management.html#api-tokens</a>"
},
"proxmoxve_server_url": {
"label": "Proxmox VE 服务地址",
"placeholder": "请输入 Proxmox VE 服务地址"
},
"proxmoxve_api_token": {
"label": "Proxmox VE API Token",
"placeholder": "请输入 Proxmox VE API Token",
"tooltip": "这是什么?请参阅 <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"proxmoxve_api_token_secret": {
"label": "Proxmox VE API Token Secret",
"placeholder": "请输入 Proxmox VE API Token Secret",
"tooltip": "这是什么?请参阅 <a href=\"https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens\" target=\"_blank\">https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_tokens</a>"
},
"qingcloud_access_key_id": {
"label": "青云 AccessKeyID",
"placeholder": "请输入青云 AccessKeyID",

View File

@@ -53,7 +53,7 @@
"errmsg": {
"domain_invalid": "无效域名",
"host_invalid": "无效域名或 IP 地址",
"host_invalid": "无效主机:不是一个有效的域名或 IP 地址",
"port_invalid": "无效端口号",
"ip_invalid": "无效 IP 地址",
"json_invalid": "无效 JSON 格式字符串",

View File

@@ -2021,16 +2021,6 @@
"placeholder": "请输入 OCI 资源区间 OCID",
"tooltip": "这是什么?请参阅 <a href=\"https://docs.oracle.com/en-us/iaas/Content/Identity/compartments/managingcompartments.htm\" target=\"_blank\">https://docs.oracle.com/en-us/iaas/Content/Identity/compartments/managingcompartments.htm</a>"
},
"proxmoxve": {
"guide": "需要 Proxmox Virtual Environment v5.2 或更高版本。"
},
"proxmoxve_node_name": {
"label": "Proxmox VE 集群节点名称",
"placeholder": "请输入 Proxmox VE 集群节点名称"
},
"proxmoxve_auto_restart": {
"label": "部署后自动重启 Proxmox VE 服务"
},
"proxmoxbs": {
"guide": "需要 Proxmox Backup Server v2.1 或更高版本。"
},
@@ -2041,6 +2031,16 @@
"proxmoxbs_auto_restart": {
"label": "部署后自动重启 Proxmox BS 服务"
},
"proxmoxve": {
"guide": "需要 Proxmox Virtual Environment v5.2 或更高版本。"
},
"proxmoxve_node_name": {
"label": "Proxmox VE 节点名称",
"placeholder": "请输入 Proxmox VE 节点名称"
},
"proxmoxve_auto_restart": {
"label": "部署后自动重启 Proxmox VE 服务"
},
"qingcloud_lb_zone_id": {
"label": "青云服务区域 ID",
"placeholder": "请输入青云 ELB 服务区域 ID例如pek3a",