@@ -139,6 +139,7 @@ import { VueCropper } from "vue-cropper";
import { useStore } from "vuex";
import { Modal,message } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+import { useI18n } from 'vue-i18n';
export default defineComponent({
components:{
VueCropper,
@@ -158,6 +159,8 @@ export default defineComponent({
let userInfo:any = ref()
let cropperTime:any = ref()
+
+ let {t} = useI18n()
return {
store,
oldLocationList,
@@ -172,7 +175,9 @@ export default defineComponent({
manager,
userInfo,
- cropperTime
+ cropperTime,
+
+ t
}
},
data(){
@@ -343,15 +348,15 @@ export default defineComponent({
this.locationList=[]
this.pointList = [
{
- title:'SHOULDER',
+ title:this.t('ModelPlacement.SHOULDER'),
pointList:[{type:'shoulderLeft',color:'#6E70FF',show:true,field:'shoulder'},{type:'shoulderRight',color:'#6E70FF',show:true,field:'shoulder'}]
},
{
- title:'WAISTBAND',
+ title:this.t('ModelPlacement.WAISTBAND'),
pointList:[{type:'waistbandLeft',color:'#6FCEFF',show:true,field:'waistband'},{type:'waistbandRight',color:'#6FCEFF',show:true,field:'waistband'}]
},
{
- title:'HAND',
+ title:this.t('ModelPlacement.HAND'),
pointList:[{type:'handLeft',color:'#d88e8e',show:true,field:'hand'},{type:'handRight',color:'#d88e8e',show:true,field:'hand'}]
},
]
@@ -523,7 +528,7 @@ export default defineComponent({
let _this = this
if(!this.isSubmit){
Modal.confirm({
- title: "You haven't marked the image yet, and the model will not be uploaded. Are you sure you want to close it?",
+ title: this.t('ModelPlacement.jsContent1'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Ok',
cancelText: 'Cancel',
@@ -651,7 +656,7 @@ export default defineComponent({
let _this = this
return new Promise((resolve,reject)=>{
Modal.confirm({
- title: 'This picture has been uploaded whether to continue uploading? ',
+ title: this.t('ModelPlacement.jsContent2'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
diff --git a/src/component/LibraryPage/ModelPlacementMobile.vue b/src/component/LibraryPage/ModelPlacementMobile.vue
index dd44daf6..525efe32 100644
--- a/src/component/LibraryPage/ModelPlacementMobile.vue
+++ b/src/component/LibraryPage/ModelPlacementMobile.vue
@@ -12,23 +12,23 @@
diff --git a/src/lang/cn.ts b/src/lang/cn.ts
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/lang/en.ts b/src/lang/en.ts
index e69de29b..2fa21e6f 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -0,0 +1,295 @@
+export default {
+ Header:{
+ hello:'hello',
+ HOME:'HOME',
+ LIBRARY:'LIBRARY',
+ HISTORY:'HISTORY',
+ bindEmail:'bind email',
+ logOff:'log off',
+ skip:'skip',
+ emailContent:'you have binded email',
+ Email:'Email',
+ NextStep:'Next step',
+ verification:'Enter verification code',
+ SentTo:'Sent to',
+ Resend:'Resend',
+ jsContent1:'The email format is incorrect',
+ jsContent2:'Succeeded in binding the mailbox.',
+ jsContent3:`You have not performed any operation for a long time. You must be active;otherwise, you will log out in {numTime} S`,
+ },
+ Habit:{
+ Workspace:'Workspace',
+ WorkspaceSetting:'Workspace Setting',
+ settingWorkspace:'adjust your workspace setting',
+ Overall:'Overall',
+ Single:'Single',
+ System:'System',
+ Designer:'Designer',
+ Mannequin:'Mannequin',
+ Current:'Current',
+ User:'User',
+ jsContent1:'Whether to delete the workspace?',
+ jsContent2:'Please enter a workbench name',
+ },
+ RobotAssist:{
+ inputContent1:"write a message~",
+ jsContent1:"Please enter content",
+ },
+ HomeView:{
+ GetStarted:'Get Started',
+ Start:'Start',
+ Edit:'Edit',
+ Design:'Design',
+ Redesign:'Redesign',
+ GeneratedDesign:'Generated Design',
+ SelectedDesign:'Selected Design',
+ Export:'Export',
+ jsContent1:'You must choose one or more colors for further process.',
+ jsContent2:'You must choose one or more colors for further process.',
+ jsContent3:'Failed to export the file',
+ },
+ LibraryPage:{
+ Upload:'Upload',
+ Generate:'Generate',
+ Delete:'Delete',
+ Rename:'Rename',
+ inputContent1:'Search by your style code',
+ all:'all',
+ ImageOnly:'Image Only',
+ TextOnly:'Text Only',
+ TextImage:'Text-Image',
+ inputContent2:'Prompt input',
+ maximumLength:'The entered content exceeds the maximum length.',
+ Model1:'Model1',
+ Model2:'Model2',
+ inputContent3:'Prompt input',
+ Cancel:'Cancel',
+ Sure:'Sure',
+ Moodboard:'Moodboard',
+ Prints:'Prints',
+ Sketches:'Sketches',
+ Mannequins:'Mannequins',
+ jsContent1:'Are you sure to delete the picture?',
+ jsContent2:'Are you sure to delete the picture?',
+ jsContent3:'You can only upload Image file!',
+ jsContent4:'Image must smaller than 2MB!',
+ jsContent5:'This picture has been uploaded whether to continue uploading?',
+ jsContent6:'The entered content exceeds the maximum length.',
+ jsContent7:'Please enter content"',
+ },
+ HistoryPage:{
+ History:'History',
+ StartDate:'Start Date',
+ EndDate:'End Date',
+ inputContent1:'Search by collection name',
+ Detail:'Detail',
+ Rename:'Rename',
+ Retrieve:'Retrieve',
+ Delete:'Delete',
+ inputContent2:'Enter a new name',
+ Submit:'Submit',
+ CollectionsName:'Collections Name',
+ UptateTime:'Uptate Time',
+ SketchCounts:'Sketch Counts',
+ Operations:'Operations',
+ jsContent1:'Deleted successfully',
+ jsContent2:'Do you really want to delete this collection? ',
+ jsContent3:'Change successfully',
+ jsContent4:'Image must smaller than 2MB!',
+ jsContent5:'This picture has been uploaded whether to continue uploading?',
+ jsContent6:'The entered content exceeds the maximum length.',
+ jsContent7:'Please enter content"',
+ },
+ ModelPlacement:{
+ Registration:'Registration',
+ Submit:'Submit',
+ Preview:'Preview',
+ Back:'Back',
+ Restore:'Restore',
+ System:'System',
+ Library:'Library',
+ Point:'Point',
+ RemovePoint:'Remove Point',
+ mannequinHint:'Please change the pure white inside the mannequin for another color to enhance your experience',
+ SHOULDER:'SHOULDER',
+ WAISTBAND:'WAISTBAND',
+ HAND:'HAND',
+ jsContent1:"You haven't marked the image yet, and the model will not be uploaded. Are you sure you want to close it?",
+ jsContent2:'This picture has been uploaded whether to continue uploading?',
+ },
+ ModelPlacementMobile:{
+ Registration:'Registration',
+ Submit:'Submit',
+ Preview:'Preview',
+ Back:'Back',
+ Restore:'Restore',
+ Point:'Point',
+ RemovePoint:'Remove Point',
+ mannequinHint:'Please change the pure white inside the mannequin for another color to enhance your experience',
+ SHOULDER:'SHOULDER',
+ WAISTBAND:'WAISTBAND',
+ HAND:'HAND',
+ jsContent1:"You haven't marked the image yet, and the model will not be uploaded. Are you sure you want to close it?",
+ jsContent2:'This picture has been uploaded whether to continue uploading?',
+ },
+ Upload:{
+ Delete:'Delete',
+ Maximum2M:'Maximum 10 images can be uploaded, Maximum 2M per image',
+ jsContent1:'You can only upload Image file!',
+ jsContent2:'Image must smaller than 2MB!',
+ jsContent3:'upload failed',
+ },
+ SketchboardUpload:{
+ Upload:'Upload',
+ Library:'Library',
+ Generate:'Generate',
+ PIN:'PIN',
+ Thumbnail:'Thumbnail preview of selected sketchboard',
+ inputContent1:'Caption generation',
+ maximumLength:'The entered content exceeds the maximum length.',
+ jsContent1:"upload failed",
+ jsContent2:"You can only upload Image file!",
+ jsContent3:'Image must smaller than 2MB!',
+ jsContent4:"Maximum number of allowable file uploads has been exceeded",
+ jsContent5:"Please select a picture",
+ jsContent6:"The entered content exceeds the maximum length.",
+ jsContent7:"Please enter content",
+ },
+ PrintboardUpload:{
+ Upload:'Upload',
+ Library:'Library',
+ Generate:'Generate',
+ PIN:'PIN',
+ Thumbnail:'Thumbnail preview of selected printboard',
+ inputContent1:'Caption generation',
+ maximumLength:'The entered content exceeds the maximum length.',
+ jsContent1:"You can only upload Image file!",
+ jsContent2:'Image must smaller than 2MB!',
+ jsContent3:"Maximum number of allowable file uploads has been exceeded",
+ jsContent4:"Please select a picture",
+ jsContent5:"The entered content exceeds the maximum length.",
+ jsContent6:"Please enter content",
+ },
+ ColorboardUpload:{
+ Thumbnail:'Thumbnail preview of selected colorboard',
+ Clear:'Clear',
+ Palette:'Palette',
+ HEX:'HEX',
+ RGBA:'RGBA',
+ AutoRecognize:'Auto Recognize',
+ ColorCode:'Color Code',
+ ExtractColor:'Extract Color',
+ jsContent1:"Your browser does not support it",
+ jsContent2:"Can't find the TCX color",
+ jsContent3:"You can only upload Image file!",
+ jsContent4:'Image must smaller than 2MB!',
+ },
+ MoodboardUpload:{
+ Upload:'Upload',
+ Library:'Library',
+ Generate:'Generate',
+ Delete:'Delete',
+ Thumbnail:'Thumbnail preview of selected moodboard',
+ layout:'layout',
+ jsContent1:'You can select up to 8 images',
+ jsContent2:"upload failed",
+ jsContent3:"You can only upload Image file!",
+ jsContent4:'Image must smaller than 2MB!',
+ jsContent5:'Please click Layout to sort randomly',
+ },
+ Cropper:{
+ Cutpicture:'Cut picture',
+ Finish:'Finish',
+ Cancel:'Cancel',
+ CropPreview:'Crop Preview',
+ },
+ Material:{
+ inputContent1:'Please input',
+ PIN:'PIN',
+ },
+ MarketingSketchUpload:{
+ Upload:'Upload',
+ MyLibrary:'My Library',
+ maximumLength:'Maximum 15 images can be uploaded, Maximum 2M per image',
+ jsContent1:'upload failed',
+ jsContent2:"You can only upload Image file!",
+ jsContent3:'Image must smaller than 2MB!',
+ jsContent5:'Maximum number of allowable file uploads has been exceeded',
+ },
+ layout:{
+ MoodBoardDesign:'MoodBoard Design',
+ Submit:'Submit',
+ },
+ Generate:{
+ ImageOnly:'Image Only',
+ TextOnly:'Text Only',
+ TextImage:'Text-Image',
+ Model1:'Model1',
+ Model2:'Model2',
+ inputContent1:'Prompt input',
+ Generate:'Generate',
+ maximumLength:'The entered content exceeds the maximum length.',
+ jsContent1:"You can only upload Image file!",
+ jsContent2:'Image must smaller than 2MB!',
+ jsContent3:"Please enter content",
+ jsContent4:'The entered content exceeds the maximum length.',
+ jsContent5:"Please enter content",
+ jsContent6:"You can select up to 8 images",
+ jsContent7:"upload failed",
+ },
+ collectionModal:{
+ Moodboard:'Moodboard',
+ Printboard:'Printboard',
+ Colorboard:'Colorboard',
+ Sketchboard:'Sketchboard',
+ collection:'select moodboard for your collection',
+ jsContent1:'You must select the image and then use the layout.',
+ jsContent2:'The uploaded files will not be saved, being sure to continue? ',
+ jsContent3:'You must choose one or more colors for further process.',
+ },
+ DesignDetail:{
+ Details:'Details',
+ EditDetails:'Edit the details of your design',
+ Submit:'Submit',
+ CurrentApparel:'Current Apparel',
+ CurrentPrint:'Current Print',
+ CurrentColor:'Current Color',
+ },
+ DesignDetailAlter:{
+ Upload:'Upload',
+ Library:'Library',
+ inputContent1:'Please input',
+ Palette:'Palette',
+ HEX:'HEX',
+ RGBA:'RGBA',
+ AutoRecognize:'Auto Recognize',
+ Delete:'Delete',
+ ColorCode:'Color Code',
+ jsContent1:"Your browser does not support it",
+ jsContent2:"You can select up to 8 images",
+ jsContent3:"upload failed",
+ jsContent4:'You can only upload Image file!',
+ jsContent5:'Image must smaller than 5MB!',
+ jsContent6:"Can't find the TCX color",
+ },
+ DesignDetailEnd:{
+ NewApparel:'New Apparel',
+ NewPrint:'New Print',
+ Placement:'Placement',
+ Overall:'Overall',
+ Single:'Single',
+ NewColor:'New Color',
+ preview:'preview',
+ Layout:'Layout',
+ jsContent1:'Please select print',
+ },
+ DesignPrintOperation:{
+ Placement:'Placement',
+ Overall:'Overall',
+ Single:'Single',
+ Random:'Random',
+ inputContent:'Please input',
+ preview:'preview',
+ jsContent1:'The above changes are not saved, being sure to continue? ',
+ },
+}
diff --git a/src/lang/index.ts b/src/lang/index.ts
index e69de29b..c776f5ee 100644
--- a/src/lang/index.ts
+++ b/src/lang/index.ts
@@ -0,0 +1,31 @@
+import { createI18n } from 'vue-i18n'
+
+// element-plus 中的语言配置
+import elementEnLocale from './en'
+import elementZhLocale from './zh-cn'
+
+// 自己的语言配置
+import enLocale from './en'
+import zhLocale from './zh-cn'
+
+// 语言配置整合
+const messages = {
+ 'en':{
+ ...enLocale,
+ ...elementEnLocale
+ },
+ 'zh-cn':{
+ ...zhLocale,
+ ...elementZhLocale
+ }
+}
+
+// 创建 i18n
+const i18n = createI18n({
+ legacy: false,
+ globalInjection:true, // 全局模式,可以直接使用 $t
+ locale: 'en',
+ messages: messages
+})
+
+export default i18n
diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts
new file mode 100644
index 00000000..0650fc06
--- /dev/null
+++ b/src/lang/zh-cn.ts
@@ -0,0 +1,295 @@
+export default {
+ Header:{
+ hello:'你好',
+ HOME:'首页',
+ LIBRARY:'收藏',
+ HISTORY:'历史',
+ bindEmail:'绑定邮箱',
+ logOff:'退出登录',
+ skip:'跳过',
+ emailContent:'你绑定了的邮箱',
+ Email:'邮箱',
+ NextStep:'下一步',
+ verification:'输入验证码',
+ SentTo:'发送',
+ Resend:'重发',
+ jsContent1:'邮箱格式不正确',
+ jsContent2:'绑定邮箱成功',
+ jsContent3:`已经长时间未操作,您必须活跃起来,否则将会在{numTime} S 后退出登录`,
+ },
+ Habit:{
+ Workspace:'工作空间',
+ WorkspaceSetting:'设置工作空间',
+ settingWorkspace:'调整您的工作空间',
+ Overall:'整体',
+ Single:'单件',
+ System:'系统',
+ Designer:'设计师',
+ Mannequin:'模特',
+ Current:'当前',
+ User:'用户',
+ jsContent1:'是否删除指定工作空间',
+ jsContent2:'请输入当前工作空间的名字',
+ },
+ RobotAssist:{
+ inputContent1:"问我什么都行~",
+ jsContent1:"请输入内容~",
+ },
+ HomeView:{
+ GetStarted:'开始设计',
+ Start:'重新开始',
+ Edit:'编辑',
+ Design:'设计',
+ Redesign:'重新设计',
+ GeneratedDesign:'生成的设计',
+ SelectedDesign:'喜欢的设计',
+ Export:'导出',
+ jsContent1:'你必须选择一种或多种颜色进行下一步处理。',
+ jsContent2:'你必须选择一种或多种颜色进行下一步处理。',
+ jsContent3:'导出文件失败。',
+ },
+ LibraryPage:{
+ Upload:'Upload',
+ Generate:'Generate',
+ Delete:'Delete',
+ Rename:'Rename',
+ inputContent1:'Search by your style code',
+ all:'all',
+ ImageOnly:'Image Only',
+ TextOnly:'Text Only',
+ TextImage:'Text-Image',
+ inputContent2:'Prompt input',
+ maximumLength:'The entered content exceeds the maximum length.',
+ Model1:'Model1',
+ Model2:'Model2',
+ inputContent3:'Prompt input',
+ Cancel:'Cancel',
+ Sure:'Sure',
+ Moodboard:'Moodboard',
+ Prints:'Prints',
+ Sketches:'Sketches',
+ Mannequins:'Mannequins',
+ jsContent1:'Are you sure to delete the picture?',
+ jsContent2:'Are you sure to delete the picture?',
+ jsContent3:'You can only upload Image file!',
+ jsContent4:'Image must smaller than 2MB!',
+ jsContent5:'This picture has been uploaded whether to continue uploading?',
+ jsContent6:'The entered content exceeds the maximum length.',
+ jsContent7:'Please enter content"',
+ },
+ HistoryPage:{
+ History:'History',
+ StartDate:'Start Date',
+ EndDate:'End Date',
+ inputContent1:'Search by collection name',
+ Detail:'Detail',
+ Rename:'Rename',
+ Retrieve:'Retrieve',
+ Delete:'Delete',
+ inputContent2:'Enter a new name',
+ Submit:'Submit',
+ CollectionsName:'Collections Name',
+ UptateTime:'Uptate Time',
+ SketchCounts:'Sketch Counts',
+ Operations:'Operations',
+ jsContent1:'Deleted successfully',
+ jsContent2:'Do you really want to delete this collection? ',
+ jsContent3:'Change successfully',
+ jsContent4:'Image must smaller than 2MB!',
+ jsContent5:'This picture has been uploaded whether to continue uploading?',
+ jsContent6:'The entered content exceeds the maximum length.',
+ jsContent7:'Please enter content"',
+ },
+ ModelPlacement:{
+ Registration:'Registration',
+ Submit:'Submit',
+ Preview:'Preview',
+ Back:'Back',
+ Restore:'Restore',
+ System:'System',
+ Library:'Library',
+ Point:'Point',
+ RemovePoint:'Remove Point',
+ mannequinHint:'Please change the pure white inside the mannequin for another color to enhance your experience',
+ SHOULDER:'SHOULDER',
+ WAISTBAND:'WAISTBAND',
+ HAND:'HAND',
+ jsContent1:"You haven't marked the image yet, and the model will not be uploaded. Are you sure you want to close it?",
+ jsContent2:'This picture has been uploaded whether to continue uploading?',
+ },
+ ModelPlacementMobile:{
+ Registration:'Registration',
+ Submit:'Submit',
+ Preview:'Preview',
+ Back:'Back',
+ Restore:'Restore',
+ Point:'Point',
+ RemovePoint:'Remove Point',
+ mannequinHint:'Please change the pure white inside the mannequin for another color to enhance your experience',
+ SHOULDER:'SHOULDER',
+ WAISTBAND:'WAISTBAND',
+ HAND:'HAND',
+ jsContent1:"You haven't marked the image yet, and the model will not be uploaded. Are you sure you want to close it?",
+ jsContent2:'This picture has been uploaded whether to continue uploading?',
+ },
+ Upload:{
+ Delete:'Delete',
+ Maximum2M:'Maximum 10 images can be uploaded, Maximum 2M per image',
+ jsContent1:'You can only upload Image file!',
+ jsContent2:'Image must smaller than 2MB!',
+ jsContent3:'upload failed',
+ },
+ SketchboardUpload:{
+ Upload:'Upload',
+ Library:'Library',
+ Generate:'Generate',
+ PIN:'PIN',
+ Thumbnail:'Thumbnail preview of selected sketchboard',
+ inputContent1:'Caption generation',
+ maximumLength:'The entered content exceeds the maximum length.',
+ jsContent1:"upload failed",
+ jsContent2:"You can only upload Image file!",
+ jsContent3:'Image must smaller than 2MB!',
+ jsContent4:"Maximum number of allowable file uploads has been exceeded",
+ jsContent5:"Please select a picture",
+ jsContent6:"The entered content exceeds the maximum length.",
+ jsContent7:"Please enter content",
+ },
+ PrintboardUpload:{
+ Upload:'Upload',
+ Library:'Library',
+ Generate:'Generate',
+ PIN:'PIN',
+ Thumbnail:'Thumbnail preview of selected printboard',
+ inputContent1:'Caption generation',
+ maximumLength:'The entered content exceeds the maximum length.',
+ jsContent1:"You can only upload Image file!",
+ jsContent2:'Image must smaller than 2MB!',
+ jsContent3:"Maximum number of allowable file uploads has been exceeded",
+ jsContent4:"Please select a picture",
+ jsContent5:"The entered content exceeds the maximum length.",
+ jsContent6:"Please enter content",
+ },
+ ColorboardUpload:{
+ Thumbnail:'Thumbnail preview of selected colorboard',
+ Clear:'Clear',
+ Palette:'Palette',
+ HEX:'HEX',
+ RGBA:'RGBA',
+ AutoRecognize:'Auto Recognize',
+ ColorCode:'Color Code',
+ ExtractColor:'Extract Color',
+ jsContent1:"Your browser does not support it",
+ jsContent2:"Can't find the TCX color",
+ jsContent3:"You can only upload Image file!",
+ jsContent4:'Image must smaller than 2MB!',
+ },
+ MoodboardUpload:{
+ Upload:'Upload',
+ Library:'Library',
+ Generate:'Generate',
+ Delete:'Delete',
+ Thumbnail:'Thumbnail preview of selected moodboard',
+ layout:'layout',
+ jsContent1:'You can select up to 8 images',
+ jsContent2:"upload failed",
+ jsContent3:"You can only upload Image file!",
+ jsContent4:'Image must smaller than 2MB!',
+ jsContent5:'Please click Layout to sort randomly',
+ },
+ Cropper:{
+ Cutpicture:'Cut picture',
+ Finish:'Finish',
+ Cancel:'Cancel',
+ CropPreview:'Crop Preview',
+ },
+ Material:{
+ inputContent1:'Please input',
+ PIN:'PIN',
+ },
+ MarketingSketchUpload:{
+ Upload:'Upload',
+ MyLibrary:'My Library',
+ maximumLength:'Maximum 15 images can be uploaded, Maximum 2M per image',
+ jsContent1:'upload failed',
+ jsContent2:"You can only upload Image file!",
+ jsContent3:'Image must smaller than 2MB!',
+ jsContent5:'Maximum number of allowable file uploads has been exceeded',
+ },
+ layout:{
+ MoodBoardDesign:'MoodBoard Design',
+ Submit:'Submit',
+ },
+ Generate:{
+ ImageOnly:'Image Only',
+ TextOnly:'Text Only',
+ TextImage:'Text-Image',
+ Model1:'Model1',
+ Model2:'Model2',
+ inputContent1:'Prompt input',
+ Generate:'Generate',
+ maximumLength:'The entered content exceeds the maximum length.',
+ jsContent1:"You can only upload Image file!",
+ jsContent2:'Image must smaller than 2MB!',
+ jsContent3:"Please enter content",
+ jsContent4:'The entered content exceeds the maximum length.',
+ jsContent5:"Please enter content",
+ jsContent6:"You can select up to 8 images",
+ jsContent7:"upload failed",
+ },
+ collectionModal:{
+ Moodboard:'Moodboard',
+ Printboard:'Printboard',
+ Colorboard:'Colorboard',
+ Sketchboard:'Sketchboard',
+ collection:'select moodboard for your collection',
+ jsContent1:'You must select the image and then use the layout.',
+ jsContent2:'The uploaded files will not be saved, being sure to continue? ',
+ jsContent3:'You must choose one or more colors for further process.',
+ },
+ DesignDetail:{
+ Details:'Details',
+ EditDetails:'Edit the details of your design',
+ Submit:'Submit',
+ CurrentApparel:'Current Apparel',
+ CurrentPrint:'Current Print',
+ CurrentColor:'Current Color',
+ },
+ DesignDetailAlter:{
+ Upload:'Upload',
+ Library:'Library',
+ inputContent1:'Please input',
+ Palette:'Palette',
+ HEX:'HEX',
+ RGBA:'RGBA',
+ AutoRecognize:'Auto Recognize',
+ Delete:'Delete',
+ ColorCode:'Color Code',
+ jsContent1:"Your browser does not support it",
+ jsContent2:"You can select up to 8 images",
+ jsContent3:"upload failed",
+ jsContent4:'You can only upload Image file!',
+ jsContent5:'Image must smaller than 5MB!',
+ jsContent6:"Can't find the TCX color",
+ },
+ DesignDetailEnd:{
+ NewApparel:'New Apparel',
+ NewPrint:'New Print',
+ Placement:'Placement',
+ Overall:'Overall',
+ Single:'Single',
+ NewColor:'New Color',
+ preview:'preview',
+ Layout:'Layout',
+ jsContent1:'Please select print',
+ },
+ DesignPrintOperation:{
+ Placement:'Placement',
+ Overall:'Overall',
+ Single:'Single',
+ Random:'Random',
+ inputContent:'Please input',
+ preview:'preview',
+ jsContent1:'The above changes are not saved, being sure to continue? ',
+ },
+}
diff --git a/src/main.ts b/src/main.ts
index 64733723..4f08d62b 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -10,6 +10,7 @@ import 'ant-design-vue/dist/antd.css';
import Antd from 'ant-design-vue';
import './assets/style/style.less'
import VueLazyload from "vue-lazyload";
+import i18n from './lang/index'
import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css"
flexible()
@@ -22,4 +23,4 @@ let loadingParam = {
attempt: 1
}
-createApp(App).use(store).use(router).use(Antd).use(VueLazyload,loadingParam).mount('#app')
+createApp(App).use(store).use(router).use(Antd).use(VueLazyload,loadingParam).use(i18n).mount('#app')
diff --git a/src/tool/https.js b/src/tool/https.js
index 15739c14..7bd27b9e 100644
--- a/src/tool/https.js
+++ b/src/tool/https.js
@@ -103,9 +103,6 @@ export const Https = {
updateUserGroupName:`/api/history/updateUserGroupName`, //History修改用户分组名
historyChoose:`/api/history/choose`, //History choose
getDesignDetail:`/api/design/detail/getDetail`,//查询design详情
- putDesignDetail:`/api/design/detail/editLayers`,//编辑单间衣服大小位置
-
- generateHighDesign:'/api/design/detail/generateHighDesign',//生成高级design图片
getNextSysElement:'/api/design/detail/getNextSysElement',//切换系统的element
detailPrintDot:'/api/design/detail/printDot',//print打点预览
designSingle:`/api/design/detail/designSingle`,//单个design
@@ -116,11 +113,8 @@ export const Https = {
batchUpdateLibraryName:'/api/library/batchUpdateLibraryName',//Library修改用户文件名
batchDeleteLibrary:'/api/library/batchDeleteLibrary',//删除library
queryLibraryTopAndBottomPage:'/api/library/queryLibraryTopAndBottomPage',//Library分页列表(查询top和bottom)
- deleteHighDesign:'/api/design/detail/deleteHighDesign',//删除高级design图片
saveOrEditTemplatePoint:'/api/library/saveOrEditTemplatePoint',//保存或者编辑template打点
libraryModelsDot:'/api/library/modelsDot',//Models打点预览
- // pythonChatStream:'/api/python/chatStream',//机器人助力
- // chatStreamTest:`/robot/chat_stream_test`,//机器人助力
chatStreamTest:`/api/python/chatStream`,//机器人助力
pictureLikeOrUnLike:`/api/python/pictureLikeOrUnLike`,//机器人生成图喜欢
getBloodBars:`/api/python/getBloodBars`,//机器人血条
diff --git a/src/views/HistoryPage.vue b/src/views/HistoryPage.vue
index e2828dab..2b41b679 100644
--- a/src/views/HistoryPage.vue
+++ b/src/views/HistoryPage.vue
@@ -8,15 +8,15 @@
-
+
@@ -33,10 +33,10 @@
}">
-
Detail
-
Rename
-
Retrieve
-
Delete
+
{{ $t('HistoryPage.Detail') }}
+
{{ $t('HistoryPage.Rename') }}
+
{{ $t('HistoryPage.Retrieve') }}
+
{{ $t('HistoryPage.Delete') }}
@@ -56,9 +56,9 @@
>
@@ -73,6 +73,7 @@ import { formatTime } from "@/tool/util"
import { Modal,message } from 'ant-design-vue';
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+import { useI18n } from 'vue-i18n';
export default defineComponent({
components: {
HeaderComponent,
@@ -83,14 +84,14 @@ export default defineComponent({
let rangePickerValue:any = ref([])
let renameData:any = ref({}) //修改名字选中的数据
const columns:any = ref([
- { title: 'Collections Name', align:'center', ellipsis: true, width: 150, dataIndex: 'name', key: 'collectionName' },
- { title: 'Uptate Time', align:'center', ellipsis: true,width: 150, dataIndex: 'updateDate', key: 'updateTime',customRender:(record:any)=>{
+ { title: useI18n().t('HistoryPage.CollectionsName'), align:'center', ellipsis: true, width: 150, dataIndex: 'name', key: 'collectionName' },
+ { title: useI18n().t('HistoryPage.UptateTime'), align:'center', ellipsis: true,width: 150, dataIndex: 'updateDate', key: 'updateTime',customRender:(record:any)=>{
let time = formatTime(record.text / 1000, 'YYYY-MM-DD hh:mm:ss')
return time
}},
- { title: 'Sketch Counts', align:'center', ellipsis: true, width: 150, dataIndex: 'sketchCount', key: 'sketchCounts' },
+ { title: useI18n().t('HistoryPage.SketchCounts'), align:'center', ellipsis: true, width: 150, dataIndex: 'sketchCount', key: 'sketchCounts' },
{
- title: 'Operations',
+ title: useI18n().t('HistoryPage.Operations'),
key: 'operation',
align:'center',
fixed: 'right',
@@ -99,11 +100,13 @@ export default defineComponent({
},
]);
let collectionList:any = ref([])
+ let {t} = useI18n()
return {
rangePickerValue,
columns,
collectionList,
renameData,
+ t,
}
},
data(){
@@ -172,16 +175,17 @@ export default defineComponent({
}
Https.axiosPost(Https.httpUrls.deleteUserGroup,data).then(
(rv: any) => {
- message.success('Deleted successfully')
+ message.success(this.t('HistoryPage.jsContent1'))
this.collectionList.splice(index,1)
}
);
}
Modal.confirm({
- title: 'Do you really want to delete this collection? ',
+ title: this.t('HistoryPage.jsContent2'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
+ mask:false,
onOk() {
deleteGroupFun(record.id,index)
}
@@ -206,7 +210,7 @@ export default defineComponent({
}
Https.axiosPost(Https.httpUrls.updateUserGroupName,data).then(
(rv: any) => {
- message.success('Change successfully')
+ message.success(this.t('HistoryPage.jsContent3'))
this.collectionList[this.renameData.index].name = this.newCollectionName
this.collectionList[this.renameData.index].updateDate = rv.updateDate
this.renameVisivle = false
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index fd8d9f54..5cd0a5fb 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -15,7 +15,7 @@
src="@/assets/images/homePage/null_img.png"
/> -->
- Get Started
+ {{ $t('HomeView.GetStarted') }}
@@ -28,10 +28,10 @@
- Start
+ {{ $t('HomeView.Start') }}
- Edit
+ {{ $t('HomeView.Edit') }}
@@ -48,11 +48,11 @@
- Design
+ {{ $t('HomeView.Design') }}
- Redesign
+ {{ $t('HomeView.Redesign') }}
@@ -60,8 +60,9 @@
@@ -98,10 +99,10 @@
@@ -201,6 +202,8 @@ import { LoadingOutlined } from "@ant-design/icons-vue";
import draggable from 'vuedraggable'
import JSZip from "jszip";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
+import i18n from "@/lang";
+import { useI18n } from "vue-i18n";
const FileSaver = require("file-saver");
export default defineComponent({
@@ -239,6 +242,7 @@ export default defineComponent({
height:'',
}
let userInfo:any = {}
+ let {t} = useI18n()
return {
store,
likeDesignCollectionList,
@@ -249,6 +253,7 @@ export default defineComponent({
contentImgMax,
contentImg,
userInfo,
+ t,
};
},
data() {
@@ -444,7 +449,7 @@ export default defineComponent({
this.store.state.UploadFilesModule.allBoardData;
if (!colorBoards || colorBoards?.length < 1) {
message.warning(
- "You must choose one or more colors for further process."
+ this.t('HomeView.jsContent1')
);
return;
}
@@ -481,7 +486,7 @@ export default defineComponent({
this.store.state.UploadFilesModule.allBoardData;
if (!colorBoards || colorBoards?.length < 1) {
message.warning(
- "You must choose one or more colors for further process."
+ this.t('HomeView.jsContent2')
);
return;
}
@@ -976,7 +981,7 @@ export default defineComponent({
});
})
.catch((res) => {
- message.warning("Failed to export the file");
+ message.warning(this.t('HomeView.jsContent3'));
this.isShowMark = false;
});
},
diff --git a/src/views/LibraryPage.vue b/src/views/LibraryPage.vue
index 80eb5ab5..721e61fb 100644
--- a/src/views/LibraryPage.vue
+++ b/src/views/LibraryPage.vue
@@ -40,11 +40,11 @@
accept=".jpg,.png,.jpeg,.bmp"
@change="fileUploadChange"
>
-
Upload
+
{{ $t('LibraryPage.Upload') }}
-
Upload
+
{{ $t('LibraryPage.Upload') }}
-
+
@@ -84,11 +84,11 @@
-
Delete
-
Rename
+
{{ $t('LibraryPage.Delete') }}
+
{{ $t('LibraryPage.Rename') }}
-
all
+
{{ $t('LibraryPage.all') }}
@@ -147,7 +147,7 @@
v-model="checkbox[0].type"
@click="setKeyword(0)"
/>
-
Image Only
+
{{ $t('LibraryPage.ImageOnly') }}
@@ -157,7 +157,7 @@
v-model="checkbox[1].type"
@click="setKeyword(1)"
/>
- Text Only
+ {{ $t('LibraryPage.TextOnly') }}
@@ -167,21 +167,21 @@
v-model="checkbox[2].type"
@click="setKeyword(2)"
/>
- Text-Image
+ {{ $t('LibraryPage.TextImage') }}
{{ printModel.name }}
- - Model1
- - Model2
+ - {{ $t('LibraryPage.Model1') }}
+ - {{ $t('LibraryPage.Model2') }}
@@ -287,11 +287,11 @@
>
@@ -321,6 +321,7 @@ import {getUploadUrl,isMoible} from '@/tool/util'
import { useStore } from "vuex";
import { Https } from "@/tool/https";
import { getCookie } from "@/tool/cookie";
+import { useI18n } from "vue-i18n";
export default defineComponent({
components: {
HeaderComponent,
@@ -330,12 +331,12 @@ export default defineComponent({
},
setup() {
let menuList = ref([
- {title:'Moodboard',code:'Moodboard',icon:'fi fi-rr-grid',showChildren:false,children:[]},
- {title:'Prints',code:'Printboard',icon:'fi fi-rs-objects-column',showChildren:false,children:[]},
+ {title:useI18n().t('LibraryPage.Moodboard'),code:'Moodboard',icon:'fi fi-rr-grid',showChildren:false,children:[]},
+ {title:useI18n().t('LibraryPage.Prints'),code:'Printboard',icon:'fi fi-rs-objects-column',showChildren:false,children:[]},
// {title:'Sketches',code:'SketchboardFirst',icon:'fi icon iconfont icon-a-waitao_changkuanwaitao11x',showChildren:false,children:[{title:'Apparel',code:'Sketchboard'}]},
- {title:'Sketches',code:'Sketchboard',icon:'fi icon iconfont icon-a-waitao_changkuanwaitao11x',showChildren:false,children:[]},
+ {title:useI18n().t('LibraryPage.Sketches'),code:'Sketchboard',icon:'fi icon iconfont icon-a-waitao_changkuanwaitao11x',showChildren:false,children:[]},
// {title:'Market Sketch',code:'MarketingSketch',icon:'icon-fuwushichang',showChildren:false,children:[]},
- {title:'Mannequins',code:'Models',icon:'fi fi-rs-people',showChildren:false,children:[]},
+ {title:useI18n().t('LibraryPage.Mannequins'),code:'Models',icon:'fi fi-rs-people',showChildren:false,children:[]},
])
let selectImgList:any = ref([])
@@ -387,6 +388,9 @@ export default defineComponent({
optype:false,
name:'model1'
})
+ let {t} = useI18n()
+ console.log();
+
return {
menuList,
selectImgList,
@@ -416,7 +420,8 @@ export default defineComponent({
inputTime,
generateList,
selectGenerateList,
- printModel
+ printModel,
+ t
}
},
data(this_) {
@@ -614,10 +619,11 @@ export default defineComponent({
deleteSinglePic(data:any,index:any){
let _this = this
Modal.confirm({
- title: 'Are you sure to delete the picture?',
+ title: this.t('LibraryPage.jsContent1'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
+ mask:false,
// centered:true,
onOk() {
_this.confirmDeletePic(data,index)
@@ -632,7 +638,7 @@ export default defineComponent({
}
let _this = this
Modal.confirm({
- title: 'Are you sure to delete the picture?',
+ title: this.t('LibraryPage.jsContent2'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
@@ -665,11 +671,11 @@ export default defineComponent({
beforeUpload(file:any,fileList:any){
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
if (!isJpgOrPng) {
- message.warning('You can only upload Image file!');
+ message.warning(this.t('LibraryPage.jsContent3'));
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
- message.warning('Image must smaller than 2MB!');
+ message.warning(this.t('LibraryPage.jsContent4'));
}
if(isJpgOrPng && isLt2M){
this.currentUploadFileNum = fileList.length
@@ -717,11 +723,12 @@ export default defineComponent({
affirmCstomRequest(data:any){
let _this = this
Modal.confirm({
- title: 'This picture has been uploaded whether to continue uploading? ',
+ title: this.t('LibraryPage.jsContent5'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
+ zIndex:99999,
// centered:true,
onOk() {
data.checkMd5 = 0
@@ -895,14 +902,14 @@ export default defineComponent({
let arr = this.captionGeneration.split(/\s+/).length
if(arr > 75){
message.warning(
- "The entered content exceeds the maximum length."
+ this.t('LibraryPage.jsContent6')
);
return
}
}else{
message.warning(
- "Please enter content"
+ this.t('LibraryPage.jsContent7')
);
return
}