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:
@@ -57,12 +57,12 @@
|
||||
<!-- 底部操作区 -->
|
||||
<view class="hero-bottom tn-flex tn-flex-direction-column tn-flex-col-center">
|
||||
<view class="hero-actions tn-flex tn-flex-row-between" :class="{ 'hero-actions--en': language === 'en' }">
|
||||
<view class="action-btn outline-btn" :class="{ 'action-btn--en': language === 'en' }" @click="$emit('consult')">{{ t('apartmentDetail') }}</view>
|
||||
<view class="action-btn primary-btn" :class="{ 'action-btn--en': language === 'en' }" @click="$emit('submit')">{{ t('bookViewing') }}</view>
|
||||
<view class="action-btn outline-btn" :class="{ 'action-btn--en': language === 'en' }" @click="$emit('consult')">{{ $tr('公寓详情') }}</view>
|
||||
<view class="action-btn primary-btn" :class="{ 'action-btn--en': language === 'en' }" @click="$emit('submit')">{{ $tr('预约看房') }}</view>
|
||||
</view>
|
||||
|
||||
<view class="scroll-hint tn-flex tn-flex-direction-column tn-flex-col-center" @click="$emit('collapse')">
|
||||
<text class="scroll-hint__text">{{ t('learnMore') }}</text>
|
||||
<text class="scroll-hint__text">{{ $tr('了解更多') }}</text>
|
||||
<view class="scroll-hint__double-icon">
|
||||
<text class="tn-icon-down scroll-hint__icon"></text>
|
||||
<text class="tn-icon-down scroll-hint__icon scroll-hint__icon--second"></text>
|
||||
@@ -136,9 +136,6 @@ export default {
|
||||
displayTabSubtitle(item = {}) {
|
||||
return this.getBannerDisplayText(item, 'tab')
|
||||
},
|
||||
t(key) {
|
||||
return this.$tm('pages.index.component.SelectRoomTab', key)
|
||||
},
|
||||
formatTabTitle(title) {
|
||||
const normalizedTitle = String(title || '')
|
||||
return normalizedTitle
|
||||
|
||||
Reference in New Issue
Block a user