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

@@ -36,9 +36,9 @@ export default {
return null
}
return {
title: this.t('pendingTitle'),
desc: this.t('pendingDesc', { count: this.pendingContracts.length }),
actionText: this.t('actionText')
title: this.$tr('待签合同提醒'),
desc: this.$tr('您有 {count} 份合同待签署', { count: this.pendingContracts.length }),
actionText: this.$tr('去签署')
}
}
},
@@ -59,9 +59,6 @@ export default {
this.clearCollapseTimer()
},
methods: {
t(key, params) {
return this.$translate(this.i18n, key, params)
},
clearCollapseTimer() {
if (this.collapseTimer) {
clearTimeout(this.collapseTimer)