Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4f7bf9f
wip(#36373): business wording in the report and widget panels
claude Nov 22, 2026
67132dd
wip(#36373): current-language titles, served text in the panels, inli…
claude Nov 22, 2026
04c7459
test(app-shell): move the panel tests to the business wording (#36373)
claude Nov 22, 2026
20bb0d8
test(app-shell): pin the business wording, the served heading and the…
claude Nov 22, 2026
ea64ecd
chore: changeset for the report panel business wording (#36373)
claude Nov 22, 2026
bf8121b
fix(app-shell): type-check findings in the report panel wording (#36373)
claude Nov 22, 2026
a4bc12d
docs: report and widget panel wording, and the inline-entry precedenc…
claude Nov 22, 2026
27dcab4
test(app-shell): pay the lint and formula loads at collection in the …
claude Nov 22, 2026
71d58f1
fix(app-shell): name the report form's order-and-drill section by wha…
claude Nov 22, 2026
20c4ea0
Merge origin/main into claude/project-thread-3gbdm3
claude Nov 22, 2026
e2d307a
fix(app-shell): read a dimension's column through columnIdentity() fo…
claude Nov 22, 2026
ac613f9
docs: scope the inline-entry sentence to a report with a packaged bas…
claude Nov 22, 2026
c6ab9f2
fix(spec): an inline entry counts as changed, so the pair's translati…
claude Nov 22, 2026
12c41f8
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 22, 2026
0df531f
fix(app-shell): the dashboard page's card panel reads the served titl…
claude Nov 22, 2026
8ad569b
fix(spec): a map-changed slot reads the pair for the requested locale…
claude Nov 22, 2026
85e6baf
fix(spec): a map-changed slot finds the pair's row by language, not b…
claude Nov 22, 2026
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
24 changes: 24 additions & 0 deletions .changeset/36373-report-panel-business-wording.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@objectstack/spec': minor
'@object-ui/app-shell': patch
'@object-ui/i18n': patch
---

feat(app-shell): the report and dashboard-widget panels speak business wording, and opening the report editor keeps the page in the session's language

Clause-②: yes (widening) — the report and widget panels accept an edit of a translated name or title in the session's language, stored as the inline locale map `{ default: SOURCE, LANG: EDIT }` the spec's `I18nLabel` already allows; nothing is removed or renamed
Metadata-protocol: semantic — `translateReport` and `translateDashboard` now treat a report `label`/`description` or a widget `title` as changed when its inline locale-map entry for the requested locale (the entry the panel writes: exact tag, then the locale's own script, else base tag or a sibling region; never `default`) differs from the packaged base's own, so the base's translation no longer replaces it; a translation the paired `.custom` package ships still answers first (ruling record 6631250894), and with none the entry is served; dataset members (`translateDataset`, ADR-0149) are unchanged

The report editor beside a report (runtime 「编辑」 and Studio) and the dashboard widget property bar (Studio, and the dashboard page's edit state) now name things the way a business reader does:

- Fields, measures and data sources show their labels in the current language; the machine name is on hover only (`title`), never printed. A measure reads `LABEL · AGGREGATE` with the aggregate in words (「金额 · 合计」, "Amount · Sum").
- 「行(维度)」「维度」 read 「分组」, 「值(度量)」 reads 「指标」, 「数据集」 reads 「数据来源」 (its label alone, no `(name)` and no description), and the filter-binding section reads 「跟着页面顶部的筛选变」 with each filter by its name (「时间」 for the date range, the dimension's label for a filter with none).
- The chart-type list is Chinese names with their icons (柱状图, 折线图, …), not `bar`.
- The line under the data source is plain words: 「报表从这里取数;每个人只能看到自己有权限的记录。」 — no 「受治理」 or 「RLS」.
- The report form rows below the curated fields (section headings and hints in zh-CN) use the same wording.

The report's name box and a widget's title box show the served (current-language) text while it is untouched, and an edit lands in the session language only: a plain-string source shown translated becomes `{ default: SOURCE, LANG: EDIT }`, so every other language reads exactly what it read before. For a report or dashboard installed from a package (one with a packaged base), the server serves that entry ahead of the package's translation (a translation the paired customization package ships still comes first), so the edit is what the page shows after save. A report with no packaged base keeps the bundle first: where the bundle has an entry for that language, the stored edit does not show.

Fixed: opening the report editor no longer turns the page heading and subtitle from the served 「各阶段商机」 to the English source. The page draws the served text for every translated key the edit has not touched.

This supersedes objectui#11161's `LABEL (name)` and objectui#12303's trailing machine name on these two panels only; other dataset pickers are unchanged.
20 changes: 20 additions & 0 deletions content/docs/protocol/kernel/i18n-standard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,26 @@ its own raw dotted key on screen, in every locale.
For the props that have no bundle key at all, the map is the **only**
localisation route — a document localised that way is fully localised.

**A report's `label` and `description` and a dashboard widget's `title` keep
their map entry over the bundle at the `/meta` boundary** (objectstack#36373).
These props have a bundle key too, so `translateReport` and
`translateDashboard` decide between the two. The map's entry for the requested
locale is the one the panel writes for that locale — the exact tag, then an
entry of the locale's own script where the language splits by script (a
`zh-TW` reader never takes a Simplified `zh` entry), otherwise its base
language or a sibling region; never `default`. When the item has a packaged
base and that entry differs from the base's own, the slot counts as changed,
exactly as a re-authored string does: a translation the paired `.custom`
package ships still answers first, the base's translation never does, and with
no pair translation the entry is served. Otherwise (no packaged base, no
entry, or the same entry) the bundle entry is served as before. A map that repeats the package's own map
therefore still takes a package's translation updates, and a map an admin
edited in one language serves that edit while every other language reads its
bundle text. This is how the report and widget panels store an edit made in a
non-default language: `{ default: SOURCE, 'zh-CN': EDIT }`, the source text
untouched. Dataset members are not covered: `translateDataset` keeps ADR-0149's
bundle-first order.

**A map is never extracted, and no bundle key is synthesised for one.**
`os i18n extract` scaffolds no row for a map and no key family exists for one;
in particular **no key is derived from a node's position in the component
Expand Down
8 changes: 5 additions & 3 deletions content/docs/ui/dashboards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,11 @@ or re-target. `os validate` and the publish door refuse such a key with
absent). A dashboard embedded in a page that declares its own `variables` merges the two
scopes: a filter shadows only an outer variable of the same name, and a write goes to the
scope that defines the variable.
- **Bindings in Studio.** The dashboard widget inspector has a **Dashboard filter bindings**
section, one row per declared filter, with an apply toggle (the `false` opt-out) and a
field picker for the override.
- **Bindings in Studio.** The dashboard widget inspector has a **Follows the filters at the
top of the page** section, one row per declared filter, named by the filter's label (the
date range reads **Date**; a filter with no label reads its dimension's label), with an
apply toggle (the `false` opt-out) and a field picker for the override. The panel names
fields, metrics and data sources by their labels; a machine name shows on hover only.
- **Refresh.** The page header has a **Refresh All** button, and `refreshIntervalSeconds`
re-reads the widgets every that many seconds (`0` or unset: no automatic refresh). Widgets
re-read in place rather than remounting, single-value tiles included.
Expand Down
19 changes: 19 additions & 0 deletions content/docs/ui/reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,25 @@ A `report` entry **without** `reportName` opens the app's report index
open. The console adds no index entry by itself: declare `{ id: 'nav_reports', type:
'report' }` where the menu should carry it.

## Editing a report beside it

An admin opens a report's **Edit** panel from the report page (and the same panel in Studio).
The panel speaks the reader's language rather than the schema's:

- **Data source** is the bound `dataset`, shown by its label; **Metrics** are its `values`,
each read as `LABEL · AGGREGATE` (*Amount · Sum*); **Group by** is its `rows`; a matrix adds
**Group columns by** (`columns`). Fields show their labels; the machine name is on hover only.
- The chart type list shows each type by name with its icon.
- The name box shows the report's name in the current language. An edit made in a
non-default language is stored for that language only, as the inline locale map
`{ default: SOURCE, 'zh-CN': EDIT }`, so every other language reads what it read before.
For a report installed from a package, the server serves that entry ahead of the
package's translation bundle; a report with no packaged base keeps the bundle first, so
where the bundle has an entry for that language the edit does not show
([inline locale maps](/docs/protocol/kernel/i18n-standard#form-2-is-several-locales-text-at-once)).
- The page heading and subtitle stay in the current language while the panel is open; a key
the edit changes shows the edit.

## Permissions and protection

The report schema carries exactly **one** access-shaped block, and it is not about
Expand Down
Loading
Loading