From 33a879625f5d8f371de991347412a033fc82ab08 Mon Sep 17 00:00:00 2001 From: ulleo Date: Thu, 4 Dec 2025 14:13:49 +0800 Subject: [PATCH] fix: i18n not working when uploading Excel files --- frontend/src/views/system/excel-upload/Uploader.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/system/excel-upload/Uploader.vue b/frontend/src/views/system/excel-upload/Uploader.vue index 7ba8d5a1..a44a1797 100644 --- a/frontend/src/views/system/excel-upload/Uploader.vue +++ b/frontend/src/views/system/excel-upload/Uploader.vue @@ -9,6 +9,7 @@ import { genFileId, type UploadInstance, type UploadProps, type UploadRawFile } import { useCache } from '@/utils/useCache.ts' import { settingsApi } from '@/api/setting.ts' import ccmUpload from '@/assets/svg/icon_ccm-upload_outlined.svg' +import { getLocale } from '@/utils/utils.ts' const { t } = useI18n() const { wsCache } = useCache() @@ -25,7 +26,8 @@ const uploadRef = ref() const uploadLoading = ref(false) const token = wsCache.get('user.token') -const headers = ref({ 'X-SQLBOT-TOKEN': `Bearer ${token}` }) +const locale = getLocale() +const headers = ref({ 'X-SQLBOT-TOKEN': `Bearer ${token}`, 'Accept-Language': locale }) const getUploadURL = () => { return import.meta.env.VITE_API_BASE_URL + props.uploadPath }