fix(界面文案): 前端两棵树加 userNotice 闸——非中文提示语一律换成中文句

后端仍有出口把底层异常原文写进 error_message / fileError / 匹配原因 / 响应 message,逐条翻译
跟不上新增;用户 2026-10-09 要求整个项目的提示语都用中文,所以把规矩做进界面出口。

规则:原文含中文照原样透出;整条无中文换成中文兜底句;**含中文但冒号后是纯英文尾巴的剥掉尾巴**
("转换结果打包失败: No space left on device" 只留主干)。被隐去的原文进 console 供核对日志。

闸口:用户端 http.ts 的 extractErrorMessage 五条返回路径与 unwrapJavaResponse、后台 envelope 的
textOf/errorTextOf、13 处任务卡 `错误:${item.error}`、2 处 fileError 兜底句、发布页文件错误与
匹配原因函数、dispatch-guard 的解析失败原因清单、22 处 ElMessage.error(result.error) 型展示、
后台看板与数字人详情页两处模板。

尺子:frontend-vue/tests/user-notice-chinese-only-guard.test.ts、admin-frontend-vue/tests/user-notice-chinese-only.test.ts
(分母硬钉+内存造违例自证+摘壳写法仍计入分母);source-pin 台账只登记本轮新增那一个文件,
别人的在飞格子没重算。node --test 用户端 782/782、后台 1782/1782,两棵树 vue-tsc 均 rc=0。
This commit is contained in:
2026-10-09 19:34:54 +08:00
parent 9ecc9f30fb
commit 0bf21b84f0
34 changed files with 396 additions and 78 deletions
@@ -4,6 +4,7 @@
* 页签二「变体采集」= 麦象批量任务(variant-collection),数据口径与列不同故独立页签。
* 30s 轮询:页面隐藏暂停、回前台立即刷新、卸载清理;另有手动刷新。 */
import { computed, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import { userNotice } from '@/api/user-notice'
import { ElMessage } from 'element-plus'
import OldPagination from '@/components/OldPagination.vue'
import { useCompanyTabStore } from '@/stores/company-tab'
@@ -579,7 +580,7 @@ onUnmounted(() => {
</template>
</el-descriptions-item>
<el-descriptions-item label="当前处理">{{ currentScopeOf(detail) }}</el-descriptions-item>
<el-descriptions-item label="错误信息" :span="2">{{ detail.errorMessage || detail.message || '—' }}</el-descriptions-item>
<el-descriptions-item label="错误信息" :span="2">{{ userNotice(detail.errorMessage || detail.message, '—') }}</el-descriptions-item>
</el-descriptions>
<h4 class="detail-title">分组明细({{ (detail.shops || []).length }} 组)</h4>
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { formatDateTime } from '@/utils/datetime'
import { userNotice } from '@/api/user-notice'
/** 视频任务记录页 · 像素复刻旧版 admin.html panel-image-video-tasks(自绘:form-box 筛选[用户名/提交起止+查询/重置] + panel-box toolbar[全选/批量下载/权限配置/汇总] + 任务卡片网格 + 旧式分页)。
* script 逻辑沿用现有 Vue 实现(批量打包/明细抽屉/权限授权)。 */
import { computed, onMounted, reactive, ref, watch } from 'vue'
@@ -394,7 +395,7 @@ onMounted(load)
<el-descriptions-item label="提交时间">{{ formatDateTime(detail.submittedAt) }}</el-descriptions-item>
<el-descriptions-item label="生成时间">{{ formatDateTime(imageVideoGeneratedAt(detail)) }}</el-descriptions-item>
<el-descriptions-item label="执行ID">{{ detail.cozeExecuteId || '—' }}</el-descriptions-item>
<el-descriptions-item label="错误">{{ detail.errorMessage || '—' }}</el-descriptions-item>
<el-descriptions-item label="错误">{{ userNotice(detail.errorMessage, '—') }}</el-descriptions-item>
</el-descriptions>
</template>
</div>