Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion examples/app-showcase/src/system/translations/index.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -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',
Expand DownExpand Up@@ -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: '表格' },
Expand Down
27 changes: 27 additions & 0 deletions examples/app-showcase/src/ui/views/task.view.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -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',
Expand Down
Loading