refactor: 国际化文本迁移至全局 locales/messages.js

将组件级 i18n 对象重构为统一由全局 locales/messages.js 管理,确保中英文语言切换时正确显示对应文本。

- 新增 utils/i18n.js 国际化工具函数
- 更新 store/$t.mixin.js 翻译混入逻辑
- 迁移 pkgService、pkgBooking、pkgAccount、pkgExplore、pages 等共 58 个组件的中英文文本至全局消息表
This commit is contained in:
liangjian
2026-07-24 13:43:41 +08:00
parent 445bd850f4
commit 6e721ccc7e
58 changed files with 1810 additions and 4065 deletions

View File

@@ -945,7 +945,22 @@ const messages = {
resultLabel: "Result",
totalChargeLabel: "Total Charge",
wechatCodeFailed: "Failed to get Wechat login code",
wechatPayButton: "Wechat Pay"
wechatPayButton: "Wechat Pay",
cancelOrderButton: "Cancel Order",
cancelOrderContent: "This will close the current unpaid order. Continue?",
cancelOrderFailed: "Failed to cancel order",
cancelOrderLoading: "Canceling...",
cancelOrderSuccess: "Order canceled",
cancelOrderTitle: "Cancel Order",
paymentNoticeAmountLabel: "Amount",
paymentNoticeBillLabel: "Bill No.",
paymentNoticeCancel: "Later",
paymentNoticeConfirm: "Continue",
paymentNoticeItemLabel: "Charge Item",
paymentNoticeLine1: "Please confirm the bill and payment amount before continuing.",
paymentNoticeLine2: "After payment, the bill status may take a few seconds to sync. Please do not pay repeatedly.",
paymentNoticeLine3: "If the payment is interrupted or the page is closed, return to the bill page later to check the latest result.",
paymentNoticeTitle: "Payment Notice"
}
},
contract_detail: {
@@ -1257,6 +1272,14 @@ const messages = {
popupTitle: "Select Floor",
selectFloor: "Select floor"
},
RoomTypeSelector: {
emptyRoomTypes: "No room types available",
loadFailed: "Failed to load room types",
loadingRoomTypes: "Loading room types...",
popupTitle: "Select Room Type",
priceUnit: "/month",
selectRoomType: "Select preferred room type"
},
TagSelector: {
emptyText: "No tags available",
loadingText: "Loading tags..."
@@ -1309,6 +1332,155 @@ const messages = {
utility_recharge: {
navTitle: "Bill Management"
}
},
ticket_center: {
ticket_center: {
navTitle: "Work Orders",
heroBadge: "SERVICE",
heroTitle: "In-stay Ticket Services",
heroDesc: "Repair, renewal, checkout, room change, water delivery, cleaning, and suggestions are all handled here."
}
},
ticket_workbench: {
ticket_workbench: {
areaLabel: "Area",
assigneeLabel: "Assignee",
attachmentsLabel: "Attachments",
cancelProcess: "Cancel Action",
cancelSupplement: "Cancel Supplement",
changeRoomTypeLabel: "Preferred Room Type",
cleaningTimeLabel: "Cleaning Time",
contentLabel: "Content",
currentFlowTag: "Current",
currentStayInfo: "Current Stay",
currentStayOrder: "Current Stay Order",
emptyHistoryDesc: "No tickets of this type yet.",
emptyHistoryTitle: "No Ticket Records",
flowActionTitle: "Available Actions",
historyTab: "History",
leaseLabel: "Lease",
loadMore: "Load More",
loadingMore: "Loading...",
loadOrderFailed: "Failed to load stay context",
noFlowContent: "No handling content",
noMore: "No more records",
refresh: "Refresh",
refreshing: "Refreshing...",
remarkLabel: "Notes",
remarkPlaceholder: "Enter notes to help the staff handle this ticket",
roomLabel: "Room",
roomTypeLabel: "Room Type",
searchPlaceholder: "Search title or content",
selectAssignee: "Select assignee",
selectDate: "Select date",
selectTime: "Select time",
submitSectionDefaultDesc: "The form below will be submitted through the ticket APIs.",
submitTab: "Submit",
submitTicket: "Submit Ticket",
submitting: "Submitting...",
supplementAction: "Supplement",
supplementLabel: "Supplementary Fields",
supplementPlaceholder: "Please enter {label}",
ticketKicker: "WORK ORDER",
uploadImage: "Upload Image",
uploadImageCountExceeded: "Up to 6 images",
uploadImageFailed: "Failed to upload image",
uploadImageOversize: "Image must be less than 5MB",
uploadTip: "Upload JPG or PNG images, up to 6 images and 5MB each.",
uploadTipRepair: "Upload JPG or PNG images, up to 6 images and 5MB each. Repair requires at least 1 image.",
checkoutTimeLabel: "Checkout Time",
renewalTimeLabel: "Renew Until",
submittedAtLabel: "Submitted At",
submitSuccess: "Ticket submitted",
submitFailed: "Failed to submit ticket",
confirmSubmitTitle: "Confirm",
confirmSubmitContent: "Confirm submitting this ticket?",
missingStayContext: "Missing current stay order or room information",
repairAttachmentRequired: "Please upload repair images",
changeAreaRequired: "Please select a room type",
checkoutTimeRequired: "Please select checkout time",
checkoutReasonRequired: "Please fill in the checkout reason",
loadHistoryFailed: "Failed to load ticket history",
loadFlowsFailed: "Failed to load ticket flows",
loadActionsFailed: "Failed to load ticket actions",
continueProcess: "Continue",
loadAssigneeFailed: "Failed to load assignees",
submitSectionActionDesc: "The ticket is in progress and will continue after submission.",
submitSectionSupplementDesc: "The ticket is on hold and will continue after supplementing the information.",
currentStatusPending: "Pending",
currentStatusProcessing: "Processing",
currentStatusResolved: "Resolved",
currentStatusClosed: "Closed",
allStatus: "All",
pendingStatus: "Pending",
processingStatus: "Processing",
resolvedStatus: "Resolved",
closedStatus: "Closed"
}
},
room_inspection: {
room_inspection: {
pageTitle: "Inspection",
pageDesc: "Review and submit inspection results for the current order",
inspectionListTitle: "Inspection Records",
roomNoLabel: "Room No.",
inspectionTypeLabel: "Inspection Type",
inspectionStatusLabel: "Status",
inspectionTimeLabel: "Created At",
inspectionRemarksLabel: "Remarks",
inspectionRemarksPlaceholder: "Add notes for this inspection",
inspectionItemsTitle: "Inspection Items",
inspectionItemsDesc: "Check each item according to the on-site condition",
deviceFallback: "Unnamed Device",
requiredTag: "Required",
expectedQuantityLabel: "Expected Qty",
inspectionResultLabel: "Result",
checkedQuantityLabel: "Checked Qty",
checkedQuantityPlaceholder: "Enter quantity",
problemDetailLabel: "Problem Detail",
problemDetailPlaceholder: "Describe any abnormal, missing, or damaged condition",
photosLabel: "Photos",
addPhoto: "Add",
submitAction: "Submit",
loadingDesc: "Syncing inspection data...",
emptyTitle: "No inspections",
emptyDesc: "No inspection record is available for the current order.",
emptyItemsTitle: "No items",
emptyItemsDesc: "No inspection item is available for this inspection.",
submitSuccess: "Inspection submitted",
submitFailed: "Failed to submit",
submitting: "Submitting...",
missingInspectionNo: "Missing inspection record",
uploadFailed: "Failed to upload image",
chooseImageFailed: "Failed to choose image",
resultRequired: "Please complete the result selection for all items first"
}
}
},
components: {
ContractSignDialog: {
undo: "Undo",
rewrite: "Rewrite",
close: "Close",
confirmSignature: "Confirm",
footerTip: "Please confirm that you have fully read the contract before signing",
closeBoardTitle: "Notice",
closeBoardDesc: "You have not finished signing. Are you sure to close?",
continueSigning: "Continue Signing",
continueClosing: "Close",
missingSignerName: "Missing Signer",
writingHintZh: "Please write your Chinese signature here",
writingHintEn: "Please write your signature here",
signerNameMissingToast: "Missing signer name",
signatureRequiredToast: "Please sign first",
boundsFailedToast: "Failed to get signature bounds",
signatureTooSmallToast: "Signature is too small, please try again",
exportFailedToast: "Failed to export signature, please try again"
},
ContractAlert: {
actionText: "Sign Now",
pendingDesc: "You have {count} contract(s) pending signature",
pendingTitle: "Contract Pending Signature"
}
}
},
@@ -2258,7 +2430,22 @@ const messages = {
resultLabel: "处理结果",
totalChargeLabel: "应收合计",
wechatCodeFailed: "获取微信登录凭证失败",
wechatPayButton: "微信支付"
wechatPayButton: "微信支付",
cancelOrderButton: "取消订单",
cancelOrderContent: "取消后将关闭当前未支付订单,是否继续?",
cancelOrderFailed: "取消订单失败",
cancelOrderLoading: "取消中...",
cancelOrderSuccess: "订单已取消",
cancelOrderTitle: "取消订单",
paymentNoticeAmountLabel: "支付金额",
paymentNoticeBillLabel: "账单号",
paymentNoticeCancel: "稍后再付",
paymentNoticeConfirm: "继续支付",
paymentNoticeItemLabel: "费用项目",
paymentNoticeLine1: "请确认本次支付账单和金额无误后再继续付款。",
paymentNoticeLine2: "支付完成后,账单状态可能需要几秒同步,请勿重复支付。",
paymentNoticeLine3: "若支付中断或页面关闭,可稍后返回账单页查看最新结果。",
paymentNoticeTitle: "用户须知"
}
},
contract_detail: {
@@ -2570,6 +2757,14 @@ const messages = {
popupTitle: "选择意向楼层",
selectFloor: "请选择楼层"
},
RoomTypeSelector: {
emptyRoomTypes: "暂无可选房型",
loadFailed: "房型列表加载失败",
loadingRoomTypes: "房型加载中...",
popupTitle: "选择意向房型",
priceUnit: "/月",
selectRoomType: "请选择意向房型"
},
TagSelector: {
emptyText: "暂无标签",
loadingText: "标签加载中..."
@@ -2622,6 +2817,155 @@ const messages = {
utility_recharge: {
navTitle: "账单管理"
}
},
ticket_center: {
ticket_center: {
navTitle: "工单中心",
heroBadge: "SERVICE",
heroTitle: "住中工单服务",
heroDesc: "报修、续住、退宿、调宿、送水、清洁和意见建议都统一从这里进入,提交后可继续查看流转记录。"
}
},
ticket_workbench: {
ticket_workbench: {
areaLabel: "所属区域",
assigneeLabel: "处理目标",
attachmentsLabel: "附件图片",
cancelProcess: "退出处理",
cancelSupplement: "取消补充",
changeRoomTypeLabel: "意向房型",
cleaningTimeLabel: "预约清洁时间",
contentLabel: "申请内容",
currentFlowTag: "当前节点",
currentStayInfo: "当前入住信息",
currentStayOrder: "当前入住订单",
emptyHistoryDesc: "当前类型还没有工单记录。",
emptyHistoryTitle: "暂无工单记录",
flowActionTitle: "可执行操作",
historyTab: "记录查询",
leaseLabel: "租期",
loadMore: "加载更多",
loadingMore: "加载中...",
loadOrderFailed: "入住信息加载失败",
noFlowContent: "暂无处理内容",
noMore: "没有更多了",
refresh: "刷新",
refreshing: "刷新中...",
remarkLabel: "补充说明",
remarkPlaceholder: "请输入补充说明,帮助工作人员更快处理",
roomLabel: "当前房间",
roomTypeLabel: "当前房型",
searchPlaceholder: "搜索工单标题或内容",
selectAssignee: "请选择处理目标",
selectDate: "请选择日期",
selectTime: "请选择时间",
submitSectionDefaultDesc: "以下内容将通过工单接口提交并进入后续流转。",
submitTab: "提交申请",
submitTicket: "提交工单",
submitting: "提交中...",
supplementAction: "补充信息",
supplementLabel: "补充业务信息",
supplementPlaceholder: "请输入{label}",
ticketKicker: "WORK ORDER",
uploadImage: "上传图片",
uploadImageCountExceeded: "最多上传 6 张图片",
uploadImageFailed: "图片上传失败,请重试",
uploadImageOversize: "图片不能超过 5MB",
uploadTip: "支持上传 JPG、PNG 等图片,单张不超过 5MB,最多 6 张。",
uploadTipRepair: "支持上传 JPG、PNG 等图片,单张不超过 5MB,最多 6 张。报修至少上传 1 张图片。",
checkoutTimeLabel: "预计退宿时间",
renewalTimeLabel: "续住至",
submittedAtLabel: "提交时间",
submitSuccess: "工单提交成功",
submitFailed: "工单提交失败",
confirmSubmitTitle: "确认提交",
confirmSubmitContent: "确认提交当前工单吗?",
missingStayContext: "当前缺少入住订单或房间信息,暂无法提交工单",
repairAttachmentRequired: "请上传报修附件图片",
changeAreaRequired: "请选择意向房型",
checkoutTimeRequired: "请选择退宿时间",
checkoutReasonRequired: "请填写退宿原因",
loadHistoryFailed: "工单记录加载失败",
loadFlowsFailed: "工单流转加载失败",
loadActionsFailed: "工单操作项加载失败",
continueProcess: "继续处理",
loadAssigneeFailed: "处理目标加载失败",
submitSectionActionDesc: "当前工单正在处理中,提交后会继续流转。",
submitSectionSupplementDesc: "当前工单处于挂起状态,补充信息后会继续流转。",
currentStatusPending: "待处理",
currentStatusProcessing: "处理中",
currentStatusResolved: "已解决",
currentStatusClosed: "已结束",
allStatus: "全部",
pendingStatus: "待处理",
processingStatus: "处理中",
resolvedStatus: "已解决",
closedStatus: "已结束"
}
},
room_inspection: {
room_inspection: {
pageTitle: "验房",
pageDesc: "按当前订单查看并提交验房结果",
inspectionListTitle: "验房记录",
roomNoLabel: "房间号",
inspectionTypeLabel: "验房类型",
inspectionStatusLabel: "当前状态",
inspectionTimeLabel: "发起时间",
inspectionRemarksLabel: "备注",
inspectionRemarksPlaceholder: "可填写本次验房的补充说明",
inspectionItemsTitle: "检查项",
inspectionItemsDesc: "请根据现场情况逐项核对",
deviceFallback: "未命名设备",
requiredTag: "必查",
expectedQuantityLabel: "应有数量",
inspectionResultLabel: "检查结果",
checkedQuantityLabel: "实测数量",
checkedQuantityPlaceholder: "请输入数量",
problemDetailLabel: "问题说明",
problemDetailPlaceholder: "请描述异常、缺失或损坏情况",
photosLabel: "现场照片",
addPhoto: "添加",
submitAction: "提交验房",
loadingDesc: "正在同步验房数据...",
emptyTitle: "暂无验房单",
emptyDesc: "当前订单还没有可查看的验房记录。",
emptyItemsTitle: "暂无检查项",
emptyItemsDesc: "当前验房单还没有检查项明细。",
submitSuccess: "验房单已提交",
submitFailed: "提交失败",
submitting: "提交中...",
missingInspectionNo: "未获取到验房单",
uploadFailed: "图片上传失败",
chooseImageFailed: "选择图片失败",
resultRequired: "请先完成所有检查项结果选择"
}
}
},
components: {
ContractSignDialog: {
undo: "撤销",
rewrite: "重写",
close: "关闭",
confirmSignature: "确认签名",
footerTip: "签名前请确认您已完整阅读合同内容",
closeBoardTitle: "关闭提示",
closeBoardDesc: "您还未完成签名,确认要关闭吗?",
continueSigning: "继续签名",
continueClosing: "确认关闭",
missingSignerName: "签名人缺失",
writingHintZh: "请在此处手写中文正楷签名",
writingHintEn: "Please write your signature here",
signerNameMissingToast: "签名人信息缺失",
signatureRequiredToast: "请先完成签名",
boundsFailedToast: "获取签名范围失败",
signatureTooSmallToast: "签名范围太小,请重新签名",
exportFailedToast: "导出签名失败,请重试"
},
ContractAlert: {
actionText: "去签署",
pendingDesc: "您有 {count} 份合同待签署",
pendingTitle: "待签合同提醒"
}
}
}