From 6bf75b2bf701b7b1ba929cc56dec6670fdd2e9c9 Mon Sep 17 00:00:00 2001 From: YiZixuan Date: Sun, 17 Aug 2025 15:19:01 +0800 Subject: [PATCH] refactor(i18n): Extracted multiple fields in the Service component for translation. - Extracted multiple fields in the Service component for translation. - Optimized the structure of the translation file, categorizing it by functional modules. --- .../add-service/ServiceConfigFields.tsx | 36 ++++----- .../services/add-service/ServiceForm.tsx | 2 +- .../add-service/ServiceNotificationFields.tsx | 22 +++--- .../add-service/ServiceRegionalFields.tsx | 26 ++++--- .../services/add-service/ServiceTypeField.tsx | 12 +-- .../services/add-service/ServiceUrlField.tsx | 20 ++--- .../data-retention/DataRetentionSettings.tsx | 2 +- .../settings/general/GeneralSettingsPanel.tsx | 6 +- .../user-management/UserManagement.tsx | 11 ++- application/src/translations/en/services.ts | 71 +++++++++++++++++- application/src/translations/en/settings.ts | 19 +++-- .../src/translations/types/services.ts | 71 +++++++++++++++++- .../src/translations/types/settings.ts | 17 +++-- application/src/translations/zhcn/services.ts | 75 +++++++++++++++++-- application/src/translations/zhcn/settings.ts | 21 ++++-- 15 files changed, 319 insertions(+), 92 deletions(-) diff --git a/application/src/components/services/add-service/ServiceConfigFields.tsx b/application/src/components/services/add-service/ServiceConfigFields.tsx index a98c4bb..b9c2583 100644 --- a/application/src/components/services/add-service/ServiceConfigFields.tsx +++ b/application/src/components/services/add-service/ServiceConfigFields.tsx @@ -37,7 +37,7 @@ export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) { name="interval" render={({ field }) => ( - Check Interval + {t("checkInterval")} {!isCustomInterval ? ( @@ -60,7 +60,7 @@ export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) { - Back to presets + {t("backToPresets")} )} {isCustomInterval - ? "Enter custom interval in seconds (minimum 10 seconds)" - : "How often to check the service status" + ? t("checkIntervalDescCustom") + : t("checkIntervalDesc") } @@ -94,22 +94,22 @@ export function ServiceConfigFields({ form }: ServiceConfigFieldsProps) { name="retries" render={({ field }) => ( - Retry Attempts + {t("retryAttempts")} - Number of retry attempts before marking as down + {t("retryAttemptsDesc")} diff --git a/application/src/components/services/add-service/ServiceForm.tsx b/application/src/components/services/add-service/ServiceForm.tsx index e9a3fd9..576e231 100644 --- a/application/src/components/services/add-service/ServiceForm.tsx +++ b/application/src/components/services/add-service/ServiceForm.tsx @@ -150,7 +150,7 @@ export function ServiceForm({ diff --git a/application/src/components/services/add-service/ServiceNotificationFields.tsx b/application/src/components/services/add-service/ServiceNotificationFields.tsx index 075b253..32da21f 100644 --- a/application/src/components/services/add-service/ServiceNotificationFields.tsx +++ b/application/src/components/services/add-service/ServiceNotificationFields.tsx @@ -9,12 +9,14 @@ import { useQuery } from "@tanstack/react-query"; import { alertConfigService, AlertConfiguration } from "@/services/alertConfigService"; import { serviceNotificationTemplateService, ServiceNotificationTemplate } from "@/services/serviceNotificationTemplateService"; import { useState, useEffect } from "react"; +import { useLanguage } from "@/contexts/LanguageContext.tsx"; interface ServiceNotificationFieldsProps { form: UseFormReturn; } export function ServiceNotificationFields({ form }: ServiceNotificationFieldsProps) { + const { t } = useLanguage(); const [alertConfigs, setAlertConfigs] = useState([]); // Get the current form values for debugging @@ -88,10 +90,10 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro
- Enable Notifications + {t("enableNotifications")} - Enable or disable notifications for this service + {t("enableNotificationsDesc")}
@@ -115,11 +117,11 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro name="notificationChannels" render={({ field }) => ( - Notification Channels + {t("notificationChannels")} {notificationStatus === "enabled" - ? "Select notification channels for this service" - : "Enable notifications first to select channels"} + ? t("notificationChannelsEnabledDesc") + : t("notificationChannelsDesc")} {/* Display selected channels as badges */} @@ -144,7 +146,7 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro value="" // Always reset to empty after selection > - + {alertConfigs @@ -169,7 +171,7 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro return ( - Alert Template + {t("alertTemplate")} HTTP/S

- Monitor websites and REST APIs with HTTP/HTTPS Protocol + {t("serviceTypeHTTPDesc")}

@@ -67,7 +69,7 @@ export function ServiceTypeField({ form }: ServiceTypeFieldProps) { PING

- Monitor host availability with PING Protocol + {t("serviceTypePINGDesc")}

@@ -78,7 +80,7 @@ export function ServiceTypeField({ form }: ServiceTypeFieldProps) { TCP

- Monitor TCP port connectivity with TCP Protocol + {t("serviceTypeTCPDesc")}

@@ -89,7 +91,7 @@ export function ServiceTypeField({ form }: ServiceTypeFieldProps) { DNS

- Monitor DNS resolution + {t("serviceTypeDNSDesc")}

diff --git a/application/src/components/services/add-service/ServiceUrlField.tsx b/application/src/components/services/add-service/ServiceUrlField.tsx index f8419c4..8b4aee0 100644 --- a/application/src/components/services/add-service/ServiceUrlField.tsx +++ b/application/src/components/services/add-service/ServiceUrlField.tsx @@ -3,12 +3,14 @@ import { FormControl, FormField, FormItem, FormLabel, FormMessage, FormDescripti import { Input } from "@/components/ui/input"; import { UseFormReturn } from "react-hook-form"; import { ServiceFormData } from "./types"; +import { useLanguage } from "@/contexts/LanguageContext.tsx"; interface ServiceUrlFieldProps { form: UseFormReturn; } export function ServiceUrlField({ form }: ServiceUrlFieldProps) { + const { t } = useLanguage(); const serviceType = form.watch("type"); const getPlaceholder = () => { @@ -22,35 +24,35 @@ export function ServiceUrlField({ form }: ServiceUrlFieldProps) { case "dns": return "example.com"; default: - return "Enter URL or hostname"; + return t("targetDefaultPlaceholder"); } }; const getDescription = () => { switch (serviceType) { case "http": - return "Enter the full URL including protocol (http:// or https://)"; + return t("targetHTTPDesc"); case "ping": - return "Enter hostname or IP address to ping"; + return t("targetPINGDesc"); case "tcp": - return "Enter hostname or IP address for TCP connection test"; + return t("targetTCPDesc"); case "dns": - return "Enter domain name for DNS record monitoring (A, AAAA, MX, etc.)"; + return t("targetDNSDesc"); default: - return "Enter the target URL or hostname for monitoring"; + return t("targetDefaultDesc"); } }; const getFieldLabel = () => { switch (serviceType) { case "dns": - return "Domain Name"; + return t("targetDNS"); case "ping": return "Hostname/IP"; case "tcp": return "Hostname/IP"; default: - return "Target URL/Host"; + return t("targetDefault"); } }; @@ -99,7 +101,7 @@ export function ServiceUrlField({ form }: ServiceUrlFieldProps) { />
- Enter the port number for TCP connection test + {t("targetTCPPortDesc")}
diff --git a/application/src/components/settings/data-retention/DataRetentionSettings.tsx b/application/src/components/settings/data-retention/DataRetentionSettings.tsx index 15c1d58..5aa246b 100644 --- a/application/src/components/settings/data-retention/DataRetentionSettings.tsx +++ b/application/src/components/settings/data-retention/DataRetentionSettings.tsx @@ -170,7 +170,7 @@ const DataRetentionSettings = () => { - Permission Notice: As an admin user, you do not have access to data retention settings. These settings can only be accessed and modified by Super Admins. + {t("permissionNotice")} As an admin user, you do not have access to data retention settings. These settings can only be accessed and modified by Super Admins. diff --git a/application/src/components/settings/general/GeneralSettingsPanel.tsx b/application/src/components/settings/general/GeneralSettingsPanel.tsx index b990634..70019d3 100644 --- a/application/src/components/settings/general/GeneralSettingsPanel.tsx +++ b/application/src/components/settings/general/GeneralSettingsPanel.tsx @@ -143,7 +143,7 @@ const GeneralSettingsPanel: React.FC = () => { - Permission Notice: As an admin user, you do not have access to view or modify system and mail settings. These settings can only be accessed and modified by Super Admins. Contact your Super Admin if you need to make changes to system configuration or mail settings. + {t("permissionNotice")} {t("permissionNoticeAddUser")} @@ -153,11 +153,11 @@ const GeneralSettingsPanel: React.FC = () => { } if (isLoading) { - return
Loading settings...
; + return
{t("loadingSettings")}
; } if (error) { - return
Error loading settings
; + return
{t("loadingSettingsError")}
; } return ( diff --git a/application/src/components/settings/user-management/UserManagement.tsx b/application/src/components/settings/user-management/UserManagement.tsx index 5865377..9e4e04f 100644 --- a/application/src/components/settings/user-management/UserManagement.tsx +++ b/application/src/components/settings/user-management/UserManagement.tsx @@ -10,7 +10,10 @@ import { UserCog, Loader2, AlertCircle, Info, Users, ShieldAlert } from "lucide- import { Button } from "@/components/ui/button"; import { Alert, AlertDescription } from "@/components/ui/alert"; import { authService } from "@/services/authService"; +import { useLanguage } from "@/contexts/LanguageContext.tsx"; + const UserManagement = () => { + const { t } = useLanguage(); const { users, loading, @@ -44,21 +47,21 @@ const UserManagement = () => {
- User Management + {t("userManagement")}
-

User Management

+

{t("userManagement")}

{isSuperAdmin && }
{!isSuperAdmin && - Permission Notice: As an admin user, you have access to view and modify existing user details. However, only Super Admins have permission to create new user accounts. Contact your Super Admin if you need to add a new user. + {t("permissionNotice")} As an admin user, you have access to view and modify existing user details. However, only Super Admins have permission to create new user accounts. Contact your Super Admin if you need to add a new user. } diff --git a/application/src/translations/en/services.ts b/application/src/translations/en/services.ts index 02e851e..8af5efd 100644 --- a/application/src/translations/en/services.ts +++ b/application/src/translations/en/services.ts @@ -2,9 +2,6 @@ import { ServicesTranslations } from '../types/services'; export const servicesTranslations: ServicesTranslations = { - serviceName: "Service Name", - serviceNameDesc: "Enter a descriptive name for your service", - serviceType: "Service Type", serviceStatus: "Service Status", responseTime: "Response Time", uptime: "Uptime", @@ -19,4 +16,72 @@ export const servicesTranslations: ServicesTranslations = { allTypes: "All Types", createNewService: "Create New Service", createNewServiceDesc: "Fill in the details to create a new service to monitor.", + + // ServiceBasicFields.tsx + serviceName: "Service Name", + serviceNameDesc: "Enter a descriptive name for your service", + + // ServiceConfigFields.tsx + checkInterval: "Check Interval", + seconds: "seconds", + minute: "minute", + minutes: "minutes", + hour: "hour", + hours: "hours", + custom: "Custom", + checkIntervalPlaceholder: "Enter interval in seconds", + backToPresets: "Back to presets", + checkIntervalDesc: "How often to check the service status", + checkIntervalDescCustom: "Enter custom interval in seconds (minimum 10 seconds)", + retryAttempts: "Retry Attempts", + attempt: "attempt", + attempts: "attempts", + retryAttemptsDesc: "Number of retry attempts before marking as down", + + // ServiceForm.tsx + updateService: "Update Service", + createService: "Create Service", + + // ServiceNotificationFields.tsx + enableNotifications: "Enable Notifications", + enableNotificationsDesc: "Enable or disable notifications for this service", + notificationChannels: "Notification Channels", + notificationChannelsEnabledDesc: "Select notification channels for this service", + notificationChannelsDesc: "Enable notifications first to select channels", + notificationChannelsPlaceholder: "Add a notification channel", + alertTemplate: "Alert Template", + alertTemplateLoading: "Loading templates...", + alertTemplatePlaceholder: "Select an alert template", + alertTemplateEnabledDesc: "Choose a template for alert messages", + alertTemplateDesc: "Enable notifications first to select template", + + // ServiceTypeField.tsx + serviceType: "Service Type", + serviceTypeHTTPDesc: "Monitor websites and REST APIs with HTTP/HTTPS Protocol", + serviceTypePINGDesc: "Monitor host availability with PING Protocol", + serviceTypeTCPDesc: "Monitor TCP port connectivity with TCP Protocol", + serviceTypeDNSDesc: "Monitor DNS resolution", + + // ServiceRegionalFields.tsx + regionalMonitoring: "Regional Monitoring", + regionalMonitoringDesc: "Assign this service to regional monitoring agents for distributed monitoring", + regionalAgents: "Regional Agents", + regionalAgentsLoading: "Loading agents...", + regionalAgentsAvailablePlaceholder: "Select additional regional agents...", + regionalAgentsAllSelected: "All available agents selected", + regionalAgentsNoAvailable: "No regional agents available", + regionalAgentsNoOnlineAvailable: "No online regional agents available", + regionalAgentsNotFoundMessage: "No online regional agents found. Services will use default monitoring.", + regionalAgentsNotSelectedMessage: "No regional agents selected. Service will use default monitoring.", + + // ServiceUrlField.tsx + targetDefault: "Target URL/Host", + targetDNS: "Domain Name", + targetHTTPDesc: "Enter the full URL including protocol (http:// or https://)", + targetPINGDesc: "Enter hostname or IP address to ping", + targetTCPDesc: "Enter hostname or IP address for TCP connection test", + targetTCPPortDesc: "Enter the port number for TCP connection test", + targetDNSDesc: "Enter domain name for DNS record monitoring (A, AAAA, MX, etc.)", + targetDefaultDesc: "Enter the target URL or hostname for monitoring", + targetDefaultPlaceholder: "Enter URL or hostname", }; \ No newline at end of file diff --git a/application/src/translations/en/settings.ts b/application/src/translations/en/settings.ts index 9681f86..16077c5 100644 --- a/application/src/translations/en/settings.ts +++ b/application/src/translations/en/settings.ts @@ -2,18 +2,18 @@ import { SettingsTranslations } from '../types/settings'; export const settingsTranslations: SettingsTranslations = { - // Tabs + // General Settings - Tabs systemSettings: "System Settings", mailSettings: "Mail Settings", - // System Settings + // General Settings - System Settings appName: "Application Name", appURL: "Application URL", senderName: "Sender Name", senderEmail: "Sender Email Address", hideControls: "Hide Controls", - // Mail Settings + // General Settings - Mail Settings smtpSettings: "SMTP Configuration", smtpEnabled: "Enable SMTP", smtpHost: "SMTP Host", @@ -24,7 +24,7 @@ export const settingsTranslations: SettingsTranslations = { enableTLS: "Enable TLS", localName: "Local Name", - // Test Email + // General Settings - Test Email testEmail: "Test Email", sendTestEmail: "Send test email", emailTemplate: "Email template", @@ -39,7 +39,7 @@ export const settingsTranslations: SettingsTranslations = { enterEmailAddress: "Enter email address", sending: "Sending...", - // Actions and status + // General Settings - Actions and status save: "Save Changes", saving: "Saving...", settingsUpdated: "Settings updated successfully", @@ -48,5 +48,12 @@ export const settingsTranslations: SettingsTranslations = { testConnection: "Test Connection", testingConnection: "Testing Connection...", connectionSuccess: "Connection successful", - connectionFailed: "Connection failed" + connectionFailed: "Connection failed", + + // User Management + addUser: "Add User", + permissionNotice: "Permission Notice:", + permissionNoticeAddUser: "As an admin user, you do not have access to view or modify system and mail settings. These settings can only be accessed and modified by Super Admins. Contact your Super Admin if you need to make changes to system configuration or mail settings.", + loadingSettings: "Loading settings...", + loadingSettingsError: "Error loading settings", }; \ No newline at end of file diff --git a/application/src/translations/types/services.ts b/application/src/translations/types/services.ts index 06d87c8..130e422 100644 --- a/application/src/translations/types/services.ts +++ b/application/src/translations/types/services.ts @@ -1,8 +1,6 @@ export interface ServicesTranslations { - serviceName: string; - serviceNameDesc: string; - serviceType: string; + serviceStatus: string; responseTime: string; uptime: string; @@ -17,4 +15,71 @@ export interface ServicesTranslations { allTypes: string; createNewService: string; createNewServiceDesc: string; + + // ServiceBasicFields.tsx + serviceName: string; + serviceNameDesc: string; + + // ServiceConfigFields.tsx + checkInterval: string; + seconds: string; + minute: string; + minutes: string; + hour: string; + hours: string; + custom: string; + checkIntervalPlaceholder: string; + backToPresets: string; + checkIntervalDesc: string; + checkIntervalDescCustom: string; + retryAttempts: string; + attempt: string; + attempts: string; + retryAttemptsDesc: string; + + // ServiceForm.tsx + updateService: string; + createService: string; + + // ServiceNotificationFields.tsx + enableNotifications: string; + enableNotificationsDesc: string; + notificationChannels: string; + notificationChannelsEnabledDesc: string; + notificationChannelsDesc: string; + notificationChannelsPlaceholder: string; + alertTemplate: string; + alertTemplateLoading: string; + alertTemplatePlaceholder: string; + alertTemplateEnabledDesc: string; + alertTemplateDesc: string; + + // ServiceTypeField.tsx + serviceType: string; + serviceTypeHTTPDesc: string; + serviceTypePINGDesc: string; + serviceTypeTCPDesc: string; + serviceTypeDNSDesc: string; + + // ServiceRegionalFields.tsx + regionalMonitoring: string; + regionalMonitoringDesc: string; + regionalAgents: string; + regionalAgentsLoading: string; + regionalAgentsAvailablePlaceholder: string; + regionalAgentsAllSelected: string; + regionalAgentsNoAvailable: string; + regionalAgentsNotFoundMessage: string; + regionalAgentsNotSelectedMessage: string; + + // ServiceUrlField.tsx + targetDefault: string; + targetDNS: string; + targetHTTPDesc: string; + targetPINGDesc: string; + targetTCPDesc: string; + targetTCPPortDesc: string; + targetDNSDesc: string; + targetDefaultDesc: string; + targetDefaultPlaceholder: string; } diff --git a/application/src/translations/types/settings.ts b/application/src/translations/types/settings.ts index 71b07e5..cf4de01 100644 --- a/application/src/translations/types/settings.ts +++ b/application/src/translations/types/settings.ts @@ -1,17 +1,17 @@ export interface SettingsTranslations { - // Tabs + // General Settings - Tabs systemSettings: string; mailSettings: string; - // System Settings + // General Settings - System Settings appName: string; appURL: string; senderName: string; senderEmail: string; hideControls: string; - // Mail Settings + // General Settings - Mail Settings smtpSettings?: string; smtpEnabled: string; smtpHost: string; @@ -22,7 +22,7 @@ export interface SettingsTranslations { enableTLS: string; localName: string; - // Test Email + // General Settings - Test Email testEmail: string; sendTestEmail: string; emailTemplate: string; @@ -37,7 +37,7 @@ export interface SettingsTranslations { enterEmailAddress: string; sending: string; - // Actions and status + // General Settings - Actions and status save: string; saving: string; settingsUpdated: string; @@ -47,4 +47,11 @@ export interface SettingsTranslations { testingConnection: string; connectionSuccess: string; connectionFailed: string; + + // User Management + addUser: string; + permissionNotice: string; + permissionNoticeAddUser: string; + loadingSettings: string; + loadingSettingsError: string; } \ No newline at end of file diff --git a/application/src/translations/zhcn/services.ts b/application/src/translations/zhcn/services.ts index 07b4659..72fe126 100644 --- a/application/src/translations/zhcn/services.ts +++ b/application/src/translations/zhcn/services.ts @@ -2,12 +2,9 @@ import { ServicesTranslations } from '../types/services'; export const servicesTranslations: ServicesTranslations = { - serviceName: "服务名称", - serviceNameDesc: "为你的服务输入一个描述性名称", - serviceType: "服务类型", serviceStatus: "服务状态", responseTime: "响应时间", - uptime: "在线", + uptime: "在线时间", lastChecked: "最后检查时间", noServices: "没有符合您筛选条件的服务。", currentlyMonitoring: "当前监控", @@ -19,4 +16,72 @@ export const servicesTranslations: ServicesTranslations = { allTypes: "所有类型", createNewService: "添加新服务", createNewServiceDesc: "填写详细信息以创建要监控的新服务。", -}; + + // ServiceBasicFields.tsx + serviceName: "服务名称", + serviceNameDesc: "为你的服务输入一个描述性名称", + + // ServiceConfigFields.tsx + checkInterval: "检查间隔", + seconds: "秒", + minute: "分钟", + minutes: "分钟", + hour: "小时", + hours: "小时", + custom: "自定义", + checkIntervalPlaceholder: "输入间隔时间(秒)", + backToPresets: "回到预设", + checkIntervalDesc: "多久检查一次服务状态", + checkIntervalDescCustom: "输入自定义间隔时间(以秒为单位,最小10秒)", + retryAttempts: "重试次数", + attempt: "次", + attempts: "次", + retryAttemptsDesc: "在标记为下线之前重试的次数", + + // ServiceForm.tsx + updateService: "更新服务", + createService: "创建服务", + + // ServiceNotificationFields.tsx + enableNotifications: "启用通知", + enableNotificationsDesc: "为本服务启用或禁用通知", + notificationChannels: "通知渠道", + notificationChannelsEnabledDesc: "为本服务选择通知渠道", + notificationChannelsDesc: "先启用通知以选择渠道", + notificationChannelsPlaceholder: "添加一个通知渠道", + alertTemplate: "警报模板", + alertTemplateLoading: "正在加载模板...", + alertTemplatePlaceholder: "选择一个警报模板", + alertTemplateEnabledDesc: "选择一个警报消息的模板", + alertTemplateDesc: "先启用通知才能选择模板", + + // ServiceTypeField.tsx + serviceType: "服务类型", + serviceTypeHTTPDesc: "使用 HTTP/HTTPS 协议监控网站和 RESTAPI", + serviceTypePINGDesc: "使用 PING 协议监控主机可用性", + serviceTypeTCPDesc: "使用 TCP 协议监控 TCP 端口连接性", + serviceTypeDNSDesc: "监控 DNS 解析", + + // ServiceRegionalFields.tsx + regionalMonitoring: "区域监控", + regionalMonitoringDesc: "将此服务分配给区域监控代理以进行分布式监控", + regionalAgents: "区域代理", + regionalAgentsLoading: "加载代理中...", + regionalAgentsAvailablePlaceholder: "选择额外的区域代理...", + regionalAgentsAllSelected: "已选择所有可用代理", + regionalAgentsNoAvailable: "无可用区域代理", + regionalAgentsNoOnlineAvailable: "无可用在线区域代理", + regionalAgentsNotFoundMessage: "未找到在线区域代理。服务将使用默认监控。", + regionalAgentsNotSelectedMessage: "未选择区域代理。服务将使用默认监控。", + + // ServiceUrlField.tsx + targetDefault: "目标 URL/Host", + targetDNS: "域名", + targetHTTPDesc: "输入完整的 URL,包括协议(http:// 或 https://)", + targetPINGDesc: "输入要 ping 的主机名或 IP 地址", + targetTCPDesc: "输入主机名或 IP 地址以进行 TCP 连接测试", + targetTCPPortDesc: "输入用于 TCP 连接测试的端口号", + targetDNSDesc: "输入要监控的 DNS 记录域名(A、AAAA、MX等)", + targetDefaultDesc: "输入要监控的目标 URL 或主机名", + targetDefaultPlaceholder: "输入 URL 或主机名", +}; \ No newline at end of file diff --git a/application/src/translations/zhcn/settings.ts b/application/src/translations/zhcn/settings.ts index 8f86b1b..a57757e 100644 --- a/application/src/translations/zhcn/settings.ts +++ b/application/src/translations/zhcn/settings.ts @@ -2,18 +2,18 @@ import { SettingsTranslations } from '../types/settings'; export const settingsTranslations: SettingsTranslations = { - // Tabs + // General Settings - Tabs systemSettings: "系统设置", mailSettings: "邮件设置", - // System Settings + // General Settings - System Settings appName: "应用名称", appURL: "应用 URL", senderName: "发送者名称", senderEmail: "发送者邮箱地址", hideControls: "隐藏控件", - // Mail Settings + // General Settings - Mail Settings smtpSettings: "SMTP 配置", smtpEnabled: "启用 SMTP", smtpHost: "SMTP 主机", @@ -24,7 +24,7 @@ export const settingsTranslations: SettingsTranslations = { enableTLS: "启用 TLS", localName: "本地名称", - // Test Email + // General Settings - Test Email testEmail: "测试邮箱", sendTestEmail: "发送测试邮箱", emailTemplate: "邮箱模板", @@ -39,7 +39,7 @@ export const settingsTranslations: SettingsTranslations = { enterEmailAddress: "输入收件人邮箱地址", sending: "发送中...", - // Actions and status + // General Settings - Actions and status save: "保存变更", saving: "保存中...", settingsUpdated: "设置已成功更新", @@ -48,5 +48,12 @@ export const settingsTranslations: SettingsTranslations = { testConnection: "测试连接", testingConnection: "测试连接中...", connectionSuccess: "连接成功", - connectionFailed: "连接失败" -}; + connectionFailed: "连接失败", + + // User Management + addUser: "添加用户", + permissionNotice: "权限问题:", + permissionNoticeAddUser: "作为管理员用户,您无权查看或修改系统及邮件设置。这些设置仅超级管理员可访问和修改。如需更改系统配置或邮件设置,请联系您的超级管理员。", + loadingSettings: "加载设置中...", + loadingSettingsError: "加载设置时出错", +}; \ No newline at end of file