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:
@@ -2,7 +2,7 @@
|
||||
<view class="room-hero">
|
||||
<view v-if="showVrPanel" class="hero-vr-panel" @click="openVR">
|
||||
<image v-if="vrPoster" :src="vrPoster" mode="aspectFill" class="hero-image"></image>
|
||||
<view v-else class="hero-empty tn-flex tn-flex-col-center tn-flex-row-center">{{ t('noImage') }}</view>
|
||||
<view v-else class="hero-empty tn-flex tn-flex-col-center tn-flex-row-center">{{ $tr('暂无图片') }}</view>
|
||||
<view class="hero-vr-glow"></view>
|
||||
<view class="vr-center-entry">
|
||||
<view class="vr-center-ring vr-center-ring--outer"></view>
|
||||
@@ -11,8 +11,8 @@
|
||||
<text class="tn-icon-vr vr-center-core-icon"></text>
|
||||
</view>
|
||||
<view class="vr-center-text">
|
||||
<view class="vr-center-title">{{ t('vrPreview') }}</view>
|
||||
<view class="vr-center-desc">{{ t('vrPreviewDesc') }}</view>
|
||||
<view class="vr-center-title">{{ $tr('VR预览') }}</view>
|
||||
<view class="vr-center-desc">{{ $tr('切换到沉浸式看房模式。') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -30,7 +30,7 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view v-else class="hero-empty tn-flex tn-flex-col-center tn-flex-row-center">
|
||||
{{ t('noImage') }}
|
||||
{{ $tr('暂无图片') }}
|
||||
</view>
|
||||
|
||||
<view class="hero-mask"></view>
|
||||
@@ -46,7 +46,7 @@
|
||||
@click="switchMedia('image')"
|
||||
>
|
||||
<text class="tn-icon-image media-tab-icon"></text>
|
||||
<text>{{ t('imageTab') }}</text>
|
||||
<text>{{ $tr('图片') }}</text>
|
||||
</view>
|
||||
<view
|
||||
class="media-tab"
|
||||
@@ -54,7 +54,7 @@
|
||||
@click="switchMedia('vr')"
|
||||
>
|
||||
<text class="tn-icon-vr media-tab-icon"></text>
|
||||
<text>{{ t('vrPreview') }}</text>
|
||||
<text>{{ $tr('VR预览') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<!-- 引导下滑箭头 -->
|
||||
<view class="scroll-down-hint tn-flex tn-flex-direction-column tn-flex-col-center">
|
||||
<text class="hint-text">{{ t('swipeUpHint') }}</text>
|
||||
<text class="hint-text">{{ $tr('上滑查看详情') }}</text>
|
||||
<text class="tn-icon-up arrow-icon"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -113,9 +113,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
t(key) {
|
||||
return this.$tm('pkgExplore.room_detail.room_detail', key)
|
||||
},
|
||||
onSwiperChange(e) {
|
||||
this.currentImageIndex = e.detail.current;
|
||||
this.$emit('swiper-change', e);
|
||||
|
||||
Reference in New Issue
Block a user