diff --git a/examples/app-showcase/src/system/translations/index.ts b/examples/app-showcase/src/system/translations/index.ts index 284ea770c2..755ef79c9a 100644 --- a/examples/app-showcase/src/system/translations/index.ts +++ b/examples/app-showcase/src/system/translations/index.ts @@ -58,6 +58,25 @@ export const ShowcaseTranslationBundle = { }, sync_error: { label: 'Sync Error' }, }, + // The FIRST `_views` block on the `en` side of this bundle, and + // deliberately not a mirror of the zh-CN one below: view LABELS are + // already English in `ui/views/task.view.ts`, so restating all fifteen + // here would be fifteen fake translations of the kind this bundle's + // header warns about. What earns an entry is the `emptyState` fixture + // (#7714): the surface-matrix check wants the SAME key resolving to + // different copy per locale, and a key present only in zh-CN cannot + // show that — an en session would be reading the view's inline source + // string through the fallback path, which is a different code path and + // proves nothing about the resolver. So this pins the en arm of that + // one key group, and nothing else. + _views: { + urgent: { + emptyState: { + title: 'No urgent tasks', + message: 'Nothing needs immediate attention right now. A task appears here as soon as its priority is raised to Urgent.', + }, + }, + }, }, showcase_account: { label: 'Account', @@ -247,7 +266,19 @@ export const ShowcaseTranslationBundle = { // The default list — keyed `default`, see showcase_project above. default: { label: '全部任务' }, in_progress: { label: '进行中' }, - urgent: { label: '紧急' }, + urgent: { + label: '紧急', + // The showcase's only `emptyState` specimen (#7714) — the view is + // authored with one in `ui/views/task.view.ts`, so this is the + // locale half of that fixture. Two new source labels enter the + // extractor's expected set here; both are translated in the same + // change, which is what keeps check:i18n-coverage's frozen + // untranslated count for this example unmoved in either direction. + emptyState: { + title: '暂无紧急任务', + message: '当前没有需要立即处理的事项。任务优先级调整为「紧急」后会出现在这里。', + }, + }, done: { label: '已完成' }, tabular: { label: '任务清单' }, grid: { label: '表格' }, diff --git a/examples/app-showcase/src/ui/views/task.view.ts b/examples/app-showcase/src/ui/views/task.view.ts index 934f37c467..337230eb45 100644 --- a/examples/app-showcase/src/ui/views/task.view.ts +++ b/examples/app-showcase/src/ui/views/task.view.ts @@ -74,6 +74,33 @@ export const TaskViews = defineView({ data, columns: [{ field: 'title' }, { field: 'project' }, { field: 'assignee' }, { field: 'status' }, { field: 'priority' }, { field: 'due_date' }], filter: [{ field: 'priority', operator: 'equals', value: 'urgent' }], + + // ── The showcase's `emptyState` specimen (#7714) ────────────────────── + // Authored HERE, on a filtered saved view, and not on some unfiltered + // object list: emptiness means different things on the two. An empty + // unfiltered list is a SETUP state ("nothing exists yet") that the seed + // deliberately never produces; an empty filtered view is a STEADY state + // ("nothing matches right now") that a running deployment hits + // constantly — and on *this* filter it is the outcome you want, so the + // copy can report good news instead of nagging about missing data. That + // is the case per-view empty-state copy exists for, which makes this the + // spelling worth pinning as the fixture. + // + // It is also reachable without touching the seed: the two urgent seed + // rows are exactly what the `bulk_actions` view's `showcase_mark_done` + // is there to clear, so a demo user empties this view by using the app. + // + // Consumed as a translation surface at + // `objects.showcase_task._views.urgent.emptyState.{title,message}` — + // both locales are authored in `system/translations/index.ts`. Until + // this fixture existed the spec declared that key group with no + // reachable instance anywhere under `examples/`, so the i18n + // surface-matrix check had nothing to resolve and was waived rather + // than run. + emptyState: { + title: 'No urgent tasks', + message: 'Nothing needs immediate attention right now. A task appears here as soon as its priority is raised to Urgent.', + }, }, done: { label: 'Done',