feat(i18n): 将前端用户可见中文硬编码改为四语言

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
sophieandCursor committed 2026-07-30 14:39:16 +08:00
1 parent dce915ea30
commit ac7b53a523
105 files changed
+2928 -647

No files matched your search

@@ -432,7 +432,7 @@ const loadPdfContent = async (): Promise<'iframe' | 'office' | 'sheet'> => {
return 'office';
}
if (!blobType.includes('pdf') && officePreviewExts.has(effectiveExt)) {
throw new Error('当前原始文件暂不支持直接预览,已阻止浏览器自动下载');
throw new Error(t('filePreview.unsupportedRawPreview'));
}
let fallbackType = 'application/octet-stream';
if (ext.value === 'pdf' || ['doc', 'ppt', 'pptx'].includes(ext.value)) fallbackType = 'application/pdf';
@@ -629,7 +629,7 @@ watch(
<div class="text-sm font-medium text-slate-500 dark:text-slate-400 tracking-wide">{{ t('filePreview.title') }}</div>
<div class="mt-1 font-semibold text-slate-900 dark:text-slate-100 break-words">{{ activeFile.name }}</div>
<div v-if="isImageGallery" class="mt-1 text-xs text-slate-500 dark:text-slate-400">
第 {{ activeIndex + 1 }} / {{ activeFiles.length }} 张
{{ t('filePreview.imageCounter', { current: activeIndex + 1, total: activeFiles.length }) }}
</div>
</div>
<div class="flex shrink-0 items-center gap-2">
@@ -637,7 +637,7 @@ watch(
<button
type="button"
class="btn-icon-ds h-8 w-8"
aria-label="缩小"
:aria-label="t('filePreview.zoomOut')"
:disabled="excelZoom <= EXCEL_ZOOM_MIN"
@click="adjustExcelZoom(-EXCEL_ZOOM_STEP)"
>
@@ -646,7 +646,7 @@ watch(
<button
type="button"
class="rounded-md px-2 py-1 text-xs font-medium text-secondary transition hover:bg-surface-soft"
aria-label="重置缩放"
:aria-label="t('filePreview.resetZoom')"
@click="resetExcelZoom"
>
<span class="inline-flex items-center gap-1">
@@ -657,7 +657,7 @@ watch(
<button
type="button"
class="btn-icon-ds h-8 w-8"
aria-label="放大"
:aria-label="t('filePreview.zoomIn')"
:disabled="excelZoom >= EXCEL_ZOOM_MAX"
@click="adjustExcelZoom(EXCEL_ZOOM_STEP)"
>
@@ -760,7 +760,7 @@ watch(
type="button"
class="absolute left-3 top-1/2 z-10 inline-flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-slate-200 bg-white/90 text-slate-700 shadow transition hover:bg-white disabled:cursor-not-allowed disabled:opacity-40 dark:border-slate-700 dark:bg-slate-900/90 dark:text-slate-100"
:disabled="activeIndex <= 0"
aria-label="上一张"
:aria-label="t('filePreview.prevImage')"
@click="showPrevImage"
>
<ChevronLeft class="h-5 w-5" />
@@ -771,7 +771,7 @@ watch(
type="button"
class="absolute right-3 top-1/2 z-10 inline-flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-slate-200 bg-white/90 text-slate-700 shadow transition hover:bg-white disabled:cursor-not-allowed disabled:opacity-40 dark:border-slate-700 dark:bg-slate-900/90 dark:text-slate-100"
:disabled="activeIndex >= activeFiles.length - 1"
aria-label="下一张"
:aria-label="t('filePreview.nextImage')"
@click="showNextImage"
>
<ChevronRight class="h-5 w-5" />