feat(front): add localization for upload speed calculation in FileUploadSpeedInfoView component to enhance user understanding

This commit is contained in:
keven1024
2025-12-20 10:39:57 +08:00
parent bfe9a8f3d6
commit b4a4be09fa
3 changed files with 30 additions and 4 deletions

View File

@@ -1,8 +1,18 @@
<script setup lang="ts">
const { t } = useI18n()
</script>
<template>
<div class="flex flex-col gap-2 pt-3">
<div class="text-xl font-bold">上传速度如何计算</div>
<div class="text-xl font-bold">{{ t('page.progress.file.uploadSpeedInfo.title') }}</div>
<div class="opacity-75">
上传速度根据当前秒上传了 <b>文件区块的数量</b> * <b>每个文件区块的大小</b> 估算而来可能与真实上传速度有一定的误差仅供参考
<i18n-t keypath="page.progress.file.uploadSpeedInfo.desc.base">
<template #chunkNum>
<b>{{ t('page.progress.file.uploadSpeedInfo.desc.chunkNum') }}</b>
</template>
<template #chunkSize>
<b>{{ t('page.progress.file.uploadSpeedInfo.desc.chunkSize') }}</b>
</template>
</i18n-t>
</div>
</div>
</template>

View File

@@ -110,7 +110,15 @@
"finish": "Upload Finished"
},
"instantUploadSuccess": "File with same hash exists in cloud, instant upload successful",
"uploadFailedRetry": "Upload failed, please try again later"
"uploadFailedRetry": "Upload failed, please try again later",
"uploadSpeedInfo": {
"title": "How is the upload speed calculated?",
"desc": {
"base": "The upload speed is estimated based on {chunkNum} * {chunkSize} uploaded in the current second, which may have some deviation from the actual upload speed, for reference only",
"chunkNum": "Number of file chunks",
"chunkSize": "Size of each file chunk"
}
}
}
},
"result": {

View File

@@ -110,7 +110,15 @@
"finish": "上传完成"
},
"instantUploadSuccess": "云端已有相同Hash文件, 秒传成功",
"uploadFailedRetry": "上传失败,请稍后重试"
"uploadFailedRetry": "上传失败,请稍后重试",
"uploadSpeedInfo": {
"title": "上传速度如何计算",
"desc": {
"base": "上传速度根据当前秒上传了 {chunkNum} * {chunkSize} 估算而来,可能与真实上传速度有一定的误差,仅供参考",
"chunkNum": "文件区块的数量",
"chunkSize": "每个文件区块的大小"
}
}
}
},
"result": {