diff --git a/frontend/src/components/FilePreviewModal.vue b/frontend/src/components/FilePreviewModal.vue index 98903c12..8e784e12 100644 --- a/frontend/src/components/FilePreviewModal.vue +++ b/frontend/src/components/FilePreviewModal.vue @@ -9,6 +9,7 @@ * - 对 Office 文档在可公网 HTTPS 访问时走 Office 在线预览,否则降级为打开/下载 */ import { computed, ref, watch } from 'vue'; +import { useI18n } from 'vue-i18n'; import { marked } from 'marked'; import * as XLSX from 'xlsx'; import { useMessage } from '../composables/useMessage'; @@ -44,6 +45,7 @@ const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void; }>(); const msg = useMessage(); +const { t } = useI18n(); const isLoading = ref(false); const error = ref(''); @@ -146,7 +148,7 @@ const downloadFile = async () => { URL.revokeObjectURL(url); } catch (err: any) { console.error('Download failed:', err); - msg.error('下载失败: ' + (err.message || '未知错误')); + msg.error(t('filePreview.msg.downloadFailed', { reason: err.message || t('filePreview.msg.unknownError') })); } finally { isDownloading.value = false; } @@ -419,7 +421,7 @@ watch(
- 查看知识库模块当前的 Dify 连接情况和本地同步概况。 -
+{{ t('kbDifyHealth.subtitle') }}
- 管理知识库模块使用的 Dify 连接和默认同步参数。 -
+{{ t('kbDifySettings.subtitle') }}