feat: 竞赛主页中文

This commit is contained in:
2026-02-04 10:57:25 +08:00
parent 287825b4bf
commit ca782d0aff
13 changed files with 4016 additions and 3682 deletions

View File

@@ -22,6 +22,9 @@
</template>
<script setup lang="ts">
import { computed, watch } from 'vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const props = defineProps<{
status: string
type: 'pdf' | 'video'
@@ -29,16 +32,16 @@
const textMap: Record<string, string> = {
idle: '',
uploading: 'Upload in progress…',
success: 'Uploaded Successfully',
error: 'Upload failed'
uploading: computed(() => t('AwardsPage.uploadInProgress')).value,
success: computed(() => t('AwardsPage.uploadSuccess')).value,
error: computed(() => t('AwardsPage.uploadFailed')).value
}
const tips = computed(() => {
if (props.type === 'pdf') {
return 'PDF file, max 20MB'
return t('AwardsPage.pdfFileTip')
} else if (props.type === 'video') {
return 'Video file (MP4, MOV), 1080p, max 100MB'
return t('AwardsPage.videoFileTip')
}
return ''
})