From 811b70f00580da0f6d183aa56484572412618c04 Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Sun, 14 Dec 2025 14:45:17 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=BB=84=E4=BB=B6=E5=92=8Chome?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dialogs/LanguageSwitch.vue | 31 +- src/components/dialogs/changePassword.vue | 49 +- src/components/locales/lang/en.js | 1717 ++++++++++++++++------------- src/components/locales/lang/zh-CN.js | 65 ++ src/views/home.vue | 67 +- 5 files changed, 1105 insertions(+), 824 deletions(-) diff --git a/src/components/dialogs/LanguageSwitch.vue b/src/components/dialogs/LanguageSwitch.vue index db2f8f3..e61e067 100644 --- a/src/components/dialogs/LanguageSwitch.vue +++ b/src/components/dialogs/LanguageSwitch.vue @@ -1,7 +1,7 @@ @@ -43,7 +43,7 @@ import request from "@/util/http.js"; import {useAdminStore} from '@/store/index.js'; import {storeToRefs} from "pinia"; -const {locale} = useI18n() +const { locale, t } = useI18n() // 控制弹窗显示 const dialogVisible = ref(false) @@ -55,17 +55,14 @@ const currentLang = computed(() => locale.value) const tempLang = ref('') // 语言选项 -const langOptions = [ - {label: '中文(简体)', value: 'zh-CN'}, - // {label: '中文(繁體)', value: 'zh-TW'}, - {label: 'English', value: 'en'}, - // {label: 'ภาษาไทย', value: 'th'}, - // {label: 'Tiếng Việt', value: 'vi'} -] +const langOptions = computed(() => ([ + { label: t('home.languageDialog.options.zhCN'), value: 'zh-CN' }, + { label: t('home.languageDialog.options.en'), value: 'en' }, +])) // 获取语言显示名称 const getLangLabel = (langCode) => { - const find = langOptions.find(item => item.value === langCode) + const find = langOptions.value.find(item => item.value === langCode) return find ? find.label : langCode } @@ -84,7 +81,7 @@ const handleConfirm = async () => { await getMenuTree() await selectMarket() - ElMessage.success(`语言已切换为:${getLangLabel(tempLang.value)}`) + ElMessage.success(t('elmessage.languageChangedSuccess', { lang: getLangLabel(tempLang.value) })) dialogVisible.value = false // 触发页面刷新以重新加载数据 setTimeout(() => { @@ -118,7 +115,7 @@ const getMenuTree = async function () { } catch (error) { console.error('菜单数据请求失败:', error) // return { code: 500, msg: '获取菜单失败' } - ElMessage.error('网络异常') + ElMessage.error(t('elmessage.inNetworkError')) adminStore.clearState() } } @@ -176,4 +173,4 @@ const selectMarket = async function () { height: 220px !important; overflow-y: auto !important; } */ - \ No newline at end of file + diff --git a/src/components/dialogs/changePassword.vue b/src/components/dialogs/changePassword.vue index d0577e0..fb045dc 100644 --- a/src/components/dialogs/changePassword.vue +++ b/src/components/dialogs/changePassword.vue @@ -7,10 +7,13 @@ import {ElMessage} from "element-plus"; import API from '@/util/http.js' import PasswordSuccess from '../PasswordSuccess.vue'; import router from "@/router/index.js"; +import { useI18n } from 'vue-i18n' // 父组件调用 const emit = defineEmits(['confirm']) +const { t } = useI18n() + const passwdFormRef = ref(null) const passwd = reactive({ account: '', @@ -43,7 +46,7 @@ const isComplexValid = computed(() => { watch(() => passwd.newPassword, (val) => { if (val && val === passwd.oldPassword) { - errorMsg.value = '新密码不能与旧密码一致' + errorMsg.value = t('home.password.rules.notSameAsOld') } else { errorMsg.value = '' } @@ -52,22 +55,22 @@ watch(() => passwd.newPassword, (val) => { const loading = ref(false) // 表单校验规则 const rules = reactive({ - oldPassword: [{required: true, message: '请输入原密码', trigger: 'blur'}], + oldPassword: [{required: true, message: t('home.password.oldPasswordPlaceholder'), trigger: 'blur'}], newPassword: [ - {required: true, message: '新密码不能为空', trigger: 'blur'}, + {required: true, message: t('home.password.rules.newPasswordRequired'), trigger: 'blur'}, { validator: (rule, value, callback) => { if (!/^[a-zA-Z0-9!@#$%^&*()-_+={}[\]|\\:;"'<>,.?/~\`]+$/.test(value)) { - callback(new Error('密码只能包含数字、字母或符号')); + callback(new Error(t('home.password.rules.allowedChars'))); } else if (value === passwd.oldPassword) { - callback(new Error('新密码不能与旧密码一致')) + callback(new Error(t('home.password.rules.notSameAsOld'))) } else if (value.length < 8 || value.length > 16) { - callback(new Error('长度应在 8 到 16 个字符')) + callback(new Error(t('home.password.rules.length'))) } else { const types = [/\d/, /[a-z]/, /[A-Z]/, /[!@#$%^&*()\-_+={}[\]|\\:;"'<>,.?/~`]/]; const matchCount = types.filter((r) => r.test(value)).length if (matchCount < 2) { - callback(new Error('密码至少包含两种类型(数字、字母或符号)')) + callback(new Error(t('home.password.rules.complexity'))) } else { callback() } @@ -77,11 +80,11 @@ const rules = reactive({ } ], againPassword: [ - {required: true, message: '请再次输入新密码', trigger: 'blur'}, + {required: true, message: t('home.password.rules.againPasswordRequired'), trigger: 'blur'}, { validator: (rule, value, callback) => { if (value !== passwd.newPassword) { - callback(new Error('两次输入密码不一致')) + callback(new Error(t('home.password.rules.notMatch'))) } else { callback() } @@ -107,7 +110,7 @@ const changePassword = async function () { if (result.code === 200) { // 使用命名路由跳转 //await router.push({ name: 'PasswordSuccess' }); - ElMessage.success('修改密码成功'); + ElMessage.success(t('elmessage.resetPasswordSuccess')); // 或者使用路径跳转(确保大小写完全匹配) //await router.push('/PasswordSuccess'); emit('confirm') @@ -117,20 +120,20 @@ const changePassword = async function () { router.push('/PasswordSuccess'); // push跳转,留下历史记录,replace跳转,不留下历史记录 }, 1000); }else if (result.code === 0){ - ElMessage.error('原密码错误,请重新输入') + ElMessage.error(t('elmessage.oldPasswordError')) passwd.oldPassword = ''; }else if(result.code === 400){ // 显示失败弹窗 console.log('修改密码失败') - ElMessage.error('修改密码失败') + ElMessage.error(t('elmessage.resetPasswordFailed')) //todo 待完善 } } catch (error) { console.error('修改密码失败', error) - ElMessage.error('操作失败') + ElMessage.error(t('elmessage.operationFailed')) // 抛出错误让外层捕获,保持finally正常执行 throw error } @@ -186,34 +189,34 @@ onMounted(() => { label-width="100px" class="password-form" > -

修改密码

+

{{ t('home.password.title') }}

- + - + - + @@ -225,13 +228,13 @@ onMounted(() => { - 密码由8-16位数字、字母或符号组成 + {{ t('home.password.tips.lengthAndChars') }}
- 至少含2种以上字符 + {{ t('home.password.tips.complexity') }}
@@ -250,7 +253,7 @@ onMounted(() => { :loading="loading" :disabled="!isLengthValid || !isComplexValid" > - {{ loading ? '修改中...' : '确定' }} + {{ loading ? t('home.password.submitting') : t('common.confirm') }}
diff --git a/src/components/locales/lang/en.js b/src/components/locales/lang/en.js index 8b5226a..9b51d9c 100644 --- a/src/components/locales/lang/en.js +++ b/src/components/locales/lang/en.js @@ -1,834 +1,1048 @@ - - // Do not modify the variables in this package arbitrarily!!! export default { // Common Group (Filters, Buttons, Units) common: { // Filters - name: 'Name', - account: 'OA Account', - accountPlaceholder: 'Please enter OA account', - jwcode: 'Homily ID', - jwcodePlaceholder: 'Please enter Homily ID', - activityName: 'Activity', - activityNamePlaceholder: 'Please enter activity name', - goodsName: 'Product Name', - goodsNamePlaceholder: 'Please enter product name', - productName: 'Product', - productNamePlaceholder: 'Please enter product', - payModel: 'Payment Method', - payModelPlaceholder: 'Select a payment method', - refundType: 'Refund Type', - refundTypePlaceholder: 'Select refund type', - refundCurrency: 'Refund Currency', - refundCurrencyPlaceholder: 'Select refund currency', - refundMethod: 'Refund Method', - refundMethodPlaceholder: 'Select refund method', - market: 'Region', - marketPlaceholder: 'Select region', - position: 'Position', - positionPlaceholder: 'Select position', - roleName: 'Role Name', - roleNamePlaceholder: 'Please enter role name', - orderStatus: 'Order Status', - orderStatusPlaceholder: 'Select order status', - payCurrency: 'Payment Currency', - payCurrencyPlaceholder: 'Select payment currency', - type: 'Type', - typePlaceholder: 'Select type', - orderNo: 'Order No.', - orderNoPlaceholder: 'Please enter order no.', - activityNameChoose: 'Choose activity', - articleVideoID: 'Post/Video ID', - articleVideoIDPlaceholder: 'Enter post/video ID', - author: 'Author', - authorPlaceholder: 'Enter author', - articleVideoTitle: 'Title', - articleVideoTitlePlaceholder: 'Enter title', - giftName: 'Gift', - giftNamePlaceholder: 'Enter gift', - channel: 'Channel', - channelPlaceholder: 'Enter channel', - liveRoom: 'Live Room', - liveRoomPlaceholder: 'Enter live room', - consumetime: 'Consume Time', - consumePlatform: 'Consumption Platform', - consumePlatformPlaceholder: 'Select consumption platform', - rechargePlatform: 'Recharge Platform', - rechargePlatformPlaceholder: 'Select recharge platform', - payPlatform: 'Platform', - payPlatformPlaceholder: 'Select platform', - updateType: 'Update Type', - updateTypePlaceholder: 'Select update type', - customerBelong: 'Customer Belonging', - activityBelong: 'Activity Belonging', - consumeTime: 'Consumption Time', - rechargeTime: 'Recharge Time', - refundTime: 'Refund Time', - updateTime: 'Update Time', - submitTime: 'Submit Time', - auditTime: 'Review time', - startTime: 'Start Time', - to: 'To', - endTime: 'End Time', - + name: "Name", + pleaseInputName: "Enter name", + customerName: "Customer", + customerNamePlaceholder: "Enter customer name", + jwcode: "Homily ID", + jwcodePlaceholder: "Enter Homily ID", + activityName: "Activity", + activityNamePlaceholder: "Enter activity", + activityNameChoose: "Choose activity", + goodsName: "Product Name", + goodsNamePlaceholder: "Enter product name", + account: "OA Account", + accountPlaceholder: "Enter OA account", + payModel: "Payment Method", + payModelPlaceholder: "Select payment method", + refundType: "Refund Type", + refundTypePlaceholder: "Select refund type", + market: "Region", + marketPlaceholder: "Select region", + position: "Position", + positionPlaceholder: "Select position", + roleName: "Role", + roleNamePlaceholder: "Enter role name", + refundCurrency: "Refund Currency", + refundCurrencyPlaceholder: "Select currency", + refundMethod: "Refund Via", + refundMethodPlaceholder: "Select method", + orderStatus: "Order Status", + orderStatusPlaceholder: "Select status", + payCurrency: "Pay Currency", + payCurrencyPlaceholder: "Select currency", + productName: "Product", + productNamePlaceholder: "Enter product", + type: "Type", + typePlaceholder: "Select type", + customerBelong: "Cust. Region", + activityBelong: "Activity Region", + articleVideoID: "Post/Video ID", + articleVideoIDPlaceholder: "Enter ID", + author: "Author", + authorPlaceholder: "Enter author", + articleVideoTitle: "Title", + articleVideoTitlePlaceholder: "Enter title", + giftName: "Gift", + giftNamePlaceholder: "Enter gift", + channel: "Channel", + channelPlaceholder: "Enter channel", + liveRoom: "Live Room", + liveRoomPlaceholder: "Enter live room", + consumePlatform: "Consume Platform", + consumePlatformPlaceholder: "Select platform", + rechargePlatform: "Recharge Platform", + rechargePlatformPlaceholder: "Select platform", + payPlatform: "Platform", + payPlatformPlaceholder: "Select platform", + updateType: "Update Type", + updateTypePlaceholder: "Select type", + orderNo: "Order No.", + orderNoPlaceholder: "Enter order no.", + consumeTime: "Consume Time", + consumetime: "Consume Time", + payTime: "Payment Time", + rechargeTime: "Recharge Time", + refundTime: "Refund Time", + updateTime: "Update Time", + submitTime: "Submit Time", + auditTime: "Audit Time", + startTime: "Start Time", + to: "To", + endTime: "End Time", // Buttons - search: 'Query', - searchLabel: 'Search', - searchPlaceholder: 'Enter keywords', - searchButton: 'Search', - exportExcel: 'Export Excel', - viewExportList: 'View Export List', - reset: 'Reset', - edit: 'Edit', - editPermission: 'Edit Permission', - resetPassword: 'Reset Password', - delete: 'Delete', - pass: 'Approve', - reject: 'Reject', - cancel: 'Cancel', - confirm: 'Confirm', - submit: 'Submit', - add: 'Add', - addUser: 'Add User', - addRole: 'Add Role', - save: 'Save', - saving: 'Saving...', - addActivity: 'Add Activity', - addReceive: 'Add Receive', - confirmRecharge: 'Confirm Recharge', - batchImport: 'Batch Import', - import: 'Import', - uploadHint: 'Drag file here or click to upload', - - // Buttons - Date - today: 'Today', - yesterday: 'Yesterday', - last7Days: 'Last 7 Days', - + search: "Query", + searchLabel: "Search", + searchPlaceholder: "Enter keywords", + searchButton: "Search", + exportExcel: "Export Excel", + viewExportList: "Export List", + reset: "Reset", + audit: "Audit", + refund: "Refund", + edit: "Edit", + editPermission: "Edit Perm", + resetPassword: "Reset Pwd", + delete: "Delete", + withdraw: "Recall", + pass: "Approve", + close: "Close", + reject: "Reject", + cancel: "Cancel", + confirm: "Confirm", + submit: "Submit", + add: "Add", + addUser: "Add User", + addRole: "Add Role", + save: "Save", + saving: "Saving...", + addActivity: "Add Activity", + modify: "Modify", + addReceive: "Add Receipt", + confirmRecharge: "Confirm", + batchImport: "Batch Import", + import: "Import", + uploadHint: "Drag file here or click", + pendingFee: "Fee Pending", + viewRejectReason: "Reject Reason", + // Buttons-Date + today: "Today", + yesterday: "Yesterday", + last7Days: "Last 7 Days", + // Buttons-Cash-Audit + pendingAudit: "Pending", + passed: "Passed", + completed: "Completed", + withdrawn: "Recalled", + rejected: "Rejected", + refunded: "Refunded", // Units - rechargeSGD: 'Recharge (SGD)', - consumeSGD: 'Consumption (SGD)', - refundGoldCoin: 'Total refunded coins', - totalGoldCoin: 'Total Gold Coins', - netGoldChange: 'Net Coin Change', + rechargeSGD: "Recharge (SGD)", + consumeSGD: "Consume (SGD)", + refundGoldCoin: "Refunded Coins", + totalGoldCoin: "Total Coins", + netGoldChange: "Net Change", netGoldChangeTip: - 'The current total shows the net change in gold coins within the selected range (Total Recharged - Total Consumed + Total Refunded)', - permanentGold: 'Permanent Gold Coins', - freeGold: 'Free Gold Coins', - taskGold: 'Task Gold Coins', - SGD: 'SGD', - goldCoin: '', - 条: 'items', - 个: '', - goldBean: '', - + "Current total shows net coin change in selected range (Recharge - Consume + Refund)", + permanentGold: "Permanent Coins", + freeGold: "Free Coins", + taskGold: "Task Coins", + SGD: "SGD", + goldCoin: "Coins", + 条: "items", + 个: "", + goldBean: "Beans", + // Gold Bean Units + totalGoldBean: "Total Beans:", + payGoldBean: "Paid Beans:", + freeGoldBean: "Free Beans:", + rechargeGoldBean: "Recharge Beans:", + totalRechargeSGD: "Total SGD:", + nowGoldBeanNum: "Current Beans:", + consumeGoldBean: "Consumed Beans:", // Dialog Titles - will: 'Will ', - deleteRecord: 'Delete Record!', - deleteTranslationRecord: 'Delete this translation record', - deleteActivityRecord: 'Delete this activity record', - noData: 'No data' - , - all: 'All' + will: "Will ", + deleteRecord: "Delete Record!", + deleteTranslationRecord: "Delete translation", + deleteActivityRecord: "Delete activity data", + willRefundOrder: "Will refund this order!", + willRecallOrder: "Will recall this order!", + // Markets + markets: { + headquarters: "HQ", + }, + noData: "No Data", + all: "All", }, - // Permission module + // Permission Module permission: { - warning: 'Warning', - user: 'this user', - changeRoleConfirmContent1: 'Confirm role change?
You are changing the role of [', - changeRoleConfirmContent2: '] from [', - changeRoleConfirmContent3: '] to [', - changeRoleConfirmContent4: ']
After the change, the user’s permissions will be updated to the new role configuration, including data access and functional operations. Please confirm carefully.', - changeRoleSuccessContent1: 'User ', - changeRoleSuccessContent2: ' role has been changed to [', - roleRegionNote: 'This region setting has no practical effect; it is only for branch managers to view roles by region.' + warning: "Warning", + user: "This user", + changeRoleConfirmContent1: "Confirm role change?
Changing role for [", + changeRoleConfirmContent2: "] from [", + changeRoleConfirmContent3: "] to [", + changeRoleConfirmContent4: + "]
Permissions will update to the new role configuration. Please confirm.", + changeRoleSuccessContent1: "User ", + changeRoleSuccessContent2: "'s role changed to [", + roleRegionNote: + "Region setting is for display only; used by branch managers to view roles.", }, // Message Group elmessage: { // Common - addSuccess: 'Added successfully', - submitFailed: 'Submission failed', - searchSuccess: 'Search completed', - requestFailed: 'Request failed', - inNetworkError: 'Network error, please try again', - prompt: 'Prompt', - jwcodeError: 'Invalid Homily ID', - addFailedUnknown: 'Add failed due to an unknown error', - addFailed: 'Add failed. Please check your network or contact the administrator', - queryFailed: 'Query failed. Please check your network or Homily ID', - refundTypeError: 'Refund type format error. Please contact the administrator', - getTotalFailed: 'Failed to obtain summary data. Please try again later', - payPlatformError: 'Platform data format error. Please contact the administrator', - confirmRefund: 'Confirm refund?', - + languageChangedSuccess: 'Language switched to {lang}', + refreshLoading: 'Refreshing data...', + refreshSuccess: 'Data refreshed', + refreshFailed: 'Refresh failed: {msg}', + unknownError: 'Unknown error', + refreshError: 'Refresh error, try again', + logoutSuccess: 'Logged out', + staffHidden: 'Staff data hidden', + staffShown: 'Staff data shown', + jumpSuccess: 'Navigated', + jumpFailed: 'Navigation failed', + oldPasswordError: 'Old password incorrect', + addSuccess: "Added successfully", + addsuccess: "Added successfully", + prompt: "Prompt", + editSuccess: "Edited successfully", + withdrawSuccess: "Recalled successfully", + dataException: "Data exception", + addRefundSuccess: "Refund added", + submitSuccess: "Submitted", + submitFailed: "Submission failed", + cancelOperation: "Cancelled", + searchSuccess: "Query successful", + searchFailed: "Query failed", + requestFailed: "Request failed", + jwcodeError: "Invalid Homily ID", + customerSuccess: "Customer found", + customerNotExist: "Customer not found", + addFailedUnknown: "Unknown error", + addUserPermissionFailed: "Add permission failed", + addFailed: "Add failed, check network/admin", + queryFailed: "Query failed, check network/ID", + refundTypeError: "Refund type error", + getTotalFailed: "Get total failed, retry later", + payPlatformError: "Platform info error", + confirmRefund: "Confirm refund?", + limitRedAmount: "Insufficient red envelope deduction", + inNetworkError: "Network error, retry", + adminInfoLoadFailed: "Admin info load failed", + deleteSuccess: "Deleted", + success: "Success", + confirmDeleteUser: "Delete this user?", + resetPasswordConfirm: "Reset this password?", + resetPasswordDefault: "Pwd will be: 123456", + checkAccountFormat: "Check OA format", + deviceLimitReached: "Device limit reached", + noParentRoleMarket: "Parent role has no region", + roleAddSuccess: "Role {roleName} added", + enableSuccess: "Enabled", + disableSuccess: "Disabled", + inputRoleName: "Enter role name", + roleNameLengthLimit: "Role name 2-20 chars", + selectPermissionList: "Select permission", + inputAccount: "Enter OA account", + onlyDigits: "Digits only", + lengthLimit20: "Max 20 chars", + inputUserName: "Enter username", + inputPosition: "Enter position", + inputAtLeastOneMachineCode: "Enter machine code", + roleNameDuplicate: "Role name exists", + resetPasswordSuccess: "Reset successful", + resetPasswordFailed: "Reset failed", + noPermissionResetMarket1: "No permission to modify ", + noPermissionResetMarket2: " region user passwords", + selectRoleName: "Select role name", + // Import & Upload + importSuccess: "Import successful", + importFailed: "Import failed", + importFailedNetworkOrFormat: "Check network/format", + onlyExcelAllowed: "Excel only", + fileTooLarge5MB: "Max 5MB", + fileSelectSuccess: "File selected", + uploadLimitOne: "One file only", + selectFileFirst: "Select file first", + // Plain text validation + onlyPlainText: "Plain text only, no HTML", // Validation - checkInputContent: 'Please verify the input content', - permanentAndFreeNoZero: 'Permanent and free gold coins cannot both be 0', - checkRate: 'Please select', - checkMoney: 'Please enter the amount', - checkJwcode: 'Please enter Homily ID', - checkGoodsName: 'Please select a product', - checkUserInfo: 'Please query user information first', - checkActivity: 'Please enter activity name', - checkPermanentGold: 'Please enter permanent gold coin amount', - checkFreeGold: 'Please enter free gold coin amount', - checkTaskGold: 'Please enter task gold coin amount', - checkNumber: 'Please enter a valid number', - checkPayModel: 'Please select a payment method', - checkPayTime: 'Please select a payment time', - checkQueryParams: 'Please check query parameters', - checkRefundType: 'Please select a refund type', - checkRefundGoods: 'Please select a refund product', - checkOrderNo: 'Please enter the order number', - + checkInputContent: "Check input", + permanentAndFreeNoZero: "Perm/Free coins cannot both be 0", + checkRate: "Select currency", + checkMoney: "Enter amount", + checkJwcode: "Enter Homily ID", + checkJwcodeFormat: "Invalid ID format", + checkGoodsName: "Select product", + checkUserInfo: "Query user first", + checkActivity: "Enter activity", + checkPermanentGold: "Enter perm coins", + checkFreeGold: "Enter free coins", + checkTaskGold: "Enter task coins", + checkNumber: "Enter valid number", + checkPayModel: "Select payment method", + checkPayTime: "Select payment time", + checkQueryParams: "Check params", + checkRefundType: "Select refund type", + checkRefundGoods: "Select refund product", + checkOrderNo: "Enter order no.", + checkPayBean: "Enter paid beans", + checkNonNegative: "Non-negative integer only", + checkFreeBean: "Enter free beans", + checkRemark: "Enter remark", + checkFormInfo: "Complete the form", + selectBusinessBelong: "Select performance region", + selectMarket: "Select region", + selectStartTime: "Select start time", + selectEndTime: "Select end time", + currentSelectionEmpty: "No data selected", + checkArticleIdFormat: "Check Article ID", + checkNameOrJwcode: "Enter Name or ID", + checkPermanentFormat: "Check perm coin format", + checkFreeFormat: "Check free coin format", + checkProductNum: "Enter quantity", + checkNumUnit: "Select unit", + productNumError: "Quantity must be integer > 0", + checkFormInfoSubmit: "Complete form to submit", + checkPayAmountFormat: "Check amount format", + checkNumberOrDecimal: "Enter number/decimal", // Validation Error - noEmptyJwcode: 'Homily ID cannot be empty', - noEmptySumGold: 'Total consumed gold coins cannot be empty', - noUser: 'User does not exist', - noOrder: 'No related order found', - noTotalGoldZero: 'Total gold coins cannot be 0', - noNegativeNumber: 'Negative numbers are not allowed', - limitDigitJwcode: 'Homily ID may only contain digits', - limitNoSpecialChar: 'Cannot contain special characters or negative numbers', - limitNegativeNumber: 'Consumed gold coins cannot be negative', - limitExceeded: 'Consumed gold coins exceed the available balance', - limitSix: 'Integer part cannot exceed 6 digits', - limitTwoDecimal: 'Decimal part cannot exceed 2 digits', - limitZero: 'Amount cannot be less than 0', - limitPositiveNumber: 'Enter a positive number greater than 0 (up to 2 decimals)', - limitJwcodeNine: 'Homily ID must be numeric and up to 9 digits', - limitBalance: 'Entered amount exceeds available balance', - limitRedAmount: 'Insufficient total amount (coins + red envelope)', - + noEmptyJwcode: "Homily ID required", + noEmptySumGold: "Total consumed coins required", + noUser: "User not found", + noOrder: "Order not found", + noTotalGoldZero: "Total coins cannot be 0", + noNegativeNumber: "No negative numbers", + noPayBeanFreeBeanZero: "Paid/Free beans cannot both be 0", + limitDigitJwcode: "ID digits only", + limitJwcodeLength: "ID max 8 digits", + limitNoSpecialChar: "No special chars/negative", + limitNegativeNumber: "Consumed cannot be negative", + limitExceeded: "Exceeds available balance", + limitSix: "Integer max 6 digits", + limitTwoDecimal: "Decimal max 2 digits", + limitZero: "Amount cannot be < 0", + limitPositiveNumber: "Enter positive number (>0, max 2 decimals)", + limitPositiveNumber2: "Valid amount (max 2 decimals)", + limitPayAmountZero: "Amount cannot be 0", + limitPayAmountMax: "Max amount 9,999,999", + limitPayAmountFormat: "Max 6 integers, 2 decimals", + limitJwcodeNine: "ID must be digits (max 9)", + limitBalance: "Amount > balance", + limitRefundAmount: "Refund > Order Amount", // Image Upload - onlyUploadJPGPNG: 'Only JPG/PNG images are allowed', - limitImageSize: 'Image size cannot exceed 1MB', - uploadSuccess: 'Upload successful', - uploadFailed: 'Upload failed', - + onlyUploadJPGPNG: "JPG/PNG only!", + limitImageSize: "Max 1MB!", + uploadSuccess: "Upload success", + uploadFailed: "Upload failed", + photoFormatError: "Must be JPG/PNG!", + limitImageSize2MB: "Max 2MB!", // Audit - noPermission: 'No permission', - checkJwcodeFormat: 'Please check the Homily ID format', - rejectReasonPlaceholder: 'Please enter a rejection reason', - rejectSuccess: 'Rejected successfully', - rejectFailed: 'Rejection failed', - operationFailed: 'Operation failed', - approveSuccess: 'Review approved successfully', - approveFailed: 'Approval failed', - activityFormatError: 'Activity data format error. Please contact the administrator', - rechargeFormatError: 'Recharge method format error. Please contact the administrator', - getRechargeError: 'Failed to obtain recharge methods. Please try again later', - deleteSuccess: 'Deleted successfully', - success: 'Success', - confirmDeleteUser: 'Are you sure you want to delete this user?', - resetPasswordConfirm: 'Confirm reset for this account password?', - resetPasswordDefault: 'After reset, the password will be: 123456. Please notify the user to change it.', - checkAccountFormat: 'Please check OA account format', - deviceLimitReached: 'Device count has reached the limit', - noParentRoleMarket: 'The selected parent role has no associated region', - roleAddSuccess: 'Role {roleName} added successfully', - enableSuccess: 'Enabled successfully', - disableSuccess: 'Disabled successfully', - inputRoleName: 'Please enter role name', - roleNameLengthLimit: 'Role name length should be 2–20 characters', - selectPermissionList: 'Please select permission list', - inputAccount: 'Please enter OA account', - onlyDigits: 'Must be digits', - lengthLimit20: 'Length must not exceed 20 characters', - inputUserName: 'Please enter user name', - inputPosition: 'Please enter position', - inputAtLeastOneMachineCode: 'Please enter at least one machine code', - roleNameDuplicate: 'Role name already exists', - resetPasswordSuccess: 'Password reset successful', - resetPasswordFailed: 'Password reset failed', - noPermissionResetMarket: 'You do not have permission to modify passwords for users in the {market} region', - // Import & Upload - importSuccess: 'Import successful', - importFailed: 'Import failed', - importFailedNetworkOrFormat: 'Import failed. Please check your network or file format', - onlyExcelAllowed: 'Only Excel files are allowed', - fileTooLarge5MB: 'File size cannot exceed 5MB', - fileSelectSuccess: 'File selected successfully', - uploadLimitOne: 'You can upload only one file', - selectFileFirst: 'Please select a file first', - // Plain text validation - onlyPlainText: 'Only plain text is supported; HTML is not allowed', - + noPermission: "No permission", + rejectReasonPlaceholder: "Enter reject reason", + rejectSuccess: "Rejected", + rejectFailed: "Reject failed", + operationFailed: "Operation failed", + approveSuccess: "Approved", + approveFailed: "Approve failed", + editSuccess: "Edit submitted", + editFailed: "Edit failed", + activityFormatError: "Activity data format error", + rechargeFormatError: "Recharge method error", + getRechargeError: "Get method failed", + formValidationFailed: "Validation failed", // Export - exportSuccess: 'Export successful', - exportFailed: 'Export failed. Please try again later', - getExportListError: 'Failed to retrieve export list. Please try again later', - exportingInProgress: 'File is being generated. Please try again later', - + exportSuccess: "Export successful", + exportFailed: "Export failed, retry later", + getExportListError: "Get list failed", + exportingInProgress: "Exporting...", // Export Status - pendingExecution: 'Pending', - executing: 'In Progress', - executed: 'Completed', - errorExecution: 'Error', - unknownStatus: 'Unknown', + pendingExecution: "Pending", + executing: "Processing", + executed: "Done", + errorExecution: "Error", + unknownStatus: "Unknown", + // Fetch + getMarketListFailed: "Get markets failed", + getChartDataFailed: "Get chart data failed", + renderChartFailed: "Chart render failed", + // Rate + pleaseInputRate: "Enter rate", + pleaseInputCorrectRateFormat: "Check rate format", + pleaseInputCorrectSymbol: "Check symbol", + onlyOneDecimalPoint: "One decimal point only", + integerPartLimit: "Integer max 6 digits", + decimalPartLimit: "Decimal max 7 digits", + // Gold Bean + systemRechargeAreaError: "System recharge region error", + onlineRechargeAreaError: "Online recharge region error", + // Gold Bean Consume + getGiftListFailed: "Get gifts failed", + getChannelListFailed: "Get channels failed", + getRegionListFailed: "Get regions failed", + // Cash Management + jwcodePositiveError: "ID must be positive integer", + orderDataLoadFailed: "Order load failed", + onlineDataSupport: "Online supports coin recharge only", + selectRefundModel: "Select refund method", + refundReasonPlaceholder: "Enter refund reason", + activityLoadFailed: "Activity load failed", + activityDataLoadFailed: "Activity data error", + // Permission + noPermissionText: "No permission, contact admin", + permissionPrompt: "Permission Prompt", + noRoleAssigned: "No role assigned", + unknownRole: "Unknown role", }, // Common List Fields common_list: { - id: 'No.', - originalChinese: 'Original Chinese', - english: 'English', - thai: 'Thai', - chineseTraditional: 'Traditional Chinese', - malay: 'Malay', - vietnamese: 'Vietnamese', - translated: 'Translated', - untranslated: 'Untranslated', - account: 'OA Account', - name: 'Name', - jwcode: 'Homily ID', - market: 'Region', - position: 'Position', - roleName: 'Role Name', - rolePermission: 'Role Permission', - departmentPermission: 'Department Permission', - parentRole: 'Parent Role', - permissionScope: 'Permission Scope', - sumGold: 'Total Coins', - payPlatform: 'Platform', - type: 'Update Type', - orderNo: 'Order No.', - goodsName: 'Product Name', - refundType: 'Refund Type', - refundModel: 'Refund Method', - refundModelAll: 'Full Refund', - refundModelPart: 'Partial Refund', - refundGoldCoin: 'Total refunded coins', - activity: 'Activity', - businessBelong: 'Performance Belonging', - productName: 'Product', - productNum: 'Quantity', - number: 'Quantity', - money: 'Amount', - refundCurrency: 'Refund Currency', - refundAmount: 'Refund Amount', - refundChannels: 'Refund Method', - refundVoucher: 'Refund Voucher', - startTime: 'Start Time', - endTime: 'End Time', - status: 'Status', - creator: 'Creator', - operator: 'Operator', - approver: 'Auditor', - rateName: 'Currency', - rechargeAmount: 'Recharge Amount', - Gold: 'Gold Coin Quantity', - freeGold6Month: 'Free Gold (Exp. June)', - freeGold12Month: 'Free Gold (Exp. Dec)', - permanentGold: 'Permanent Gold Coins', - freeGold: 'Free Gold Coins', - taskGold: 'Task Gold Coins', - rechargePlatform: 'Recharge Platform', - consumePlatform: 'Consumption Platform', - consumeTotalGold: 'Total coins consumed', - payModel: 'Payment Method', - remark: 'Remark', - orderStatus: 'Order Status', - submitter: 'Submitter', - operator: 'Operator', - approver: 'Auditor', - rechargeTime: 'Recharge Time', - consumeTime: 'Consumption Time', - refundTime: 'Refund Time', - updateTime: 'Update Time', - receiveTime: 'Payment Received Time', - rejectTime: 'Rejected Time', - rejectReason: 'Reject Reason', + id: "No.", + originalChinese: "Chinese", + english: "English", + thai: "Thai", + chineseTraditional: "Trad. Chinese", + malay: "Malay", + vietnamese: "Vietnamese", + translated: "Translated", + untranslated: "Untranslated", + account: "OA Account", + name: "Name", + jwcode: "Homily ID", + market: "Region", + position: "Position", + roleName: "Role", + departmentPermission: "Dept Perm", + parentRole: "Parent Role", + permissionScope: "Scope", + gift: "Gift", + sumGold: "Total Coins", + payPlatform: "Platform", + type: "Type", + orderNo: "Order No.", + number: "Qty", + money: "Amount", + goodsName: "Product Name", + productName: "Product", + productNum: "Qty", + refundType: "Refund Type", + refundModel: "Refund Method", + refundModelAll: "Full Refund", + refundModelPart: "Part Refund", + refundCurrency: "Refund Curr", + refundGoldCoin: "Refunded Coins", + refundAmount: "Refund Amt", + refundChannels: "Refund Via", + refundVoucher: "Refund IMG", + refundSuccess: "Refund Success", + activity: "Activity", + businessBelong: "Region", + startTime: "Start Time", + endTime: "End Time", + status: "Status", + creator: "Creator", + rateName: "Currency", + num: "Rate", + rechargeAmount: "Recharge Amt", + Gold: "Coin Qty", + freeGold6Month: "Free (Exp Jun)", + freeGold12Month: "Free (Exp Dec)", + permanentGold: "Perm Coins", + freeGold: "Free Coins", + taskGold: "Task Coins", + rechargePlatform: "Recharge Plat", + consumePlatform: "Consume Plat", + consumeTotalGold: "Total Consumed", + payModel: "Payment", + remark: "Remark", + orderStatus: "Status", + submitter: "Submitter", + operator: "Operator", + approver: "Approver", + rechargeTime: "Recharge Time", + consumeTime: "Consume Time", + refundTime: "Refund Time", + updateTime: "Update Time", + receiveTime: "Received Time", + rejectTime: "Reject Time", + rejectReason: "Reason", + operation: "Action", + // Gold Bean + permanentBean: "Paid Beans", + freeBean: "Free Beans", + mobile: "Phone", + other: "Other", + beanNum: "Bean Qty", + beanNumTotal: "Total Beans", + isBackpack: "Backpack", + yes: "Yes", + no: "No", + channel: "Channel", + liveRoomName: "Live Room", + consumetime: "Consume Time", + memberType: "Member Type", + unknownType: "Unknown", + joinTime: "Join Time", + articleVideoID: "Post/Video ID", + articleVideoTitle: "Title", + author: "Author", + payTime: "Pay Time", + currentGoldBean: "Current Beans", + historyConsumption: "Hist. Consume", + customerName: "Customer", + // Cash Management + goldRecharge: "Coin Recharge", + payCurrency: "Pay Currency", + payAmount: "Pay Amount", + receiveCurrency: "Rcv Currency", + receiveAmount: "Rcv Amount", + toSupply: "Pending", + pending: "Pending", + fee: "Fee", + transferVoucher: "Transfer IMG", + payVoucher: "Payment IMG", + refund: "Refund", + normal: "Normal", activityStatus: { - notStarted: 'Not Started', - inProgress: 'In Progress', - ended: 'Ended', + notStarted: "Not Started", + inProgress: "In Progress", + ended: "Ended", }, - operation: 'Operation', - configTime: 'Configuration Time', - status: 'Status', - enable: 'Enable', - disable: 'Disable', + configTime: "Config Time", + enable: "Enable", + disable: "Disable", }, - // Common Export Fields common_export: { - exportList: 'Export List', - fileName: 'File Name', - status: 'Status', - createTime: 'Created At', - operation: 'Operation', - download: 'Download', - close: 'Close', + exportList: "Export List", + fileName: "File Name", + status: "Status", + createTime: "Created At", + operation: "Action", + download: "Download", + close: "Close", }, // Add Form Fields common_add: { - jwcode: 'Homily ID', - jwcodePlaceholder: 'Please enter Homily ID', - originalChinese: 'Original Chinese', - originalChinesePlaceholder: 'Enter original Chinese', - english: 'English', - englishPlaceholder: 'Enter English', - thai: 'Thai', - thaiPlaceholder: 'Enter Thai', - chineseTraditional: 'Traditional Chinese', - chineseTraditionalPlaceholder: 'Enter Traditional Chinese', - malay: 'Malay', - malayPlaceholder: 'Enter Malay', - vietnamese: 'Vietnamese', - vietnamesePlaceholder: 'Enter Vietnamese', - addTranslation: 'Add Translation', - editTranslation: 'Edit Translation', - addUserPermission: 'Add User Permission', - editUserPermission: 'Edit User Permission', - account: 'OA Account', - accountPlaceholder: 'Please enter OA account', - market: 'Region', - marketPlaceholder: 'Enter region', - userName: 'User Name', - userNamePlaceholder: 'Please enter user name', - roleName: 'Role Name', - roleNamePlaceholder: 'Please select role name', - parentRole: 'Parent Role', - noParentRole: 'No Parent Role', - permissionList: 'Permission List', - machineCode: 'Machine Code', - machineCodePlaceholder: 'Please enter machine code', - remark: 'Remark', - addRole: 'Add Role', - editRole: 'Edit Role', - permissionDetails: 'Permission Details', - channelName: 'Channel Name', - channelPlaceholder: 'Please select channel', - customerName: 'Customer Name', - customerNamePlaceholder: 'Please enter the customer name', - rejectReason: 'Reject Reason', - rejectReasonPlaceholder: 'Enter reject reason', - originalChinese: 'Original Chinese', - originalChinesePlaceholder: 'Enter original Chinese', - english: 'English', - englishPlaceholder: 'Enter English', - thai: 'Thai', - thaiPlaceholder: 'Enter Thai', - chineseTraditional: 'Traditional Chinese', - chineseTraditionalPlaceholder: 'Enter Traditional Chinese', - malay: 'Malay', - malayPlaceholder: 'Enter Malay', - vietnamese: 'Vietnamese', - vietnamesePlaceholder: 'Enter Vietnamese', - addTranslation: 'Add Translation', - editTranslation: 'Edit Translation', - activity: 'Activity', - activityPlaceholder: 'Please enter activity name', - businessBelong: 'Performance Belonging', - startTime: 'Start Time', - endTime: 'End Time', - permanentGold: 'Permanent Gold Coins', - freeGold: 'Free Gold Coins', - taskGold: 'Task Gold Coins', - rechargeAmount: 'Recharge Amount', - currencyName: 'Currency', - goodsName: 'Product Name', - productName: 'Product', - productNamePlaceholder: 'Select product', - productNum: 'Quantity', - productNumPlaceholder: 'Enter quantity', - numUnit: 'Unit', - payCurrency: 'Payment Currency', - payCurrencyPlaceholder: 'Select payment currency', - payAmount: 'Payment Amount', - payAmountPlaceholder: 'Enter payment amount', - payMethod: 'Payment Method', - payMethodPlaceholder: 'Select payment method', - receiveArea: 'Receiving Region', - receiveAreaPlaceholder: 'Select receiving region', - price: 'Original Price', - goodsNamePlaceholder: 'Select product', - payModel: 'Collection Method', - refundType: 'Refund Type', - refundTypePlaceholder: 'Select refund type', - orderNo: 'Order No.', - orderNoPlaceholder: 'Select order number', - refundModel: 'Refund Method', - refundModelAll: 'Full Refund', - refundModelPart: 'Partial Refund', - refundGoldCoin: 'Total refunded coins', - refundCurrency: 'Refund Currency', - refundCurrencyPlaceholder: 'Select refund currency', - refundAmount: 'Refund Amount', - refundAmountPlaceholder: 'Enter refund amount', - refundChannels: 'Refund Method', - refundChannelsPlaceholder: 'Select refund method', - refundTime: 'Refund Time', - refundTimePlaceholder: 'Select refund time', - refundVoucher: 'Refund Voucher', - payModelPlaceholder: 'Select collection method', - consumeTotalGold: 'Total coins consumed', - totalGold: 'Total Coins', - paymentTime: 'Payment Time', - paymentVoucher: 'Payment Voucher', - transferVoucher: 'Transfer Voucher', - noTransferVoucher: 'No Transfer Voucher', - transferVoucherPlaceholder: 'JPG/PNG only, ≤2MB', - uploadPhoto: 'Please upload image', - paymentVoucherPlaceholder: 'JPG/PNG only, ≤1MB', - remark: 'Remark', - remarkPlaceholder: 'Enter remark', - - // Confirm Form - operationConfirm: 'Operation Confirmation', - userInfo: 'User Information', - prompt: 'Duplicate Recharge Warning', - similarRechargeRecords: 'Recent similar recharge records were detected for this user', - rechargePermanentGold: 'Recharge permanent coins', - buy: 'Purchase', - operator: 'Operator', - continueOperation: 'Do you want to continue the operation?', + jwcode: "Homily ID", + jwcodePlaceholder: "Enter Homily ID", + originalChinese: "Chinese", + originalChinesePlaceholder: "Enter Chinese", + english: "English", + englishPlaceholder: "Enter English", + thai: "Thai", + thaiPlaceholder: "Enter Thai", + chineseTraditional: "Trad. Chinese", + chineseTraditionalPlaceholder: "Enter Trad. Chinese", + malay: "Malay", + malayPlaceholder: "Enter Malay", + vietnamese: "Vietnamese", + vietnamesePlaceholder: "Enter Vietnamese", + addTranslation: "Add Trans", + editTranslation: "Edit Trans", + // User & Role + addUserPermission: "Add User Perm", + editUserPermission: "Edit User Perm", + account: "OA Account", + accountPlaceholder: "Enter OA account", + userName: "Username", + userNamePlaceholder: "Enter username", + roleName: "Role", + roleNamePlaceholder: "Select role", + parentRole: "Parent Role", + noParentRole: "None", + permissionList: "Permissions", + machineCode: "Machine Code", + machineCodePlaceholder: "Enter machine code", + remark: "Remark", + addRole: "Add Role", + editRole: "Edit Role", + permissionDetails: "Perm Details", + channelName: "Channel", + channelPlaceholder: "Select channel", + customerName: "Customer", + customerNamePlaceholder: "Enter customer name", + rejectReason: "Reject Reason", + rejectReasonPlaceholder: "Enter reason", + market: "Region", + marketPlaceholder: "Enter region", + activity: "Activity", + activityPlaceholder: "Enter activity", + businessBelong: "Region", + startTime: "Start Time", + endTime: "End Time", + permanentGold: "Perm Coins", + freeGold: "Free Coins", + taskGold: "Task Coins", + rechargeAmount: "Recharge Amt", + currencyName: "Currency", + goodsName: "Product", + productName: "Product", + productNamePlaceholder: "Select product", + productNum: "Qty", + productNumPlaceholder: "Enter quantity", + numUnit: "Unit", + payCurrency: "Pay Currency", + payCurrencyPlaceholder: "Select currency", + payAmount: "Pay Amount", + payAmountPlaceholder: "Enter amount", + payMethod: "Payment", + payMethodPlaceholder: "Select method", + receiveArea: "Rcv Region", + receiveAreaPlaceholder: "Select region", + price: "Price", + goodsNamePlaceholder: "Select product", + payModel: "Collection", + refundType: "Refund Type", + refundTypePlaceholder: "Select type", + orderNo: "Order No.", + orderNoPlaceholder: "Select order", + refundModel: "Method", + refundModelAll: "Full", + refundModelPart: "Partial", + refundGoldCoin: "Refund Coins", + refundCurrency: "Refund Curr", + refundCurrencyPlaceholder: "Select currency", + refundAmount: "Refund Amt", + refundAmountPlaceholder: "Enter amount", + refundChannels: "Refund Via", + refundChannelsPlaceholder: "Select method", + refundTime: "Refund Time", + refundTimePlaceholder: "Select time", + refundVoucher: "Refund IMG", + payModelPlaceholder: "Select method", + consumeTotalGold: "Total Consumed", + totalGold: "Total Coins", + paymentTime: "Pay Time", + payTime: "Pay Time", + payTimePlaceholder: "Select time", + paymentVoucher: "Pay Voucher", + transferVoucher: "Transfer IMG", + noTransferVoucher: "No Voucher", + paymentVoucherPlaceholder: "JPG/PNG ≤1MB", + transferVoucherPlaceholder: "JPG/PNG ≤2MB", + uploadPhoto: "Upload Image", + remarkPlaceholder: "Enter remark", + // Confirm + operationConfirm: "Confirm", + userInfo: "User Info", + prompt: "Risk Alert", + similarRechargeRecords: "Similar recent records detected", + rechargePermanentGold: "Recharge Perm Coins", + buy: "Buy", + operator: "Operator", + submitter: "Submitter", + continueOperation: "Continue?", + // Gold Bean + permanentBean: "Paid Beans", + freeBean: "Free Beans", // Cash - receiveCurrency: 'Receiving Currency', - receiveCurrencyPlaceholder: 'Select receiving currency', - receiveAmount: 'Receiving Amount', - receiveAmountPlaceholder: 'Enter receiving amount', - fee: 'Fee', - feePlaceholder: 'Enter fee', - receiveTime: 'Payment Received Time', - receiveTimePlaceholder: 'Select received time', - refundReason: 'Refund Reason', - tip: 'ps: state the user’s refund request in the reason.', - refund: 'Refund', + receiveCurrency: "Rcv Currency", + receiveCurrencyPlaceholder: "Select currency", + receiveAmount: "Rcv Amount", + receiveAmountPlaceholder: "Enter amount", + fee: "Fee", + feePlaceholder: "Enter fee", + receiveTime: "Rcv Time", + receiveTimePlaceholder: "Select time", + refundReason: "Reason", + tip: "Note: State user refund request.", + refund: "Refund", }, - - // Add Form User Info + // Add Form Customer Info common_add_user: { - customerInfo: 'Customer Information', - name: 'Name', - currentGoldCoinTotal: 'Current total coins', - permanentGold: 'Permanent Gold Coins', - freeGold: 'Free Gold Coins', - taskGold: 'Task Gold Coins', - jwcode: 'Homily ID', - consumptionTimes: 'Consumption Count', - onlyStatisticsDataAfter20250101: 'Statistics only include data after 2025-01-01', - store: 'Store', - maxReductionAmount: 'Maximum Redemption Amount', - currentPayableBean: 'Current paid beans', - currentFreeBean: 'Current free beans', - consumeTotalBean: 'Total consumed beans', - permanentBean: 'Paid Gold Beans', - freeBean: 'Free Gold Beans', + customerInfo: "Customer Info", + name: "Name", + currentGoldCoinTotal: "Total Coins", + permanentGold: "Perm Coins", + freeGold: "Free Coins", + taskGold: "Task Coins", + jwcode: "Homily ID", + consumptionTimes: "Consumptions", + onlyStatisticsDataAfter20250101: "Stats after 2025-01-01", + store: "Store", + maxReductionAmount: "Max Deduction", + // Bean + currentPayableBean: "Current Paid", + currentFreeBean: "Current Free", + consumeTotalBean: "Total Consumed", + permanentBean: "Paid Beans", + freeBean: "Free Beans", }, // Audit Group audit: { + // General refundTypeOptions: { - '商品退款': 'Product Refund', - '金币退款': 'Gold Coin Refund', + 商品退款: "Product Refund", + 金币退款: "Coin Refund", }, - waitAudit: 'Pending', - passed: 'Approved', - rejected: 'Rejected', - permanentGold: 'Permanent Gold Coins', - freeGold: 'Free Gold Coins', - taskGold: 'Task Gold Coins', - - id: 'No.', - name: 'Name', - jwcode: 'Homily ID', - market: 'Region', - activityName: 'Activity', - currencyName: 'Currency', - rechargeAmount: 'Recharge Amount', - note: 'Remark', - payModel: 'Payment Method', - paymentVoucher: 'Payment Voucher', - submitter: 'Submitter', - auditor: 'Auditor', - rejectReason: 'Rejection Reason', - rejectReasonPlaceholder: 'Enter rejection reason', - paymentTime: 'Payment Time', - submitTime: 'Submit Time', - auditTime: 'Review time', - operation: 'Operation', - - orderCode: 'Order No.', - refundType: 'Refund Type', - refundModel: 'Refund Method', - allRefund: 'Full Refund', - partialRefund: 'Partial Refund', - refundGoods: 'Refund Product', - - permanentBean: 'Paid Gold Beans', - freeBean: 'Free Gold Beans', - - rechargeAudit: 'Recharge Audit', - rechargeSGD: 'Recharge (SGD)', - totalGold: 'Total Gold Coins', - + waitAudit: "Pending", + passed: "Passed", + rejected: "Rejected", + permanentGold: "Perm Coins", + freeGold: "Free Coins", + taskGold: "Task Coins", + // Recharge Audit List + id: "No.", + name: "Name", + jwcode: "Homily ID", + market: "Region", + activityName: "Activity", + currencyName: "Currency", + rechargeAmount: "Amount", + note: "Note", + payModel: "Payment", + paymentVoucher: "Voucher", + submitter: "Submitter", + auditor: "Auditor", + rejectReason: "Reject Reason", + rejectReasonPlaceholder: "Enter reason", + paymentTime: "Pay Time", + submitTime: "Submit Time", + auditTime: "Audit Time", + operation: "Action", + // Refund Audit List + orderCode: "Order No.", + refundType: "Type", + refundModel: "Method", + allRefund: "Full", + partialRefund: "Partial", + refundGoods: "Product", + // Bean Audit + permanentBean: "Paid Beans", + freeBean: "Free Beans", + // Coin Recharge + rechargeAudit: "Recharge Audit", + rechargeSGD: "Recharge SGD", + totalGold: "Total Coins", + // Pay Methods payMethods: { - bankTransfer: 'Bank Transfer', - cash: 'Cash', - check: 'Check', - card: 'Card Payment', - grabpay: 'GrabPay', - nets: 'NETS', - paypal: 'PayPal', - stripe: 'Stripe (Link)', - ipay88: 'iPay88 (Link)', - paymentAsia: 'PaymentAsia (Link)', - other: 'Other', + bankTransfer: "Bank Transfer", + cash: "Cash", + check: "Check", + card: "Card", + grabpay: "Grabpay", + nets: "Nets", + paypal: "PayPal", + stripe: "Stripe", + ipay88: "Ipay88", + paymentAsia: "PaymentAsia", + other: "Other", }, - - refundAudit: 'Refund Audit', - refundTotalGold: 'Total Total refunded coins', - - totalNum: 'Total Items', - totalBean: 'Total Gold Beans', - - rejectRecord: 'Reject This Record', - passRecord: 'Approve This Record', + // Coin Refund + refundAudit: "Refund Audit", + refundTotalGold: "Refund Total Coins", + // Bean Audit + totalNum: "Total Items", + totalBean: "Total Beans", + // Dialog Titles + rejectRecord: "Reject Record!", + passRecord: "Approve Record!", }, // Recharge Group recharge: { - coinRechargeDetail: 'Gold Coin Recharge Details', - - normal: 'Normal', - refunded: 'Refunded', - unknown: 'Unknown', - - addCoinRecharge: 'New Recharge', - + coinRechargeDetail: "Coin Recharge Details", + normal: "Normal", + refunded: "Refunded", + unknown: "Unknown", + addCoinRecharge: "New Recharge", + // Pay Methods payMethods: { - bankTransfer: 'Bank Transfer', - cash: 'Cash', - check: 'Check', - card: 'Card Payment', - grabpay: 'GrabPay', - nets: 'NETS', - paypal: 'PayPal', - stripe: 'Stripe (Link)', - ipay88: 'iPay88 (Link)', - paymentAsia: 'PaymentAsia (Link)', - other: 'Other', + bankTransfer: "Bank Transfer", + cash: "Cash", + check: "Check", + card: "Card", + grabpay: "Grabpay", + nets: "Nets", + paypal: "PayPal", + stripe: "Stripe", + ipay88: "Ipay88", + paymentAsia: "PaymentAsia", + other: "Other", }, + // Bean + permanentBean: "Paid Beans", + freeBean: "Free Beans", + confirmRecharge: "Confirm recharge?", + prompt: "Prompt", + addBeanRecharge: "New Recharge", + systemRecharge: "System", + onlineRecharge: "Online", + mobile: "Mobile", }, // Consume Group consume: { - coinConsumeDetail: 'Gold Coin Consumption Details', - - normal: 'Normal', - refunded: 'Refunded', - unknown: 'Unknown', - + coinConsumeDetail: "Coin Consume Details", + normal: "Normal", + refunded: "Refunded", + unknown: "Unknown", consumePlatforms: { - goldSystem: 'Gold System', - HomilyChart: 'HomilyChart', - HomilyLink: 'HomilyLink', - ERP: 'ERP', - other: 'Other', - initGold: 'Gold Initialization', + goldSystem: "Gold System", + HomilyChart: "HomilyChart", + HomilyLink: "HomilyLink", + ERP: "ERP", + other: "Other", + initGold: "Init Gold", + }, + addCoinConsume: "New Consume", + addBeanConsume: "New Consume", + liveStream: "Live", + dieHardFan: "Die-hard Fan", + articleVideo: "Post/Video", + confirmConsume: "Confirm consume?", + prompt: "Prompt", + // Post/Video + type: "Type", + reward: "Reward", + payBuy: "Purchase", + other: "Other", + consumeTypes: { + 1: "Gift", + 2: "Red Packet", + 3: "Lucky Bag", + 4: "Paid Live", + 5: "Join Fan Club", + 6: "Bullet Chat", + 7: "Single Pay", + 8: "Monthly Sub", + 9: "Reward", + 10: "Reward", + 11: "Purchase", }, - - addCoinConsume: 'New Consumption', }, // Refund Group refund: { - coinRefundDetail: 'Gold Coin Refund Details', - - normal: 'Normal', - refunded: 'Refunded', - unknown: 'Unknown', - + coinRefundDetail: "Coin Refund Details", + normal: "Normal", + refunded: "Refunded", + unknown: "Unknown", refundMethods: { - allRefund: 'Full Refund', - partialRefund: 'Partial Refund', + allRefund: "Full", + partialRefund: "Partial", }, - refundTypeOptions: { - '商品退款': 'Product Refund', - '金币退款': 'Gold Coin Refund', + 商品退款: "Product Refund", + 金币退款: "Coin Refund", }, - - addCoinRefund: 'New Refund', - - id: 'No.', - type: 'Type', - recharge: 'Recharge', - consume: 'Consumption', - productName: 'Product Name', - orderCode: 'Order No.', - permanentGold: 'Permanent Gold Coins', - freeGold: 'Free Gold Coins', - taskGold: 'Task Gold Coins', - isRefund: 'Refund Allowed', - no: 'No', - yes: 'Yes', + addCoinRefund: "New Refund", + id: "No.", + type: "Type", + recharge: "Recharge", + consume: "Consume", + productName: "Product", + orderCode: "Order No.", + permanentGold: "Perm Coins", + freeGold: "Free Coins", + taskGold: "Task Coins", + isRefund: "Allow Refund", + no: "No", + yes: "Yes", }, - // Client Count Group + // Client Count clientCount: { - clientCountBalance: 'Gold Coin Balance', - - clientCountDetail: 'Gold Coin Details', - - recharge: 'Recharge', - consume: 'Consumption', - refund: 'Refund', - other: 'Other', - + clientCountBalance: "Coin Balance", + clientCountDetail: "Coin Details", + recharge: "Recharge", + consume: "Consume", + refund: "Refund", + other: "Other", type: { - recharge: 'Recharge', - consume: 'Consumption', - refund: 'Refund', + recharge: "Recharge", + consume: "Consume", + refund: "Refund", }, }, - // Workbench Group + + // Workbench workbench: { - dataOverview: 'Overview', - loading: 'Loading...', - cashManagement: 'Cash', - dataExplanationTitle: 'Note', - dataExplanationContent: 'Data is computed in real time and may have deviations.', - totalRevenue: 'Revenue', - SGD: 'SGD', - collect: 'Collection', - Singapore: 'Singapore', - Malaysia: 'Malaysia', - HongKong: 'Hong Kong', - Thailand: 'Thailand', - VietnamHCM: 'Vietnam HCM', - Canada: 'Canada', - MYR: 'MYR', - HKD: 'HKD', - CAD: 'CAD', - THB: 'THB', - VND: 'VND', - goldManagement: 'Gold', - lastUpdateTime: 'Last update:', - noData: 'No data for this region', - currentGoldBalance: 'Gold balance', - compareToPreviousDay: 'vs previous day', - permanentGold: 'Permanent', - freeGold: 'Free', - taskGold: 'Task', - goldExpireIn6Months: 'Expiring in Jun:', - goldExpireIn12Months: 'Expiring in Dec:', - annualCumulativeRecharge: 'Year recharge coins:', - convertedSGDCumulativeAmount: 'SGD total:', - yesterdayNew: 'Yesterday add:', - wherePermanentGold: 'Permanent:', - annualCumulativeConsume: 'Year consume coins:', - consume: 'Consume:', - refund: 'Refund:', - yesterdayNewAll: 'Yesterday total:', - yesterdayNewConsume: 'Yesterday consume:', - yesterdayNewRefund: 'Yesterday refund:', - annualCumulativeRechargePeople: 'Year recharge users:', - weekYearOnYear: 'WoW:', - dayYearOnYear: 'DoD:', - yesterdayRechargePeople: 'Yesterday recharge users:', - whereFirstRecharge: 'First recharge:', - coinRecharge: 'Gold recharge', - coinConsume: 'Gold consume', - total: 'Total:', - yesterday: 'Yesterday', - today: 'Today', - thisWeek: 'This week', - thisMonth: 'This month', - thisYear: 'This year', - startTime: 'Start Time', - endTime: 'End Time', - query: 'Query', - gold: 'Gold', - recharge: 'Recharge', - consume: 'Consume', - rank: 'Rank', - allTypes: 'All types', - region: 'Region', - goldCount: 'Gold count', - all: 'All', - marketTitle: 'Note', - marketContent: 'If period exceeds 40 days, data aggregates by month.', + dataOverview: "Overview", + loading: "Loading...", + cashManagement: "Cash", + dataExplanationTitle: "Note", + dataExplanationContent: "Real-time data, deviations possible.", + totalRevenue: "Revenue", + SGD: "SGD", + collect: "Collect", + Singapore: "Singapore", + Malaysia: "Malaysia", + HongKong: "Hong Kong", + Thailand: "Thailand", + VietnamHCM: "Vietnam HCM", + Canada: "Canada", + MYR: "MYR", + HKD: "HKD", + CAD: "CAD", + THB: "THB", + VND: "VND", + goldManagement: "Gold", + lastUpdateTime: "Updated: ", + noData: "No Data", + // Card 1 + currentGoldBalance: "Coin Balance", + compareToPreviousDay: "vs Day Before", + permanentGold: "Perm", + freeGold: "Free", + taskGold: "Task", + goldExpireIn6Months: "Exp Jun:", + goldExpireIn12Months: "Exp Dec:", + // Card 2 + annualCumulativeRecharge: "Year Recharge:", + convertedSGDCumulativeAmount: "Total SGD:", + yesterdayNew: "Yest. New:", + wherePermanentGold: "Perm:", + // Card 3 + annualCumulativeConsume: "Year Consume:", + consume: "Consume:", + refund: "Refund:", + yesterdayNewAll: "Yest. Total:", + yesterdayNewConsume: "Yest. Consume:", + yesterdayNewRefund: "Yest. Refund:", + // Card 4 + annualCumulativeRechargePeople: "Year Users:", + weekYearOnYear: "WoW:", + dayYearOnYear: "DoD:", + yesterdayRechargePeople: "Yest. Users:", + whereFirstRecharge: "First Chg:", + // Table + coinRecharge: "Coin Recharge", + coinConsume: "Coin Consume", + total: "Total:", + yesterday: "Yesterday", + today: "Today", + thisWeek: "This Week", + thisMonth: "This Month", + thisYear: "This Year", + startTime: "Start", + endTime: "End", + query: "Query", + gold: "Gold", + recharge: "Recharge", + consume: "Consume", + rank: "Rank", + allTypes: "All Types", + region: "Region", + goldCount: "Coins", + all: "Total", + marketTitle: "Note", + marketContent: ">40 days aggregates by month.", }, - // Rate Group + + // Rate rate: { - modifyRate: 'Modify rate', - prompt1: 'Note: per', - prompt2: 'can exchange 1 SGD', + modifyRate: "Modify Rate", + prompt1: "Note: per", + prompt2: "--exchanges 1 SGD", + }, + // Settings Center (Home) + home: { + settingsCenter: "Settings", + languageSwitch: "Language", + languageDialog: { + placeholder: "Select language", + options: { + zhCN: "中文(简体)", + en: "English" + } + }, + showStaffData: "Show staff", + hideStaffData: "Hide staff", + viewProfile: "Profile", + changePassword: "Change password", + logout: "Logout", + messageCenter: "Messages", + noMessage: "No pending messages", + goToView: "View", + viewAll: "View all", + collapse: "Collapse", + backToTop: "Top", + dialog: { + userName: "Name", + jwcode: "Homily ID", + market: "Region", + registerTime: "Registered at", + }, + orderNeedsReview: "A receipt order requires review", + password: { + title: "Change Password", + oldPassword: "Old Password", + newPassword: "New Password", + againPassword: "Repeat Password", + oldPasswordPlaceholder: "Enter old password", + newPasswordPlaceholder: "Enter new password", + againPasswordPlaceholder: "Re-enter new password", + tips: { + lengthAndChars: "8–16 chars: digits/letters/symbols", + complexity: "At least 2 types" + }, + rules: { + allowedChars: "Only digits, letters, or symbols", + notSameAsOld: "New password cannot equal old", + length: "Length 8–16", + complexity: "At least 2 types (digit/letter/symbol)", + notMatch: "Passwords do not match", + newPasswordRequired: "New password required", + againPasswordRequired: "Confirm password required" + }, + submitting: "Changing..." + }, }, + // Cash Management cash: { - // 收款管理 - receiveCashDataTitle: "Data Desc", - receiveCashDataContent: "All cash receipt pages: Orders sorted by payment time desc by default", + receiveCashDataTitle: "Note", + receiveCashDataContent: + "All receipt pages: Default sort by payment time (desc)", currency: { - usd: "US Dollar(USD)", - hkd: "Hong Kong Dollar(HKD)", - sgd: "Singapore Dollar(SGD)", - myr: "Malaysian Ringgit(MYR)", - thb: "Thai Baht(THB)", - cad: "Canadian Dollar(CAD)", - vnd: "Vietnamese Dong(VDN)", - krw: "South Korean Won(KRW)", + usd: "USD", + hkd: "HKD", + sgd: "SGD", + myr: "MYR", + thb: "THB", + cad: "CAD", + vnd: "VND", + krw: "KRW", }, - // 收款方式 payMethods: { - bankTransfer: 'Bank Transfer', - cash: 'Cash', - check: 'Check', - card: 'Card Payment', - grabpay: 'GrabPay', - nets: 'NETS', - paypal: 'PayPal', - stripe: 'Stripe (Link)', - ipay88: 'iPay88 (Link)', - paymentAsia: 'PaymentAsia (Link)', + bankTransfer: "Bank Transfer", + cash: "Cash", + check: "Check", + card: "Card", + grabpay: "Grabpay", + nets: "Nets", + paypal: "PayPal", + stripe: "Stripe", + ipay88: "Ipay88", + paymentAsia: "PaymentAsia", transfer: "E-Transfer", }, unit: "Unit", year: "Year", month: "Month", - // AI Services + // Products aiService: { - aiTracking: "AI Org Track", - aiAttack: "AI Org Attack", - aiFunds: "AI Org Funds", - aiActivity: "AI Org Activity", - superPerspective: "Super Org View", - superAmbush: "Super Org Ambush", - superHunting: "Super Org Hunt", - superPulse: "Super Org Pulse", - superCompass: "Super Org Compass", - aiDetectionTool: "AI Org Detector", - superDetectionTool: "Super Org Detector" + aiTracking: "AI Track", + aiAttack: "AI Attack", + aiFunds: "AI Funds", + aiActivity: "AI Activity", + superPerspective: "Super View", + superAmbush: "Super Ambush", + superHunting: "Super Hunt", + superPulse: "Super Pulse", + superCompass: "Super Compass", + aiDetectionTool: "AI Detector", + superDetectionTool: "Super Detector", }, - // Markets markets: { HongKong: "Hong Kong", Malaysia: "Malaysia", Canada: "Canada", Singapore: "Singapore", Thailand: "Thailand", - VietnamHCM: "Vietnam HCM" + VietnamHCM: "Vietnam HCM", }, coinRecharge: "Coin Recharge", staticInfoFee: "Static Fee", BGmember: "BG Member", HC: "HC Fee", - goldProduct: "Gold Product", - softwareProduct: "SoftwareProduct", + goldProduct: "Gold Prod", + softwareProduct: "Software", software: "Software", other: "Other", - // Software Menu (for ProductSelect component) + // Software Menu softwareMenu: { - // Market Names usStock: "US Stock", hkStock: "HK Stock", aStock: "A Stock", @@ -841,50 +1055,49 @@ export default { koreaStock: "KR Stock", taiwanStock: "TW Stock", - // Software Types usStockSoftware: "US Stock SW", - usStockGoldCard: "US Stock Gold", - usStockPackage: "US Stock Pack", + usStockGoldCard: "US Gold", + usStockPackage: "US Pack", hkStockSoftware: "HK Stock SW", - hkStockGoldCard: "HK Stock Gold", - hkStockPackage: "HK Stock Pack", + hkStockGoldCard: "HK Gold", + hkStockPackage: "HK Pack", aStockSoftware: "A Stock SW", - aStockGoldCard: "A Stock Gold", - aStockPackage: "A Stock Pack", + aStockGoldCard: "A Gold", + aStockPackage: "A Pack", singaporeStockSoftware: "SG Stock SW", - singaporeStockGoldCard: "SG Stock Gold", - singaporeStockPackage: "SG Stock Pack", + singaporeStockGoldCard: "SG Gold", + singaporeStockPackage: "SG Pack", malaysiaStockSoftware: "MY Stock SW", - malaysiaStockGoldCard: "MY Stock Gold", - malaysiaStockPackage: "MY Stock Pack", + malaysiaStockGoldCard: "MY Gold", + malaysiaStockPackage: "MY Pack", japanStockSoftware: "JP Stock SW", - japanStockGoldCard: "JP Stock Gold", - japanStockPackage: "JP Stock Pack", + japanStockGoldCard: "JP Gold", + japanStockPackage: "JP Pack", thailandStockSoftware: "TH Stock SW", - thailandStockGoldCard: "TH Stock Gold", - thailandStockPackage: "TH Stock Pack", + thailandStockGoldCard: "TH Gold", + thailandStockPackage: "TH Pack", vietnamStockSoftware: "VN Stock SW", - vietnamStockGoldCard: "VN Stock Gold", - vietnamStockPackage: "VN Stock Pack", + vietnamStockGoldCard: "VN Gold", + vietnamStockPackage: "VN Pack", indonesiaStockSoftware: "ID Stock SW", - indonesiaStockGoldCard: "ID Stock Gold", - indonesiaStockPackage: "ID Stock Pack", + indonesiaStockGoldCard: "ID Gold", + indonesiaStockPackage: "ID Pack", koreaStockSoftware: "KR Stock SW", - koreaStockGoldCard: "KR Stock Gold", - koreaStockPackage: "KR Stock Pack", + koreaStockGoldCard: "KR Gold", + koreaStockPackage: "KR Pack", taiwanStockSoftware: "TW Stock SW", - taiwanStockGoldCard: "TW Stock Gold", - taiwanStockPackage: "TW Stock Pack" + taiwanStockGoldCard: "TW Gold", + taiwanStockPackage: "TW Pack", }, statusList: { pending: "Pending", @@ -894,6 +1107,6 @@ export default { rejected: "Rejected", }, pending: "Pending", - refundSuccess: "Refund Successful", + refundSuccess: "Refund Success", }, -} +}; diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js index c9af7c9..97c9d7e 100644 --- a/src/components/locales/lang/zh-CN.js +++ b/src/components/locales/lang/zh-CN.js @@ -176,6 +176,18 @@ export default { // 提示信息组 elmessage: { // 通用 + languageChangedSuccess: "语言已切换到{lang}", + refreshLoading: "数据刷新中,请稍候...", + refreshSuccess: "数据刷新成功", + refreshFailed: "数据刷新失败:{msg}", + unknownError: "未知错误", + refreshError: "数据刷新异常,请重试", + logoutSuccess: "退出成功", + staffHidden: "员工数据已隐藏", + staffShown: "员工数据已显示", + jumpSuccess: "跳转成功", + jumpFailed: "跳转失败", + oldPasswordError: "原密码错误,请重新输入", addSuccess: "添加成功", // 大写是添加成功,小写是新增 addsuccess: "新增成功", prompt: "提示", @@ -941,6 +953,59 @@ export default { prompt1: "提示:当前规则每", prompt2: "可兑换 1 新币", }, + // 设置中心(Home) + home: { + settingsCenter: "设置中心", + languageSwitch: "语言切换", + languageDialog: { + placeholder: "请选择语言", + options: { + zhCN: "中文(简体)", + en: "English" + } + }, + showStaffData: "显示员工数据", + hideStaffData: "隐藏员工数据", + viewProfile: "查看个人信息", + changePassword: "修改密码", + logout: "退出登录", + messageCenter: "消息中心", + noMessage: "暂无未办消息,快去处理工作吧~", + goToView: "前往查看", + viewAll: "查看全部", + collapse: "收起", + backToTop: "返回顶部", + dialog: { + userName: "用户姓名", + jwcode: "精网号", + market: "地区", + registerTime: "注册时间", + }, + orderNeedsReview: "用户有条收款订单需审核", + password: { + title: "修改密码", + oldPassword: "原密码", + newPassword: "新密码", + againPassword: "重复密码", + oldPasswordPlaceholder: "请输入原密码", + newPasswordPlaceholder: "请输入新密码", + againPasswordPlaceholder: "请再次输入新密码", + tips: { + lengthAndChars: "密码由8-16位数字、字母或符号组成", + complexity: "至少含2种以上字符" + }, + rules: { + allowedChars: "密码只能包含数字、字母或符号", + notSameAsOld: "新密码不能与旧密码一致", + length: "长度应在 8 到 16 个字符", + complexity: "密码至少包含两种类型(数字、字母或符号)", + notMatch: "两次输入密码不一致", + newPasswordRequired: "新密码不能为空", + againPasswordRequired: "请再次输入新密码" + }, + submitting: "修改中..." + }, + }, // 现金管理 cash: { diff --git a/src/views/home.vue b/src/views/home.vue index d3db58d..f322902 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -17,6 +17,9 @@ import {getOrderPage} from '@/utils/goToCheck.js' import {groupMessages} from "@/utils/getMessage.js" import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js" import {useMessageStore} from '@/store/index.js' +// 国际化 +import { useI18n } from 'vue-i18n' +const {t} = useI18n(); // ------------------ ICONS ------------------ const icons = import.meta.glob('@/assets/SvgIcons/*.svg', {eager: true}) @@ -56,26 +59,26 @@ const openLanguageSwitch = () => { } const handleLanguageChanged = (lang) => { - ElMessage.success(`语言已切换到${lang}`) + ElMessage.success(t('elmessage.languageChangedSuccess', { lang })) } // ------------------ 刷新数据 ------------------ const refreshData = async () => { try { - ElMessage({message: '数据刷新中,请稍候...', type: 'info'}); + ElMessage({ message: t('elmessage.refreshLoading'), type: 'info' }) const response = await API({url: '/Mysql', method: 'POST', data: {}}); if (response && response.code === 200) { const currentRoute = route.fullPath; router.replace('/blank'); setTimeout(() => router.replace(currentRoute), 10); - ElMessage.success('数据刷新成功'); + ElMessage.success(t('elmessage.refreshSuccess')) } else { - ElMessage.error('数据刷新失败:' + (response?.msg || '未知错误')); + ElMessage.error(t('elmessage.refreshFailed', { msg: response?.msg || t('elmessage.unknownError') })) } } catch (error) { console.error(error) - ElMessage.error('数据刷新异常,请重试'); + ElMessage.error(t('elmessage.refreshError')) } } @@ -126,14 +129,14 @@ function logout() { localStorage.removeItem('token') adminStore.clearState() router.push('/login?machineId=' + machineId) - ElMessage.success('退出成功') + ElMessage.success(t('elmessage.logoutSuccess')) } // ------------------ 员工数据开关 ------------------ const toggleFlag = () => { const newFlag = flag.value === 1 ? 0 : 1 adminStore.setFlag(newFlag) - ElMessage.success(newFlag === 1 ? '员工数据已隐藏' : '员工数据已显示') + ElMessage.success(newFlag === 1 ? t('elmessage.staffHidden') : t('elmessage.staffShown')) } // ------------------ 消息中心(完全修复版) ------------------ @@ -290,9 +293,9 @@ const handleMessageClick = async (item) => { closeMessageDialog() await router.push(getOrderPage(item.status)) await getMessage() - ElMessage.success('跳转成功') + ElMessage.success(t('elmessage.jumpSuccess')) } else { - ElMessage.error('跳转失败') + ElMessage.error(t('elmessage.jumpFailed')) } } @@ -374,8 +377,8 @@ onMounted(() => getMessage()) - 设置 - 设置中心 + + {{ t('home.settingsCenter') }} @@ -383,13 +386,13 @@ onMounted(() => getMessage()) @@ -424,24 +427,24 @@ onMounted(() => getMessage()) - + - + {{ adminData.adminName }} - + {{ adminData.account }} - + {{ adminData.markets }} - + {{ adminData.createTime }} @@ -458,13 +461,13 @@ onMounted(() => getMessage()) class="divider" direction="vertical" > - 消息中心 ({{ messageNum }}) + {{ t('home.messageCenter') }} ({{ messageNum }})
-

暂无未办消息,快去处理工作吧~

+

{{ t('home.noMessage') }}

getMessage())
-
-
[{{ item.marketName }}]
-
[{{item.name}}{{ item.jwcode }}]用户有条收款订单需审核
-
+
+
[{{ item.marketName }}]
+
[{{item.name}}{{ item.jwcode }}]{{ t('home.orderNeedsReview') }}
+
- 前往查看 + {{ t('home.goToView') }} getMessage()) class="view-all" @click="toggleShowAll" > - {{ showAll ? '收起' : '查看全部' }} + {{ showAll ? t('home.collapse') : t('home.viewAll') }}
@@ -532,7 +535,7 @@ onMounted(() => getMessage()) style="width: 20px; height: 20px;" fit="contain" /> - 返回顶部 + {{ t('home.backToTop') }}
@@ -850,4 +853,4 @@ display: flex; padding: 8px; } - \ No newline at end of file +