diff --git a/src/packages/__VUE/comment/components/CmtBottom.vue b/src/packages/__VUE/comment/components/CmtBottom.vue index 9c7228035f..c43a8a3b75 100644 --- a/src/packages/__VUE/comment/components/CmtBottom.vue +++ b/src/packages/__VUE/comment/components/CmtBottom.vue @@ -13,9 +13,9 @@ @@ -26,7 +26,7 @@ import { ref, watch, onMounted } from 'vue'; import { createComponent } from '../../../utils/create'; -const { componentName, create } = createComponent('comment-bottom'); +const { componentName, create, translate } = createComponent('comment-bottom'); export default create({ props: { @@ -76,7 +76,7 @@ export default create({ emit('handleClick'); }; - return { showPopver, operate, mergeOp, handleClick }; + return { showPopver, operate, mergeOp, handleClick, translate }; } }); diff --git a/src/packages/__VUE/comment/index.vue b/src/packages/__VUE/comment/index.vue index bdb6d1ecc3..fc4bd17829 100644 --- a/src/packages/__VUE/comment/index.vue +++ b/src/packages/__VUE/comment/index.vue @@ -20,11 +20,11 @@ 购买{{ follow.days }}天后追评{{ translate('additionalReview', follow.days) }} {{ follow.content }} {{ follow.images.length }} 张追评图片 {{ translate('additionalImages', follow.images.length) }} @@ -42,7 +42,7 @@ diff --git a/src/packages/locale/lang/baseLang.ts b/src/packages/locale/lang/baseLang.ts index 290be46b08..33b5fa508e 100644 --- a/src/packages/locale/lang/baseLang.ts +++ b/src/packages/locale/lang/baseLang.ts @@ -50,4 +50,9 @@ export interface BaseLang { deliveryTo: string; chooseAnotherAddress: string; }; + comment: { + complaintsText: string; + additionalReview: Function; + additionalImages: Function; + }; } diff --git a/src/packages/locale/lang/en-US.ts b/src/packages/locale/lang/en-US.ts index 56860926e6..c0203f253d 100644 --- a/src/packages/locale/lang/en-US.ts +++ b/src/packages/locale/lang/en-US.ts @@ -50,6 +50,11 @@ const lang: BaseLang = { selectRegion: 'Select Region', deliveryTo: 'Delivery To', chooseAnotherAddress: 'Choose Another Address' + }, + comment: { + complaintsText: 'I have a complaint', + additionalReview: (day: number) => `Review after ${day} days of purchase`, + additionalImages: (length: number) => `There are ${length} follow-up comments` } }; export default lang; diff --git a/src/packages/locale/lang/zh-CN.ts b/src/packages/locale/lang/zh-CN.ts index f86f5c1e5f..879e2a05b5 100644 --- a/src/packages/locale/lang/zh-CN.ts +++ b/src/packages/locale/lang/zh-CN.ts @@ -50,6 +50,11 @@ const lang: BaseLang = { selectRegion: '请选择所在地区', deliveryTo: '配送至', chooseAnotherAddress: '选择其他地址' + }, + comment: { + complaintsText: '我要投诉', + additionalReview: (day: number) => `购买${day}天后追评`, + additionalImages: (length: number) => `${length}张追评图片` } }; export default lang;