From 0ea55d7e44bcc226684ba84b99756fb58ae2b08d Mon Sep 17 00:00:00 2001 From: Jet Li Date: Tue, 3 Sep 2024 13:27:31 -0700 Subject: [PATCH] Fix a few bugs, more translation --- frontend/src/lang/en.js | 3 +-- frontend/src/lang/zh.js | 12 +++++++++++- frontend/src/pages/user/workspace/Home.vue | 18 +++++++++--------- frontend/src/types/projectUtils.js | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 5c825da..eaf6e9c 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -217,6 +217,5 @@ export default { 'Upload attachment': 'Upload attachment', 'Didn\'t get the email? Check junk folder or': 'Didn\'t get the email? Check junk folder or ', 'send again': 'send again', - 'No content yet': 'No content yet' - + 'No content yet': 'No content yet', } diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index eadf2da..4e78ffc 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -215,5 +215,15 @@ export default { 'Upload attachment': '上传附件', 'Didn\'t get the email? Check junk folder or': '没收到邮件?检查垃圾文件夹或', 'send again': '重新发送', - 'No content yet': '暂无内容' + 'No content yet': '暂无内容', + OUTSTANDING: '进行中', + PAID: '已付款', + DONE: '已完成', + RECRUITING: '招人中', + ONGOING: '进行中', + PENDING: '待确认', + CLOSED: '已关闭', + REJECTED: '已拒绝', + APPLYING: '申请中', + ACCEPTING: '接受中' } diff --git a/frontend/src/pages/user/workspace/Home.vue b/frontend/src/pages/user/workspace/Home.vue index 57699eb..cd13ec3 100644 --- a/frontend/src/pages/user/workspace/Home.vue +++ b/frontend/src/pages/user/workspace/Home.vue @@ -17,7 +17,7 @@
-

{{ fromIntToProjectStatus(project.status) }}

+

{{ $t(fromIntToProjectStatus(project.status)) }}

@@ -211,7 +211,7 @@

{{ - fromIntToMilestoneStatus(project.project.progress.milestone_status) + $t(fromIntToMilestoneStatus(project.status)) }}

@@ -242,10 +242,10 @@
{{ $t('Milestone') - }} + }} {{ milestone.index - }} + }}
@@ -253,22 +253,22 @@ {{ $t('Goal') }} {{ milestone.description - }} + }}
{{ $t('Status') }} {{ - fromIntToMilestoneStatus(milestone.status) - }} + $t(fromIntToMilestoneStatus(milestone.status)) + }}
{{ $t('Payment') - }} + }} {{ milestone.status == 3 @@ -285,7 +285,7 @@ {{ $t('Update') }} {{ getDateFromFulltimeString(milestone.update_time) - }} + }}
diff --git a/frontend/src/types/projectUtils.js b/frontend/src/types/projectUtils.js index ff26a9a..235fb34 100644 --- a/frontend/src/types/projectUtils.js +++ b/frontend/src/types/projectUtils.js @@ -56,7 +56,7 @@ const convertIntoToMilestoneStatus = function (i) { return p } } - return milestoneStatusEnum.DONE + return Object.keys(milestoneStatusEnum).find(key => milestoneStatusEnum[key] === milestoneStatusEnum.DONE) } const convertIntoToProjectIssueStatus = function (i) {