将文本翻译成英语
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
<!-- <Findmore /> -->
|
||||
|
||||
<view v-else class="loading-container">
|
||||
<text>ページ読み込み中...</text>
|
||||
<text>Loading...</text>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -102,7 +102,7 @@ import Comments from '@/pages/comments/comments.vue'
|
||||
import Intereact from '@/pages/intereact/intereact.vue'
|
||||
import { getPostList, getPostVideo, getUserImg } from '@/api/api.js'
|
||||
// 导入翻译工具
|
||||
import { translateZhToJa, translationCache } from '@/utils/translate.js'
|
||||
import { translateZhToEn, translationCache } from '@/utils/translate.js'
|
||||
|
||||
const common = useCommonStore()
|
||||
const formatCount = common.formatCount
|
||||
@@ -275,8 +275,8 @@ onLoad(() => {
|
||||
|
||||
// 并行翻译需要翻译的内容
|
||||
Promise.all([
|
||||
translateZhToJa(userName),
|
||||
translateZhToJa(copywriting)
|
||||
translateZhToEn(userName),
|
||||
translateZhToEn(copywriting)
|
||||
]).then(([translatedUserName, translatedCopywriting]) => {
|
||||
// 更新视频数据 - 使用翻译后的内容
|
||||
data.userName = translatedUserName
|
||||
|
||||
Reference in New Issue
Block a user