feat: add comprehensive i18n support across all pages

- Add i18n support to admin sidebar, breadcrumbs, and nav-footer
- Add i18n support to admin pages: system-settings, users, versions, risk-control, sessions, cloud-variables, cloud-constants
- Add i18n support to auth pages: login, register
- Add i18n support to install and profile pages
- Add i18n support to agent pages: dashboard, finance, users, apps, cards
- Replace all hard-coded Chinese text with i18n translation keys
- Add comprehensive translation keys to zh.json and en.json
- Fix date formatting to use locale-agnostic toLocaleDateString()
- Pass t function as parameter for i18n in non-component files
This commit is contained in:
2026-05-07 23:06:58 +08:00
parent f1f2a9dc9d
commit c816f4d85c
26 changed files with 1817 additions and 658 deletions
+556 -7
View File
@@ -35,7 +35,49 @@
"next": "Next",
"yes": "Yes",
"no": "No",
"optional": "Optional"
"optional": "Optional",
"select": "Select",
"type": "Type",
"reason": "Reason",
"status": "Status",
"expiresAt": "Expires At",
"createdAt": "Created At",
"batchEnable": "Batch Enable",
"batchDisable": "Batch Disable",
"batchDelete": "Batch Delete",
"save": "Save",
"search": "Search",
"upload": "Upload",
"download": "Download",
"copy": "Copy",
"show": "Show",
"hide": "Hide",
"username": "Username",
"email": "Email",
"password": "Password",
"phone": "Phone",
"submit": "Submit",
"close": "Close",
"detail": "Detail",
"viewAll": "View All",
"noData": "No Data",
"active": "Active",
"inactive": "Inactive",
"banned": "Banned",
"online": "Online",
"offline": "Offline",
"enabled": "Enabled",
"disabled": "Disabled",
"unused": "Unused",
"used": "Used",
"expired": "Expired",
"recharge": "Recharge",
"consume": "Consume",
"refund": "Refund",
"admin": "Admin",
"agent": "Agent",
"basicPlan": "Basic Plan",
"normal": "Normal"
},
"premium": {
"premium": "premium",
@@ -1386,6 +1428,71 @@
"methods": {
"manual": "Manual",
"auto": "Auto"
},
"createForm": {
"title": "Create Version",
"description": "Create a new version for the application, upload ZIP update package and configure update strategy",
"editTitle": "Edit Version",
"editDescription": "Modify version information and update strategy",
"versionConfig": "Version Configuration",
"versionConfigDesc": "Fill in basic version information and upload update file",
"selectApp": "Select Application",
"selectAppPlaceholder": "Select application",
"versionNumber": "Version Number",
"versionPlaceholder": "e.g.: 1.0.0",
"minVersion": "Minimum Version",
"minVersionPlaceholder": "e.g.: 0.9.0 (full installation required below this version)",
"versionDesc": "Version Description",
"versionDescPlaceholder": "Briefly describe the updates in this version",
"updateFile": "Update File (ZIP format)",
"dragOrClick": "Drag ZIP file here or click to upload",
"selectFile": "Select File",
"uploadAndParse": "Upload & Parse",
"fileUploaded": "File uploaded and parsed",
"fileHash": "File Hash",
"containsFiles": "Contains {count} files",
"fileList": "File List",
"fileName": "File Name",
"filePath": "Path",
"fileSize": "Size",
"fileType": "Type",
"entryFile": "Entry File",
"entryFileDesc": "Select the main program file to launch after update (optional)",
"entryFilePlaceholder": "Select entry file (optional)",
"forcedUpdate": "Force Update",
"forcedUpdateDesc": "When enabled, users must update to this version to continue using",
"autoUpdate": "Auto Update",
"autoUpdateDesc": "When enabled, the application will automatically download and install updates",
"changelog": "Changelog",
"changelogPlaceholder": "Describe the updates, bug fixes, new features in detail...",
"preview": "Preview",
"previewApp": "Application",
"previewVersion": "Version",
"previewMinVersion": "Min Version",
"previewDesc": "Description",
"previewFile": "Update File",
"previewFileCount": "File Count",
"previewEntryFile": "Entry File",
"previewForcedUpdate": "Force Update",
"previewAutoUpdate": "Auto Update",
"changelogPreview": "Changelog Preview",
"noChangelog": "No changelog",
"notUploaded": "Not uploaded",
"publishVersion": "Publish Version",
"updateVersion": "Save Changes",
"zipOnly": "Only ZIP format files are supported",
"selectZipFirst": "Please select a ZIP file first",
"uploadSuccess": "File uploaded successfully",
"uploadFailed": "Upload failed",
"selectAppRequired": "Please select an application",
"versionRequired": "Please enter version number",
"uploadZipRequired": "Please upload a ZIP file first",
"createSuccess": "Version created successfully",
"createFailed": "Failed to create version",
"updateSuccess": "Version updated successfully",
"updateFailed": "Failed to update version",
"fetchFailed": "Failed to fetch version information",
"fetchAppsFailed": "Failed to fetch application list"
}
},
"cardTypes": {
@@ -1798,6 +1905,7 @@
"description": "Description",
"application": "Application",
"status": "Status",
"stream": "Record",
"createdAt": "Created At"
},
"types": {
@@ -1831,7 +1939,8 @@
"appRequired": "Please select application",
"status": "Status"
},
"createDescription": "Add a new cloud constant"
"createDescription": "Add a new cloud constant",
"downloadFile": "Download File"
},
"cloudVariables": {
"title": "Cloud Variables",
@@ -1887,6 +1996,7 @@
"description": "Description",
"application": "Application",
"status": "Status",
"stream": "Record",
"createdAt": "Created At"
},
"types": {
@@ -1937,6 +2047,7 @@
"scope": "Scope"
},
"createDescription": "Add a new cloud variable",
"downloadFile": "Download File",
"records": {
"title": "Variable Records",
"description": "View records for variable {key}",
@@ -2041,6 +2152,25 @@
"updateFailed": "Failed to update",
"fetchFailed": "Failed to fetch cloud function"
},
"riskControl": {
"title": "Risk Control",
"description": "Manage risk control rules and ban strategies",
"columns": {
"value": "Banned Value"
}
},
"sessions": {
"title": "Sessions",
"description": "Manage online sessions and instances",
"columns": {
"instanceId": "Instance ID",
"deviceIdentifier": "Device Fingerprint",
"deviceName": "Device Name",
"username": "Username",
"appName": "Application",
"lastHeartbeat": "Last Heartbeat"
}
},
"extension": {
"title": "Extension Configuration",
"description": "Manage Webhooks and Open API keys",
@@ -2212,6 +2342,408 @@
"appVariablesDesc": "Read/write application cloud variables"
}
}
},
"systemSettings": {
"title": "System Settings",
"description": "Configure system settings",
"loadFailed": "Failed to load settings",
"saveSuccess": "Settings saved successfully",
"saveFailed": "Failed to save settings",
"saveSettings": "Save Settings",
"tabs": {
"basic": "Basic",
"security": "Security",
"backup": "Backup",
"cleanup": "Data Cleanup",
"feature": "Features",
"notification": "Notifications"
},
"basic": {
"title": "Basic Settings",
"description": "Configure website basic information",
"siteName": "Site Name",
"siteNamePlaceholder": "Enter site name",
"siteLogo": "Site Logo",
"uploadLogo": "Upload Logo",
"logoHint": "Supports JPG, PNG, SVG formats",
"remove": "Remove",
"favicon": "Site Favicon",
"uploadFavicon": "Upload Favicon",
"faviconHint": "Recommended 32x32 or 64x64 pixels ICO/PNG",
"siteFooter": "Footer Text",
"siteFooterPlaceholder": "Enter footer text"
},
"security": {
"title": "Security Settings",
"description": "Configure system security options",
"enableCaptcha": "Login Captcha",
"enableCaptchaDesc": "Require captcha verification on login",
"loginFailLockCount": "Login Failure Lock Count",
"loginFailLockCountHint": "Number of consecutive failures before account lockout",
"lockMinutes": "Lock Duration (minutes)",
"lockMinutesHint": "Duration of account lockout",
"passwordMinLength": "Minimum Password Length",
"passwordMinLengthHint": "Minimum character count for user passwords",
"sessionTimeout": "Session Timeout (hours)",
"sessionTimeoutHint": "User login session validity period"
},
"backup": {
"title": "Backup Settings",
"description": "Configure automatic database backup",
"enableBackup": "Enable Auto Backup",
"enableBackupDesc": "Automatically backup database on schedule",
"backupInterval": "Backup Interval (hours)",
"backupIntervalHint": "Hours between each backup",
"backupRetention": "Retention Days",
"backupRetentionHint": "Number of days to keep backup files",
"storageType": "Storage Location",
"storageTypePlaceholder": "Select storage location",
"storageTypeHint": "Backup file storage location, configurable in storage management",
"local": "Local Storage",
"s3": "S3 Storage",
"webdav": "WebDAV",
"ftp": "FTP",
"sftp": "SFTP"
},
"feature": {
"title": "Feature Settings",
"description": "Configure system feature toggles",
"ticketSystem": "Ticket System",
"ticketSystemDesc": "Allow users to submit support tickets",
"multiLang": "Multi-language Support",
"multiLangDesc": "Allow users to switch languages",
"defaultTheme": "Default Color Mode",
"defaultThemePlaceholder": "Select default color mode",
"defaultThemeHint": "Default color mode for new users",
"followSystem": "Follow System",
"lightMode": "Light Mode",
"darkMode": "Dark Mode"
},
"notification": {
"title": "Notification Settings",
"description": "Configure system notification options",
"enableNotification": "Enable Email Notifications",
"enableNotificationDesc": "Send email notifications when enabled",
"adminNotifyEmail": "Admin Notification Email",
"adminNotifyEmailHint": "Admin email for receiving system notifications",
"notifyEvents": "Notification Events",
"loginNotify": "Abnormal Login Notification",
"loginNotifyDesc": "Send notification when abnormal login detected",
"rechargeNotify": "Recharge Notification",
"rechargeNotifyDesc": "Send notification when user recharge succeeds",
"ticketNotify": "Ticket Notification",
"ticketNotifyDesc": "Send notification when new ticket submitted"
},
"cleanup": {
"title": "Data Cleanup",
"description": "Configure automatic cleanup rules for expired data to free database space",
"enableAutoCleanup": "Enable Auto Cleanup",
"enableAutoCleanupDesc": "Automatically clean up expired data on schedule",
"cleanupInterval": "Cleanup Interval (hours)",
"cleanupIntervalHint": "Hours between each cleanup execution",
"captchaRetention": "Captcha Retention Days",
"captchaRetentionHint": "Days to retain expired captchas",
"verifyCodeRetention": "Email/SMS Code Retention Days",
"verifyCodeRetentionHint": "Days to retain used email/SMS verification codes",
"apiUsageRetention": "API Usage Log Retention Days",
"apiUsageRetentionHint": "Days to retain API usage statistics",
"webhookLogRetention": "Webhook Log Retention Days",
"webhookLogRetentionHint": "Days to retain webhook delivery logs",
"deviceSessionRetention": "Device Session Retention Days",
"deviceSessionRetentionHint": "Days to retain expired device session records",
"saveCleanupSettings": "Save Cleanup Settings",
"runManualCleanup": "Run Cleanup Now",
"cleanupSaveSuccess": "Cleanup settings saved successfully",
"cleanupSaveFailed": "Failed to save cleanup settings",
"manualCleanupSuccess": "Manual cleanup completed",
"manualCleanupFailed": "Manual cleanup failed"
},
"upload": {
"logoSuccess": "Logo uploaded successfully",
"faviconSuccess": "Favicon uploaded successfully",
"uploadFailed": "Upload failed"
}
}
},
"auth": {
"login": {
"platformName": "Admin Panel",
"heroTitle": "Software License Management Platform",
"heroDesc": "Professional software verification and license management solution, providing comprehensive protection for your software",
"quickIntegration": "Quick Integration",
"secureReliable": "Secure & Reliable",
"dataAnalysis": "Data Analysis",
"userManagement": "User Management",
"welcomeBack": "Welcome Back",
"loginDesc": "Enter your credentials to sign in",
"username": "Username",
"usernamePlaceholder": "Enter username",
"password": "Password",
"passwordPlaceholder": "Enter password",
"forgotPassword": "Forgot password?",
"rememberMe": "Remember me",
"loginBtn": "Sign In",
"loggingIn": "Signing in...",
"noAccount": "Don't have an account?",
"registerNow": "Sign up",
"fillRequired": "Please enter username and password",
"loginSuccess": "Login successful",
"loginFailed": "Login failed, please check your username and password"
},
"register": {
"platformName": "Admin Panel",
"heroTitle": "Get Started",
"heroDesc": "Create an account and experience professional software license management",
"feature1": "Create applications for free, quick SDK integration",
"feature2": "Comprehensive user management and data analysis",
"feature3": "Flexible card license solutions",
"createAccount": "Create Account",
"registerDesc": "Fill in the information below to register",
"username": "Username",
"usernamePlaceholder": "Enter username",
"email": "Email",
"emailPlaceholder": "Enter email",
"password": "Password",
"passwordPlaceholder": "Enter password (at least 6 characters)",
"confirmPassword": "Confirm Password",
"confirmPasswordPlaceholder": "Enter password again",
"agreeTerms": "I have read and agree to the",
"termsOfService": "Terms of Service",
"and": "and",
"privacyPolicy": "Privacy Policy",
"registerBtn": "Sign Up",
"registering": "Registering...",
"hasAccount": "Already have an account?",
"loginNow": "Sign in",
"usernameRequired": "Please enter username",
"emailRequired": "Please enter email",
"passwordRequired": "Please enter password",
"passwordMinLength": "Password must be at least 6 characters",
"passwordMismatch": "Passwords do not match",
"agreeRequired": "Please agree to the terms of service",
"registerSuccess": "Registration successful, please login",
"registerFailed": "Registration failed"
}
},
"install": {
"checkingStatus": "Checking installation status...",
"wizardTitle": "System Installation Wizard",
"wizardDesc": "Welcome to the Software License Management Platform, please complete the following configuration",
"checkFailed": "Failed to check installation status",
"dbConfig": "Database Configuration",
"dbType": "Database Type",
"dbTypeSqlite": "SQLite",
"dbTypeSqliteDesc": "Lightweight, no additional service required, suitable for small deployments",
"dbTypeMysql": "MySQL",
"dbTypeMysqlDesc": "High performance, suitable for production environments",
"dbHost": "Host Address",
"dbPort": "Port",
"dbName": "Database Name",
"dbUsername": "Username",
"dbPassword": "Password",
"testConnection": "Test Connection",
"dbConnectFailed": "Database connection failed",
"dbConnectSuccess": "Database connection successful",
"securityConfig": "Security Configuration",
"jwtSecret": "JWT Secret",
"jwtSecretPlaceholder": "Leave empty to auto-generate",
"jwtSecretHint": "JWT secret is used to sign authentication tokens, please keep it safe",
"redisCache": "Redis Cache (Optional)",
"enableRedis": "Enable Redis",
"redisHost": "Host",
"redisPort": "Port",
"redisPassword": "Password",
"redisPasswordPlaceholder": "Optional",
"adminAccount": "Admin Account",
"adminUser": "Username",
"adminPass": "Password",
"adminPassPlaceholder": "At least 6 characters",
"adminPassMinLength": "Password must be at least 6 characters",
"adminEmail": "Email (Optional)",
"installComplete": "Installation Complete",
"installCompleteDesc": "The system has been successfully installed, you can now login with your admin account",
"goToLogin": "Go to Login",
"prevStep": "Previous",
"nextStep": "Next",
"installing": "Installing...",
"startInstall": "Start Installation",
"installFailed": "Installation failed",
"installSuccess": "Installation successful"
},
"profile": {
"changePassword": "Change Password",
"changePasswordDesc": "Enter your current password and new password, minimum 6 characters",
"currentPassword": "Current Password",
"currentPasswordPlaceholder": "Enter current password",
"newPassword": "New Password",
"newPasswordPlaceholder": "Enter new password",
"confirmPassword": "Confirm Password",
"confirmPasswordPlaceholder": "Enter new password again",
"cancel": "Cancel",
"confirmChange": "Confirm Change",
"basicInfo": "Basic Information",
"username": "Username",
"usernamePlaceholder": "Enter username",
"email": "Email",
"emailPlaceholder": "Enter email",
"phone": "Phone",
"phonePlaceholder": "Enter phone number",
"saveChanges": "Save Changes",
"joinedAt": "Joined at",
"apiToken": "API Token",
"apiTokenDesc": "API Token is used to call open API endpoints, please keep it safe and do not share it.",
"show": "Show",
"hide": "Hide",
"copy": "Copy",
"regenerateToken": "Regenerate",
"generateToken": "Generate Token",
"tokenRegenerated": "API Token has been regenerated",
"tokenRegenerateFailed": "Failed to regenerate",
"tokenCopied": "API Token copied to clipboard",
"recentTransactions": "Recent Transactions",
"viewAll": "View All",
"noTransactions": "No transactions yet",
"currentPlan": "Current Plan",
"basicPlan": "Basic",
"expiresAt": "Expires at",
"upgradePlan": "Upgrade Plan",
"apiCalls": "API Calls",
"storage": "Storage",
"accountStats": "Account Statistics",
"lastLogin": "Last Login",
"accountStatus": "Account Status",
"accountType": "Account Type",
"loadUserFailed": "Failed to load user information",
"fillComplete": "Please fill in all required fields",
"profileUpdateSuccess": "Profile updated successfully",
"profileUpdateFailed": "Update failed",
"currentPasswordRequired": "Please enter current password",
"newPasswordRequired": "Please enter new password",
"passwordMismatch": "Passwords do not match",
"passwordMinLength": "Password must be at least 6 characters",
"passwordChangeSuccess": "Password changed successfully",
"passwordChangeFailed": "Failed to change password",
"selectImageFile": "Please select an image file",
"imageSizeExceeded": "Image size cannot exceed 2MB",
"avatarUpdateSuccess": "Avatar updated successfully",
"avatarUpdateFailed": "Failed to upload avatar",
"roleAdmin": "Admin",
"roleAgent": "Agent",
"statusActive": "Active",
"statusInactive": "Inactive",
"statusBanned": "Banned",
"txRecharge": "Recharge",
"txConsume": "Consume",
"txRefund": "Refund"
},
"agent": {
"dashboard": {
"title": "Dashboard",
"welcomeBack": "Welcome back, here's your business overview",
"loadStatsFailed": "Failed to load statistics",
"authorizedApps": "Authorized Apps",
"authorizedAppsCount": "Number of authorized applications",
"totalCards": "Total Cards",
"todayGenerated": "Today",
"totalUsers": "Total Users",
"totalUsersDesc": "Cumulative registered users",
"totalRevenue": "Total Revenue",
"todayRevenue": "Today",
"quickActions": "Quick Actions",
"generateCards": "Generate Cards",
"appManagement": "App Management",
"userManagement": "User Management",
"financeManagement": "Finance Management",
"recentCards": "Recently Generated Cards",
"noCards": "No card records yet",
"unused": "Unused",
"used": "Used"
},
"finance": {
"title": "Finance Management",
"description": "View your account balance and transaction records",
"loadFailed": "Failed to load financial data",
"accountBalance": "Account Balance",
"transactionRecords": "Transaction Records",
"noTransactions": "No transactions yet",
"balance": "Balance",
"recharge": "Recharge",
"consume": "Consume",
"refund": "Refund"
},
"users": {
"title": "User Management",
"description": "Manage users under your applications",
"loadFailed": "Failed to load user list",
"noUsers": "No user records yet",
"username": "Username",
"email": "Email",
"status": "Status",
"registerTime": "Register Time",
"lastLogin": "Last Login",
"active": "Active"
},
"apps": {
"title": "App Management",
"description": "Manage your authorized applications",
"loadFailed": "Failed to load app list",
"noApps": "No authorized apps yet",
"noDescription": "No description",
"cardTypesCount": "card types",
"view": "View",
"detail": {
"loadFailed": "Failed to load app details",
"noDescription": "No description",
"availableCardTypes": "Available Card Types",
"cardTypeDesc": "You can generate the following card types for this application",
"noCardTypes": "No available card types",
"duration": "Duration",
"days": "days",
"price": "Price",
"generateCards": "Generate Cards",
"notFound": "Application not found or access denied"
}
},
"cards": {
"title": "Card Management",
"description": "Manage your generated cards",
"loadFailed": "Failed to load card list",
"generateCards": "Generate Cards",
"noCards": "No card records yet",
"cardCode": "Card Code",
"app": "Application",
"cardType": "Card Type",
"status": "Status",
"createTime": "Create Time",
"useTime": "Use Time",
"unused": "Unused",
"used": "Used",
"expired": "Expired",
"disabled": "Disabled",
"create": {
"title": "Generate Cards",
"description": "Generate cards for authorized applications",
"loadFailed": "Failed to load data",
"selectApp": "Please select an application",
"selectCardType": "Please select a card type",
"quantityRange": "Quantity must be between 1 and 100",
"generateSuccess": "Successfully generated {count} cards",
"copiedToClipboard": "Cards copied to clipboard",
"generateFailed": "Generation failed",
"generateSettings": "Generation Settings",
"settingsDesc": "Select application and card type, set generation quantity",
"selectAppLabel": "Select Application",
"selectAppPlaceholder": "Please select an application",
"selectCardTypeLabel": "Select Card Type",
"selectCardTypePlaceholder": "Please select a card type",
"quantity": "Quantity",
"quantityPlaceholder": "Enter quantity",
"quantityHint": "Maximum 100 cards per generation",
"estimatedCost": "Estimated Cost",
"cancel": "Cancel",
"generating": "Generating...",
"generateBtn": "Generate Cards"
}
}
},
"pricing": {
@@ -2294,6 +2826,7 @@
"advancedFeatures": "Advanced",
"contentManagement": "Content",
"systemManagement": "System",
"financeGroup": "Finance",
"console": "Console",
"applications": "Applications",
"cardTypes": "Card Types",
@@ -2303,7 +2836,8 @@
"users": "Users",
"devices": "Devices",
"sessions": "Sessions",
"agentApps": "Agent Apps",
"agents": "Agents",
"agentApps": "Authorizations",
"finance": "Finance",
"logs": "Logs",
"tickets": "Tickets",
@@ -2317,17 +2851,32 @@
"docCategories": "Doc Categories",
"docList": "Documents",
"packages": "Packages",
"systemSettings": "System Settings",
"paymentChannels": "Payment Channels",
"emailSettings": "Email Settings",
"smsSettings": "SMS Settings",
"storageConfigs": "Storage",
"basicSettings": "Basic Settings",
"emailSettings": "Email Service",
"smsSettings": "SMS Service",
"paymentSettings": "Payment Settings",
"security": "Security Settings",
"profile": "Profile",
"adminDashboard": "Admin Dashboard",
"agentDashboard": "Agent Dashboard",
"logout": "Logout",
"login": "Login",
"register": "Register",
"navigation": "Navigation"
"navigation": "Navigation",
"create": "Create",
"edit": "Edit",
"detail": "Detail",
"recharge": "Recharge",
"request": "Request Auth",
"invite": "Invite Auth",
"records": "Records",
"basicPlan": "Basic Plan",
"normal": "Normal",
"storage": "Storage",
"admin": "Admin",
"agent": "Agent"
},
"footer": {
"brand": "Weishouquan",