@protobase/ui 0.63.5 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/account/change-email-dialog.js +1 -1
  2. package/dist/account/devices-section.js +11 -5
  3. package/dist/account/messages.js +2 -333
  4. package/dist/account/passkeys-section.js +2 -2
  5. package/dist/account/password-change-dialog.js +3 -3
  6. package/dist/account/sign-in-policy-form.js +6 -3
  7. package/dist/account/sign-in-providers-section.js +1 -1
  8. package/dist/account/staff-sign-in-log.js +4 -4
  9. package/dist/action-card/messages.js +2 -5
  10. package/dist/activity-chart/activity-chart.js +4 -6
  11. package/dist/activity-chart/messages.js +2 -11
  12. package/dist/app/app.js +1 -2
  13. package/dist/app/batch-failure.js +5 -1
  14. package/dist/app/bottom-bar-from-meta.js +2 -3
  15. package/dist/app/change-confirm/messages.js +2 -13
  16. package/dist/app/change-confirm/use-change-confirm.js +1 -1
  17. package/dist/app/charts/chart-groups.js +3 -1
  18. package/dist/app/charts/group-bars.js +1 -1
  19. package/dist/app/charts/messages.js +2 -23
  20. package/dist/app/charts/period-chart.js +1 -1
  21. package/dist/app/comments/messages.js +2 -19
  22. package/dist/app/confirm-sign-in-messages.js +2 -19
  23. package/dist/app/confirm-sign-in.js +1 -1
  24. package/dist/app/create/create-page.js +3 -3
  25. package/dist/app/create/create-record-form.js +2 -2
  26. package/dist/app/create/create-route.js +1 -1
  27. package/dist/app/create/messages.js +2 -29
  28. package/dist/app/custom-section.js +1 -2
  29. package/dist/app/delete/blocked-delete.js +5 -2
  30. package/dist/app/delete/dialogs.js +21 -8
  31. package/dist/app/delete/messages.js +2 -63
  32. package/dist/app/delete/use-delete-flow.js +5 -4
  33. package/dist/app/displays/board-column.js +1 -1
  34. package/dist/app/displays/board-columns.js +1 -1
  35. package/dist/app/displays/board-display.js +21 -9
  36. package/dist/app/displays/calendar-display.js +15 -6
  37. package/dist/app/displays/cards-display.js +1 -1
  38. package/dist/app/displays/custom-display.js +1 -2
  39. package/dist/app/displays/list-cards.js +1 -1
  40. package/dist/app/displays/map-display.js +19 -6
  41. package/dist/app/displays/messages.js +2 -147
  42. package/dist/app/displays/period-controls.js +2 -2
  43. package/dist/app/displays/timeline-display.js +15 -6
  44. package/dist/app/displays/timeline-range.js +1 -1
  45. package/dist/app/displays/use-board-move.js +3 -3
  46. package/dist/app/displays/use-calendar-move.js +1 -1
  47. package/dist/app/document-title.js +1 -1
  48. package/dist/app/embedded-list/cut-off-note.js +7 -1
  49. package/dist/app/embedded-list/embedded-row-targets.js +3 -3
  50. package/dist/app/embedded-list/messages.js +2 -21
  51. package/dist/app/export/builder-port.js +1 -1
  52. package/dist/app/export/export-dialog.js +14 -8
  53. package/dist/app/export/messages.js +2 -75
  54. package/dist/app/export/use-export-flow.js +9 -3
  55. package/dist/app/field-editor.js +2 -2
  56. package/dist/app/field-errors.js +18 -7
  57. package/dist/app/field-messages.js +2 -45
  58. package/dist/app/field-types/members/messages.js +2 -15
  59. package/dist/app/field-types/messages.js +2 -5
  60. package/dist/app/field-types/widget-part.js +1 -1
  61. package/dist/app/file-field.js +3 -3
  62. package/dist/app/gallery/gallery-section.js +5 -2
  63. package/dist/app/gallery/messages.js +2 -27
  64. package/dist/app/gallery/photo-details.js +2 -2
  65. package/dist/app/hand-order/hand-sorted-list.js +1 -2
  66. package/dist/app/hand-order/messages.js +2 -29
  67. package/dist/app/hand-order/use-hand-order.js +1 -1
  68. package/dist/app/history/describe-change.js +1 -1
  69. package/dist/app/history/messages.js +2 -29
  70. package/dist/app/import/convert.js +19 -10
  71. package/dist/app/import/import-check-step.js +5 -5
  72. package/dist/app/import/import-dialog.js +5 -2
  73. package/dist/app/import/import-file-step.js +1 -1
  74. package/dist/app/import/import-mapping-step.js +3 -3
  75. package/dist/app/import/messages.js +2 -197
  76. package/dist/app/import/prepare-rows.js +11 -4
  77. package/dist/app/import/sheet-cell.js +1 -1
  78. package/dist/app/import/xlsx-reader.js +2 -2
  79. package/dist/app/import/zip-reader.js +4 -1
  80. package/dist/app/list-actions/use-list-actions.js +4 -1
  81. package/dist/app/list-edit/messages.js +2 -11
  82. package/dist/app/list-empty-state.js +7 -4
  83. package/dist/app/list-group-chart.js +1 -1
  84. package/dist/app/list-messages.js +2 -53
  85. package/dist/app/list-page.js +9 -9
  86. package/dist/app/live-update/messages.js +2 -11
  87. package/dist/app/map/messages.js +2 -11
  88. package/dist/app/menu-icons.js +10 -3
  89. package/dist/app/messages.js +2 -139
  90. package/dist/app/meta-gate-messages.js +2 -13
  91. package/dist/app/nav-from-meta.js +8 -9
  92. package/dist/app/new-version/messages.js +2 -21
  93. package/dist/app/new-version/new-version-banner.js +1 -2
  94. package/dist/app/pages/action-inputs/action-inputs-dialog.js +1 -1
  95. package/dist/app/pages/action-inputs/input-answers.js +1 -1
  96. package/dist/app/pages/blocks/modal-form.js +1 -1
  97. package/dist/app/pages/blocks/settings.js +1 -1
  98. package/dist/app/pages/blocks/tabs.js +1 -1
  99. package/dist/app/pages/composed-page.js +1 -2
  100. package/dist/app/pages/custom-boundary.js +1 -2
  101. package/dist/app/pages/messages.js +2 -79
  102. package/dist/app/pages/render-node.js +2 -3
  103. package/dist/app/pages/use-run-action.js +14 -6
  104. package/dist/app/rank-after/dependency-rule.js +8 -2
  105. package/dist/app/rank-after/messages.js +2 -5
  106. package/dist/app/rank-after/ranked-place.js +7 -1
  107. package/dist/app/record-chart/messages.js +2 -25
  108. package/dist/app/record-lines-cell.js +4 -1
  109. package/dist/app/record-lines.js +2 -2
  110. package/dist/app/record-messages.js +2 -83
  111. package/dist/app/record-page.js +3 -3
  112. package/dist/app/record-row/messages.js +2 -23
  113. package/dist/app/record-row/record-row-body.js +1 -1
  114. package/dist/app/record-row/record-row.js +2 -2
  115. package/dist/app/record-row/saved-record-row.js +2 -2
  116. package/dist/app/related-cards/messages.js +2 -15
  117. package/dist/app/related-dots/dots-summary.js +1 -1
  118. package/dist/app/related-dots/messages.js +2 -5
  119. package/dist/app/related-dots/related-dots.js +2 -3
  120. package/dist/app/relation-picker.js +1 -1
  121. package/dist/app/runtime/messages.js +2 -55
  122. package/dist/app/runtime/runtime-status.js +12 -3
  123. package/dist/app/saved/messages.js +2 -19
  124. package/dist/app/saved/saved-list.js +2 -2
  125. package/dist/app/search/messages.js +2 -19
  126. package/dist/app/search/navigation-hits.js +1 -1
  127. package/dist/app/search/search-model.js +9 -3
  128. package/dist/app/searches/messages.js +2 -93
  129. package/dist/app/searches/save-search-button.js +3 -3
  130. package/dist/app/searches/saved-search-rows.js +2 -2
  131. package/dist/app/searches/saved-search-section.js +3 -3
  132. package/dist/app/searches/saved-searches.js +13 -11
  133. package/dist/app/searches/search-controls.js +1 -1
  134. package/dist/app/searches/search-diff.js +8 -2
  135. package/dist/app/searches/update-search-dialog.js +9 -3
  136. package/dist/app/searches/use-save-search.js +1 -1
  137. package/dist/app/searches/use-search-row.js +2 -2
  138. package/dist/app/sensitive-field.js +3 -3
  139. package/dist/app/source-notice.js +3 -3
  140. package/dist/app/staff-banner.js +12 -8
  141. package/dist/app/use-live-save.js +2 -2
  142. package/dist/app/user-menu-from-meta.js +2 -3
  143. package/dist/app/value-badge.js +3 -4
  144. package/dist/app-shell/global-search.js +2 -2
  145. package/dist/app-shell/messages.js +2 -63
  146. package/dist/app-shell/sidebar-group.js +2 -2
  147. package/dist/app-shell/sidebar.js +1 -2
  148. package/dist/app-shell/top-bar.js +1 -1
  149. package/dist/assistant-dock/messages.js +2 -23
  150. package/dist/auth/auth-gate.js +1 -1
  151. package/dist/auth/auth-messages.js +9 -88
  152. package/dist/auth/email-code-form.js +2 -3
  153. package/dist/auth/forgot-password-form.js +2 -3
  154. package/dist/auth/messages.js +2 -203
  155. package/dist/auth/provider-sign-in-page.js +3 -3
  156. package/dist/auth/resend-code-button.js +1 -1
  157. package/dist/auth/reset-password-form.js +1 -1
  158. package/dist/auth/reset-password-page.js +1 -1
  159. package/dist/auth/sign-in-form.js +2 -2
  160. package/dist/auth/sign-up-code-form.js +2 -3
  161. package/dist/auth/sign-up-details-form.js +3 -4
  162. package/dist/auth/staff-sign-in-form.js +3 -3
  163. package/dist/calls/call-guests-panel.js +1 -1
  164. package/dist/calls/call-lobby-notice.js +1 -1
  165. package/dist/calls/call-mark.js +1 -1
  166. package/dist/calls/call-people.js +1 -1
  167. package/dist/calls/call-tile.js +2 -2
  168. package/dist/calls/messages.js +2 -139
  169. package/dist/carousel/carousel-controls.js +4 -1
  170. package/dist/carousel/messages.js +2 -13
  171. package/dist/chat/messages.js +2 -19
  172. package/dist/compact-table/compact-table.js +1 -1
  173. package/dist/compact-table/messages.js +2 -15
  174. package/dist/data-grid/cell-text.js +6 -5
  175. package/dist/data-grid/cells.js +7 -4
  176. package/dist/data-grid/grid-footer.js +1 -1
  177. package/dist/data-grid/grid-row.js +1 -1
  178. package/dist/data-grid/header-menu.js +1 -1
  179. package/dist/data-grid/messages.js +2 -49
  180. package/dist/data-grid/resize-handle.js +1 -1
  181. package/dist/data-grid/row-reorder.js +20 -5
  182. package/dist/filter-panel/active-filter-chips.js +1 -1
  183. package/dist/filter-panel/date-presets.js +2 -2
  184. package/dist/filter-panel/facet-combobox.js +1 -1
  185. package/dist/filter-panel/facet-group.js +1 -1
  186. package/dist/filter-panel/messages.js +2 -49
  187. package/dist/filter-panel/range-filter.js +1 -1
  188. package/dist/format/date.js +4 -4
  189. package/dist/format/messages.js +2 -21
  190. package/dist/format/money.js +1 -1
  191. package/dist/format/number.js +5 -2
  192. package/dist/forms/messages.js +2 -21
  193. package/dist/inline-child-table/inline-child-table.js +19 -4
  194. package/dist/inline-child-table/line-row.js +2 -2
  195. package/dist/inline-child-table/messages.js +2 -35
  196. package/dist/invitations/link-notice.js +2 -3
  197. package/dist/invitations/messages.js +2 -21
  198. package/dist/invitations/pending-invitation-row.js +1 -1
  199. package/dist/lists/messages.js +2 -5
  200. package/dist/live/columns-from-model.js +14 -31
  201. package/dist/live/display-value.js +1 -1
  202. package/dist/live/messages.js +2 -15
  203. package/dist/live/value-color.js +13 -3
  204. package/dist/live/view-fields.js +4 -2
  205. package/dist/locale/en.js +1399 -0
  206. package/dist/locale/messages.js +38 -7
  207. package/dist/locale/nl.js +1399 -0
  208. package/dist/markdown/messages.js +2 -13
  209. package/dist/mentions/messages.js +2 -13
  210. package/dist/notifications/bell/messages.js +2 -35
  211. package/dist/notifications/bell/unread-label.js +1 -1
  212. package/dist/organizations/invitation-page.js +31 -13
  213. package/dist/organizations/invitations-page.js +1 -1
  214. package/dist/organizations/members-page.js +2 -2
  215. package/dist/organizations/messages.js +2 -187
  216. package/dist/organizations/organization-page.js +4 -4
  217. package/dist/organizations/organizations-page.js +1 -1
  218. package/dist/package.js +1 -1
  219. package/dist/plugins/load-plugin.js +2 -2
  220. package/dist/plugins/messages.js +2 -33
  221. package/dist/plugins/plugin-notice.js +7 -5
  222. package/dist/primitives/badge.d.ts +2 -1
  223. package/dist/primitives/messages.js +2 -13
  224. package/dist/primitives/token.js +1 -1
  225. package/dist/record-view/field.js +2 -2
  226. package/dist/record-view/messages.js +2 -33
  227. package/dist/record-view/record-header.js +2 -2
  228. package/dist/roles/messages.js +2 -11
  229. package/dist/shell/assets/app-BOuBCV1m.js +8 -0
  230. package/dist/shell/assets/{calls-CPiQcC70.js → calls-C22bYKio.js} +2 -2
  231. package/dist/shell/assets/export-worker-ClXdfeuq.js +15 -0
  232. package/dist/shell/assets/{index-_ZpZ2ro0.js → index-G0fdUd70.js} +2 -2
  233. package/dist/shell/assets/{maplibre-CjNYwEqW.js → maplibre-CRmpQfDl.js} +3 -3
  234. package/dist/shell/assets/parse-worker-DxsmAjef.js +18 -0
  235. package/dist/shell/assets/preload-helper-BgLOXTzV.js +2 -0
  236. package/dist/shell/assets/{record-map-DjqQGqZ2.js → record-map-DsP4sXes.js} +2 -2
  237. package/dist/shell/assets/{records-map-DU29d6QK.js → records-map-BtWK38Kn.js} +2 -2
  238. package/dist/shell/assets/shared-protobase-ui-xqMMtr7u.js +2 -0
  239. package/dist/shell/assets/vendor-Kvdo8Jrw.js +73 -0
  240. package/dist/shell/index.html +5 -5
  241. package/dist/shell/protobase.shell.json +2 -2
  242. package/dist/shell/protobase.sw.js +2 -2
  243. package/dist/shell-source-maps/assets/app-BOuBCV1m.js.map +1 -0
  244. package/dist/shell-source-maps/assets/{calls-CPiQcC70.js.map → calls-C22bYKio.js.map} +1 -1
  245. package/dist/shell-source-maps/assets/export-worker-ClXdfeuq.js.map +1 -0
  246. package/dist/shell-source-maps/assets/{index-_ZpZ2ro0.js.map → index-G0fdUd70.js.map} +1 -1
  247. package/dist/shell-source-maps/assets/{maplibre-CjNYwEqW.js.map → maplibre-CRmpQfDl.js.map} +1 -1
  248. package/dist/shell-source-maps/assets/parse-worker-DxsmAjef.js.map +1 -0
  249. package/dist/shell-source-maps/assets/preload-helper-BgLOXTzV.js.map +1 -0
  250. package/dist/shell-source-maps/assets/{record-map-DjqQGqZ2.js.map → record-map-DsP4sXes.js.map} +1 -1
  251. package/dist/shell-source-maps/assets/{records-map-DU29d6QK.js.map → records-map-BtWK38Kn.js.map} +1 -1
  252. package/dist/shell-source-maps/assets/shared-protobase-ui-xqMMtr7u.js.map +1 -0
  253. package/dist/shell-source-maps/assets/vendor-Kvdo8Jrw.js.map +1 -0
  254. package/dist/side-panel/messages.js +2 -5
  255. package/dist/status/messages.js +2 -59
  256. package/dist/toasts/messages.js +2 -5
  257. package/dist/users/create-user-form.js +1 -1
  258. package/dist/users/messages.js +2 -49
  259. package/package.json +5 -4
  260. package/dist/app/icons.js +0 -27
  261. package/dist/app-shell/nav.js +0 -85
  262. package/dist/locale/slotted.js +0 -14
  263. package/dist/mocks/activity.js +0 -24
  264. package/dist/mocks/rng.js +0 -20
  265. package/dist/mocks/users.js +0 -63
  266. package/dist/shell/assets/app-BPv_SjnU.js +0 -9
  267. package/dist/shell/assets/export-worker-3e4Zsv0a.js +0 -3
  268. package/dist/shell/assets/parse-worker-UhbwEjS0.js +0 -6
  269. package/dist/shell/assets/preload-helper-SYSsmQ2O.js +0 -2
  270. package/dist/shell/assets/shared-protobase-ui-Cab5nqST.js +0 -2
  271. package/dist/shell/assets/vendor-iwLB0x-s.js +0 -63
  272. package/dist/shell-source-maps/assets/app-BPv_SjnU.js.map +0 -1
  273. package/dist/shell-source-maps/assets/export-worker-3e4Zsv0a.js.map +0 -1
  274. package/dist/shell-source-maps/assets/parse-worker-UhbwEjS0.js.map +0 -1
  275. package/dist/shell-source-maps/assets/preload-helper-SYSsmQ2O.js.map +0 -1
  276. package/dist/shell-source-maps/assets/shared-protobase-ui-Cab5nqST.js.map +0 -1
  277. package/dist/shell-source-maps/assets/vendor-iwLB0x-s.js.map +0 -1
@@ -55,11 +55,24 @@ const MapDisplay = ({ model, view, display, filter, orderBy, fields, at, onMove,
55
55
  const approximate = new Set(points.filter((point) => point.approximate).map((point) => point.key));
56
56
  const markerLabel = (keys) => {
57
57
  const near = keys.filter((key) => approximate.has(key)).length;
58
- if (keys.length === 1) return near === 1 ? text("showOneApproximate", singular) : text("showOne", singular);
59
- if (near === 0) return text("showMany", keys.length, plural);
60
- return near === keys.length ? text("showManyApproximate", keys.length, plural) : text("showManySomeApproximate", keys.length, plural, near);
58
+ if (keys.length === 1) return near === 1 ? text("showOneApproximate", { singular }) : text("showOne", { singular });
59
+ if (near === 0) return text("showMany", {
60
+ count: keys.length,
61
+ plural
62
+ });
63
+ return near === keys.length ? text("showManyApproximate", {
64
+ count: keys.length,
65
+ plural
66
+ }) : text("showManySomeApproximate", {
67
+ count: keys.length,
68
+ plural,
69
+ near
70
+ });
61
71
  };
62
- const bucketLabel = (count) => text("zoomIn", count.toLocaleString(formatTag()), count === 1 ? singular : plural);
72
+ const bucketLabel = (count) => text("zoomIn", {
73
+ count: count.toLocaleString(formatTag()),
74
+ noun: count === 1 ? singular : plural
75
+ });
63
76
  const overlay = useRef(null);
64
77
  const [covered, setCovered] = useState(0);
65
78
  useLayoutEffect(() => setCovered(overlay.current?.offsetHeight ?? 0), [row?.key]);
@@ -107,7 +120,7 @@ const MapDisplay = ({ model, view, display, filter, orderBy, fields, at, onMove,
107
120
  children: /* @__PURE__ */ jsxs("p", {
108
121
  className: "pointer-events-auto flex items-center gap-3 rounded-full border border-border bg-background px-4 py-1.5 text-muted-foreground shadow",
109
122
  role: "status",
110
- children: [fitting ? text("noneMatch", plural) : text("noneHere", plural), !fitting && /* @__PURE__ */ jsx(Button, {
123
+ children: [fitting ? text("noneMatch", { plural }) : text("noneHere", { plural }), !fitting && /* @__PURE__ */ jsx(Button, {
111
124
  size: "sm",
112
125
  onClick: () => setFitting(true),
113
126
  children: text("showAll")
@@ -120,7 +133,7 @@ const MapDisplay = ({ model, view, display, filter, orderBy, fields, at, onMove,
120
133
  children: /* @__PURE__ */ jsxs("div", {
121
134
  className: "pointer-events-auto flex w-full max-w-[16rem] flex-col gap-2 sm:max-w-xs",
122
135
  role: "group",
123
- "aria-label": text("chosen", singular),
136
+ "aria-label": text("chosen", { singular }),
124
137
  children: [/* @__PURE__ */ jsxs("div", {
125
138
  className: "flex items-center justify-end gap-1.5",
126
139
  children: [
@@ -1,150 +1,5 @@
1
- import { defineMessages } from "../../locale/messages.js";
1
+ import { messages } from "../../locale/messages.js";
2
2
  //#region src/app/displays/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- table: "Table",
6
- display: "Display",
7
- sort: "Sort",
8
- ascending: "ascending",
9
- descending: "descending",
10
- movedTo: (column) => `Moved to ${column}`,
11
- orderChanged: "Order changed",
12
- stayedIn: (column) => `Saved, still in ${column}`,
13
- undo: "Undo",
14
- couldNotUndo: "Could not undo",
15
- couldNotLoadRows: "Could not load rows",
16
- noPlural: (plural) => `No ${plural}`,
17
- noValue: (label) => `No ${label.toLowerCase()}`,
18
- somethingWrong: "Something went wrong",
19
- showMore: "Show more",
20
- noDrop: "No board drop is registered as {}. Give it in boardDrops in protobase.ui.tsx, or load the plugin that provides it.",
21
- noComponent: "No component is registered as {}. Export it from protobase.ui.tsx, or load the plugin that provides it.",
22
- pickedUp: (title) => `Picked up ${title}.`,
23
- isOver: (title, over) => `${title} is over ${over}.`,
24
- putBack: (title) => `${title} was put back.`,
25
- wasMovedTo: (title, to) => `${title} was moved to ${to}.`,
26
- cancelled: (title) => `Moving ${title} was cancelled.`,
27
- startsOn: (title, day) => `${title} starts on ${day}.`,
28
- noColumn: "no column",
29
- noDay: "no day",
30
- placeOf: (column, place, count) => `${column}, place ${place} of ${count}`,
31
- place: (column, place) => `${column}, place ${place}`,
32
- boardAcross: "To move a card to another column, press Space, move it with the left and right arrow keys, and press Space again to drop it there. Escape puts it back.",
33
- boardAnywhere: "To move a card, press Space, move it with the up and down arrow keys within its column and the left and right arrow keys to another column, and press Space again to drop it there. Escape puts it back.",
34
- boardWithin: "To move a card, press Space, move it with the up and down arrow keys within its column, and press Space again to drop it there. Escape puts it back.",
35
- calendarInstructions: "To move an event to another day, press Space, move it a day with the left and right arrow keys or a week with the up and down arrow keys, and press Space again to drop it there. Escape puts it back.",
36
- timelineInstructions: "To move a bar to other days, press Space, move it a day with the left and right arrow keys, and press Space again to drop it there. Escape puts it back.",
37
- week: "Week",
38
- month: "Month",
39
- quarter: "Quarter",
40
- calendarScale: "Calendar scale",
41
- timelineScale: "Timeline scale",
42
- previousPeriod: (unit) => `Previous ${unit}`,
43
- nextPeriod: (unit) => `Next ${unit}`,
44
- today: "Today",
45
- capped: (limit, unit) => `Showing the first ${limit} records of this ${unit}. Narrow the filter to see the rest.`,
46
- nothingIn: (unit) => `Nothing in this ${unit}.`,
47
- noneMatch: (plural) => `No ${plural} match.`,
48
- list: "List",
49
- showOneApproximate: (singular) => `Show the ${singular}, at an approximate position`,
50
- showOne: (singular) => `Show the ${singular}`,
51
- showMany: (count, plural) => `Show ${count} ${plural}`,
52
- showManyApproximate: (count, plural) => `Show ${count} ${plural}, at approximate positions`,
53
- showManySomeApproximate: (count, plural, near) => `Show ${count} ${plural}, ${near} at approximate positions`,
54
- zoomIn: (count, noun) => `Zoom in on ${count} ${noun}`,
55
- needsStyle: "The map display needs a map style: set PROTOBASE_MAP_STYLE_URL.",
56
- noneHere: (plural) => `No ${plural} in this part of the map.`,
57
- showAll: "Show all",
58
- chosen: (singular) => `Chosen ${singular}`,
59
- approximatePosition: "Approximate position",
60
- previous: "Previous",
61
- next: "Next",
62
- close: "Close",
63
- features: "Features",
64
- couldNotReorder: "Could not change the order",
65
- couldNotMoveTo: (to) => `Could not move it to ${to}`,
66
- moreHidden: (count) => `+${count} more`
67
- },
68
- nl: {
69
- table: "Tabel",
70
- display: "Weergave",
71
- sort: "Sorteren",
72
- ascending: "oplopend",
73
- descending: "aflopend",
74
- movedTo: (column) => `Verplaatst naar ${column}`,
75
- orderChanged: "Volgorde gewijzigd",
76
- stayedIn: (column) => `Opgeslagen, nog in ${column}`,
77
- undo: "Ongedaan maken",
78
- couldNotUndo: "Kon niet ongedaan maken",
79
- couldNotLoadRows: "Kon de rijen niet laden",
80
- noPlural: (plural) => `Geen ${plural}`,
81
- noValue: (label) => `Geen ${label.toLowerCase()}`,
82
- somethingWrong: "Er ging iets mis",
83
- showMore: "Meer tonen",
84
- noDrop: "Er is geen bordactie geregistreerd als {}. Geef die in boardDrops in protobase.ui.tsx, of laad de plug-in die haar levert.",
85
- noComponent: "Er is geen component geregistreerd als {}. Exporteer die uit protobase.ui.tsx, of laad de plug-in die haar levert.",
86
- pickedUp: (title) => `${title} opgepakt.`,
87
- isOver: (title, over) => `${title} is boven ${over}.`,
88
- putBack: (title) => `${title} is teruggezet.`,
89
- wasMovedTo: (title, to) => `${title} is verplaatst naar ${to}.`,
90
- cancelled: (title) => `Verplaatsen van ${title} is geannuleerd.`,
91
- startsOn: (title, day) => `${title} begint op ${day}.`,
92
- noColumn: "geen kolom",
93
- noDay: "geen dag",
94
- placeOf: (column, place, count) => `${column}, plaats ${place} van ${count}`,
95
- place: (column, place) => `${column}, plaats ${place}`,
96
- boardAcross: "Druk op Spatie om een kaart naar een andere kolom te verplaatsen, verplaats haar met de pijltjestoetsen links en rechts, en druk nogmaals op Spatie om haar daar neer te zetten. Escape zet haar terug.",
97
- boardAnywhere: "Druk op Spatie om een kaart te verplaatsen, verplaats haar met de pijltjestoetsen omhoog en omlaag binnen haar kolom en met links en rechts naar een andere kolom, en druk nogmaals op Spatie om haar daar neer te zetten. Escape zet haar terug.",
98
- boardWithin: "Druk op Spatie om een kaart te verplaatsen, verplaats haar met de pijltjestoetsen omhoog en omlaag binnen haar kolom, en druk nogmaals op Spatie om haar daar neer te zetten. Escape zet haar terug.",
99
- calendarInstructions: "Druk op Spatie om een gebeurtenis naar een andere dag te verplaatsen, verplaats haar een dag met de pijltjestoetsen links en rechts of een week met omhoog en omlaag, en druk nogmaals op Spatie om haar daar neer te zetten. Escape zet haar terug.",
100
- timelineInstructions: "Druk op Spatie om een balk naar andere dagen te verplaatsen, verplaats hem een dag met de pijltjestoetsen links en rechts, en druk nogmaals op Spatie om hem daar neer te zetten. Escape zet hem terug.",
101
- week: "Week",
102
- month: "Maand",
103
- quarter: "Kwartaal",
104
- calendarScale: "Schaal van de kalender",
105
- timelineScale: "Schaal van de tijdlijn",
106
- previousPeriod: (unit) => ({
107
- week: "Vorige week",
108
- month: "Vorige maand",
109
- quarter: "Vorig kwartaal"
110
- })[unit],
111
- nextPeriod: (unit) => ({
112
- week: "Volgende week",
113
- month: "Volgende maand",
114
- quarter: "Volgend kwartaal"
115
- })[unit],
116
- today: "Vandaag",
117
- capped: (limit, unit) => `De eerste ${limit} records van ${{
118
- week: "deze week",
119
- month: "deze maand",
120
- quarter: "dit kwartaal"
121
- }[unit]} worden getoond. Verfijn het filter om de rest te zien.`,
122
- nothingIn: (unit) => `Niets in ${{
123
- week: "deze week",
124
- month: "deze maand",
125
- quarter: "dit kwartaal"
126
- }[unit]}.`,
127
- noneMatch: (plural) => `Geen ${plural} gevonden.`,
128
- list: "Lijst",
129
- showOneApproximate: (singular) => `${singular} tonen, op een geschatte plek`,
130
- showOne: (singular) => `${singular} tonen`,
131
- showMany: (count, plural) => `${count} ${plural} tonen`,
132
- showManyApproximate: (count, plural) => `${count} ${plural} tonen, op geschatte plekken`,
133
- showManySomeApproximate: (count, plural, near) => `${count} ${plural} tonen, ${near} op geschatte plekken`,
134
- zoomIn: (count, noun) => `Inzoomen op ${count} ${noun}`,
135
- needsStyle: "De kaartweergave heeft een kaartstijl nodig: stel PROTOBASE_MAP_STYLE_URL in.",
136
- noneHere: (plural) => `Geen ${plural} in dit deel van de kaart.`,
137
- showAll: "Alles tonen",
138
- chosen: (singular) => `Gekozen ${singular}`,
139
- approximatePosition: "Geschatte plek",
140
- previous: "Vorige",
141
- next: "Volgende",
142
- close: "Sluiten",
143
- features: "Kenmerken",
144
- couldNotReorder: "Kon de volgorde niet wijzigen",
145
- couldNotMoveTo: (to) => `Kon het niet naar ${to} verplaatsen`,
146
- moreHidden: (count) => `+${count} meer`
147
- }
148
- });
3
+ const text = messages("app/displays");
149
4
  //#endregion
150
5
  export { text };
@@ -39,9 +39,9 @@ const PeriodControls = ({ heading, unit, previous, today, next, scales, scalesLa
39
39
  children: [/* @__PURE__ */ jsxs("div", {
40
40
  className: "flex items-center gap-1",
41
41
  children: [
42
- control(previous, square, text("previousPeriod", unit), /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5" })),
42
+ control(previous, square, text("previousPeriod", { unit }), /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5" })),
43
43
  control(today, square, text("today"), text("today")),
44
- control(next, square, text("nextPeriod", unit), /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5" }))
44
+ control(next, square, text("nextPeriod", { unit }), /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5" }))
45
45
  ]
46
46
  }), /* @__PURE__ */ jsx("span", {
47
47
  role: "group",
@@ -91,11 +91,17 @@ const TimelineDisplay = ({ model, view, display, fields, filter, at, linkTo, now
91
91
  const title = (picked) => eventTitle(model, view, display, picked.row);
92
92
  const startText = (picked) => formatDate(Date.parse(`${addDays(picked.day, shift.current)}T00:00:00Z`));
93
93
  const announcements = {
94
- onDragStart: ({ active: picked }) => text("pickedUp", title(picked.data.current)),
95
- onDragMove: ({ active: picked }) => text("startsOn", title(picked.data.current), startText(picked.data.current)),
94
+ onDragStart: ({ active: picked }) => text("pickedUp", { title: title(picked.data.current) }),
95
+ onDragMove: ({ active: picked }) => text("startsOn", {
96
+ title: title(picked.data.current),
97
+ day: startText(picked.data.current)
98
+ }),
96
99
  onDragOver: () => void 0,
97
- onDragEnd: ({ active: picked }) => shift.current === 0 ? text("putBack", title(picked.data.current)) : text("wasMovedTo", title(picked.data.current), startText(picked.data.current)),
98
- onDragCancel: ({ active: picked }) => text("cancelled", title(picked.data.current))
100
+ onDragEnd: ({ active: picked }) => shift.current === 0 ? text("putBack", { title: title(picked.data.current) }) : text("wasMovedTo", {
101
+ title: title(picked.data.current),
102
+ to: startText(picked.data.current)
103
+ }),
104
+ onDragCancel: ({ active: picked }) => text("cancelled", { title: title(picked.data.current) })
99
105
  };
100
106
  const release = () => {
101
107
  setActive(void 0);
@@ -143,7 +149,10 @@ const TimelineDisplay = ({ model, view, display, fields, filter, at, linkTo, now
143
149
  }),
144
150
  list.capped && /* @__PURE__ */ jsx("p", {
145
151
  className: "text-xs text-muted-foreground",
146
- children: text("capped", 500, shown.scale)
152
+ children: text("capped", {
153
+ limit: 500,
154
+ unit: shown.scale
155
+ })
147
156
  }),
148
157
  /* @__PURE__ */ jsxs(DndContext, {
149
158
  sensors,
@@ -178,7 +187,7 @@ const TimelineDisplay = ({ model, view, display, fields, filter, at, linkTo, now
178
187
  }),
179
188
  empty && /* @__PURE__ */ jsx("p", {
180
189
  className: "relative px-2 py-3 text-xs text-muted-foreground",
181
- children: text("nothingIn", shown.scale)
190
+ children: text("nothingIn", { unit: shown.scale })
182
191
  }),
183
192
  !list.loading && lanes.map((lane) => /* @__PURE__ */ jsxs("section", {
184
193
  "aria-label": lane.label,
@@ -115,7 +115,7 @@ const timelineLanes = (rows, model, view, display) => {
115
115
  const value = row.record[group];
116
116
  const empty = value === null || value === void 0 || value === "";
117
117
  const key = empty ? noValue : `value:${String(value)}`;
118
- const label = empty ? text("noValue", hints?.label ?? humanize(group)) : row.labels[group] ?? displayValue(field, value, hints);
118
+ const label = empty ? text("noValue", { label: hints?.label ?? humanize(group) }) : row.labels[group] ?? displayValue(field, value, hints);
119
119
  const known = lanes.get(key) ?? {
120
120
  value: empty ? void 0 : value,
121
121
  lane: {
@@ -93,7 +93,7 @@ const useBoardMove = ({ model, view, by, rank, drop, labelOf, titleOf }) => {
93
93
  const stays = !ranked.place || ranked.place.bump === void 0 && ranked.place.index === place.rows.findIndex((entry) => entry.key === row.key);
94
94
  if (ranked.reason !== void 0) toast.show({
95
95
  state: "warning",
96
- title: stays ? text$1("notMoved") : text$1("movedToPlace", ranked.place.index + 1),
96
+ title: stays ? text$1("notMoved") : text$1("movedToPlace", { place: ranked.place.index + 1 }),
97
97
  description: ranked.reason
98
98
  });
99
99
  if (stays) return void 0;
@@ -127,7 +127,7 @@ const useBoardMove = ({ model, view, by, rank, drop, labelOf, titleOf }) => {
127
127
  if (undoToast.current !== void 0) toast.dismiss(undoToast.current);
128
128
  undoToast.current = void 0;
129
129
  const from = row.record[by] ?? null;
130
- const title = landed !== from ? text("movedTo", labelOf(landed)) : from === to.value ? text("orderChanged") : text("stayedIn", labelOf(landed));
130
+ const title = landed !== from ? text("movedTo", { column: labelOf(landed) }) : from === to.value ? text("orderChanged") : text("stayedIn", { column: labelOf(landed) });
131
131
  if (!undoing) {
132
132
  toast.show({
133
133
  state: "success",
@@ -151,7 +151,7 @@ const useBoardMove = ({ model, view, by, rank, drop, labelOf, titleOf }) => {
151
151
  },
152
152
  onError: (error, { row, to }) => {
153
153
  settle(row.key);
154
- const title = (row.record[by] ?? null) === to.value ? text("couldNotReorder") : text("couldNotMoveTo", to.label);
154
+ const title = (row.record[by] ?? null) === to.value ? text("couldNotReorder") : text("couldNotMoveTo", { to: to.label });
155
155
  toast.show({
156
156
  state: "error",
157
157
  title,
@@ -45,7 +45,7 @@ const useCalendarMove = (model, display) => {
45
45
  settle(row.key);
46
46
  toast.show({
47
47
  state: "error",
48
- title: text("couldNotMoveTo", formatDate(Date.parse(`${to}T00:00:00Z`))),
48
+ title: text("couldNotMoveTo", { to: formatDate(Date.parse(`${to}T00:00:00Z`)) }),
49
49
  description: refusalReason(error)
50
50
  });
51
51
  },
@@ -8,7 +8,7 @@ const titleParts = ({ address, page, accountPage, resourceLabel, singular, recor
8
8
  if (!address || address.kind === "page") return [];
9
9
  const list = resourceLabel ? [resourceLabel] : [];
10
10
  if (address.kind === "list") return list;
11
- if (address.kind === "create") return [...singular ? [text("title", singular)] : [], ...list];
11
+ if (address.kind === "create") return [...singular ? [text("title", { noun: singular })] : [], ...list];
12
12
  const record = recordTitle ?? (recordLoading ? void 0 : address.key);
13
13
  return [...record ? [record] : [], ...list];
14
14
  };
@@ -7,7 +7,13 @@ import { text } from "./messages.js";
7
7
  */
8
8
  const cutOffNote = (shown, total, estimated) => {
9
9
  if (shown >= total) return void 0;
10
- return estimated ? text("firstOfAbout", shown, total.toLocaleString(formatTag())) : text("firstOf", shown, total.toLocaleString(formatTag()));
10
+ return estimated ? text("firstOfAbout", {
11
+ shown,
12
+ total: total.toLocaleString(formatTag())
13
+ }) : text("firstOf", {
14
+ shown,
15
+ total: total.toLocaleString(formatTag())
16
+ });
11
17
  };
12
18
  //#endregion
13
19
  export { cutOffNote };
@@ -30,19 +30,19 @@ const embeddedRowTargets = ({ model, view, opens, resources, views, canUpdate })
30
30
  const singular = singularOf(model, view);
31
31
  const actions = (linkTo) => {
32
32
  const openOwn = {
33
- label: text("open", singular),
33
+ label: text("open", { singular }),
34
34
  link: (row) => linkTo(own(row))
35
35
  };
36
36
  if (!far) return [openOwn];
37
37
  const editable = (row) => canUpdate && rowAllows(row, "update");
38
38
  return [
39
39
  {
40
- label: text("open", singularOf(far, views[far.name])),
40
+ label: text("open", { singular: singularOf(far, views[far.name]) }),
41
41
  available: (row) => other(row) !== void 0,
42
42
  link: (row) => linkTo(other(row))
43
43
  },
44
44
  {
45
- label: text("edit", singular),
45
+ label: text("edit", { singular }),
46
46
  available: editable,
47
47
  link: (row) => linkTo({
48
48
  kind: "record",
@@ -1,24 +1,5 @@
1
- import { defineMessages } from "../../locale/messages.js";
1
+ import { messages } from "../../locale/messages.js";
2
2
  //#region src/app/embedded-list/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- firstOf: (shown, total) => `The first ${shown} of ${total}.`,
6
- firstOfAbout: (shown, total) => `The first ${shown} of about ${total}.`,
7
- open: (singular) => `Open ${singular}`,
8
- edit: (singular) => `Edit ${singular}`,
9
- viewAll: "View all",
10
- couldNotLoad: "Could not load",
11
- nothingYet: "Nothing here yet."
12
- },
13
- nl: {
14
- firstOf: (shown, total) => `De eerste ${shown} van ${total}.`,
15
- firstOfAbout: (shown, total) => `De eerste ${shown} van ongeveer ${total}.`,
16
- open: (singular) => `${singular} openen`,
17
- edit: (singular) => `${singular} bewerken`,
18
- viewAll: "Alles bekijken",
19
- couldNotLoad: "Kon niet laden",
20
- nothingYet: "Hier staat nog niets."
21
- }
22
- });
3
+ const text = messages("app/embedded-list");
23
4
  //#endregion
24
5
  export { text };
@@ -37,7 +37,7 @@ const createWorkerPort = () => {
37
37
  worker.onmessage = (event) => waiting.shift()?.resolve(event.data.bytes);
38
38
  worker.onerror = (event) => {
39
39
  event.preventDefault();
40
- const error = new Error(text("couldNotBuild", event.message));
40
+ const error = new Error(text("couldNotBuild", { message: event.message }));
41
41
  for (const entry of waiting.splice(0)) entry.reject(error);
42
42
  };
43
43
  return {
@@ -89,7 +89,7 @@ const ColumnPicker = ({ fields, columns, onChange }) => {
89
89
  size: "sm",
90
90
  variant: "ghost",
91
91
  className: "min-h-8 px-2",
92
- "aria-label": text("moveUp", labels[name]),
92
+ "aria-label": text("moveUp", { label: labels[name] }),
93
93
  disabled: index === 0,
94
94
  onClick: () => onChange(move(columns, name, -1)),
95
95
  children: /* @__PURE__ */ jsx(ArrowUp, { className: "size-3.5" })
@@ -97,7 +97,7 @@ const ColumnPicker = ({ fields, columns, onChange }) => {
97
97
  size: "sm",
98
98
  variant: "ghost",
99
99
  className: "min-h-8 px-2",
100
- "aria-label": text("moveDown", labels[name]),
100
+ "aria-label": text("moveDown", { label: labels[name] }),
101
101
  disabled: index === columns.length - 1,
102
102
  onClick: () => onChange(move(columns, name, 1)),
103
103
  children: /* @__PURE__ */ jsx(ArrowDown, { className: "size-3.5" })
@@ -117,17 +117,20 @@ const ExportDialog = ({ plural, view, fields, initialColumns, count, selected, o
117
117
  const [columns, setColumns] = useState(initialColumns);
118
118
  const [mode, setMode] = useState("shown");
119
119
  const limit = exportLimit(view, format);
120
- const rows = scope === "selected" ? text("selectedRows", formatInt(selected ?? 0), selected ?? 0) : countText(count);
120
+ const rows = scope === "selected" ? text("selectedRows", {
121
+ count: formatInt(selected ?? 0),
122
+ rows: selected ?? 0
123
+ }) : countText(count);
121
124
  const overLimit = (scope === "selected" ? selected ?? 0 : countedRows(count) ?? 0) > limit;
122
125
  const scopeOptions = [{
123
126
  value: "list",
124
127
  label: text("rowsInList")
125
128
  }, {
126
129
  value: "selected",
127
- label: text("selected", formatInt(selected ?? 0))
130
+ label: text("selected", { count: formatInt(selected ?? 0) })
128
131
  }];
129
132
  return /* @__PURE__ */ jsx(ResponsiveDialog, {
130
- title: text("exportPlural", plural),
133
+ title: text("exportPlural", { plural }),
131
134
  open,
132
135
  onClose,
133
136
  actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
@@ -190,7 +193,7 @@ const ExportDialog = ({ plural, view, fields, initialColumns, count, selected, o
190
193
  /* @__PURE__ */ jsxs("p", {
191
194
  role: "status",
192
195
  className: "text-muted-foreground",
193
- children: [text("exports", rows), overLimit && text("overLimit", formatInt(limit))]
196
+ children: [text("exports", { rows }), overLimit && text("overLimit", { limit: formatInt(limit) })]
194
197
  })
195
198
  ]
196
199
  })
@@ -200,7 +203,7 @@ const ExportDialog = ({ plural, view, fields, initialColumns, count, selected, o
200
203
  const ExportProgressDialog = ({ plural, done, total, onCancel }) => {
201
204
  const share = total ? Math.min(1, done / total) : void 0;
202
205
  return /* @__PURE__ */ jsx(ResponsiveDialog, {
203
- title: text("exporting", plural),
206
+ title: text("exporting", { plural }),
204
207
  open: true,
205
208
  onClose: onCancel,
206
209
  actions: /* @__PURE__ */ jsx(Button, {
@@ -222,7 +225,10 @@ const ExportProgressDialog = ({ plural, done, total, onCancel }) => {
222
225
  })
223
226
  }), /* @__PURE__ */ jsx("p", {
224
227
  className: "text-muted-foreground",
225
- children: total ? text("doneOf", formatInt(done), formatInt(total)) : text("done", formatInt(done))
228
+ children: total ? text("doneOf", {
229
+ done: formatInt(done),
230
+ total: formatInt(total)
231
+ }) : text("done", { done: formatInt(done) })
226
232
  })]
227
233
  })
228
234
  });
@@ -1,78 +1,5 @@
1
- import { defineMessages } from "../../locale/messages.js";
1
+ import { messages } from "../../locale/messages.js";
2
2
  //#region src/app/export/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- excel: "Excel (.xlsx)",
6
- csv: "CSV",
7
- asShown: "As shown",
8
- rawValues: "Raw values",
9
- shownHint: "Labels, dates and numbers as the list shows them.",
10
- rawHint: "Values as they are stored, such as keys and codes.",
11
- counting: "Counting rows…",
12
- moreThan: "more than 10,000 rows",
13
- columns: "Columns",
14
- moveUp: (label) => `Move ${label} up`,
15
- moveDown: (label) => `Move ${label} down`,
16
- selectedRows: (count, rows) => `${count} selected ${rows === 1 ? "row" : "rows"}`,
17
- rowsInList: "Rows in the list",
18
- selected: (count) => `Selected (${count})`,
19
- exportPlural: (plural) => `Export ${plural.toLowerCase()}`,
20
- cancel: "Cancel",
21
- export: "Export",
22
- format: "Format",
23
- rows: "Rows",
24
- listHint: "With the list’s filters, search and sort.",
25
- values: "Values",
26
- exports: (rows) => `Exports ${rows}.`,
27
- overLimit: (limit) => ` A file holds at most ${limit} rows; the rest are left out.`,
28
- exporting: (plural) => `Exporting ${plural.toLowerCase()}`,
29
- rowsExported: "Rows exported",
30
- doneOf: (done, total) => `${done} of ${total} rows`,
31
- done: (done) => `${done} rows`,
32
- exported: (count, plural) => `Exported ${count} ${plural.toLowerCase()}`,
33
- truncated: (name, count) => `${name}: the first ${count} rows, as many as a file holds.`,
34
- couldNotExport: (plural) => `Could not export ${plural.toLowerCase()}`,
35
- cancelled: "The export was cancelled",
36
- couldNotBuild: (message) => `The export could not be built: ${message}`,
37
- workbook: "Excel workbook",
38
- csvFile: "CSV file"
39
- },
40
- nl: {
41
- excel: "Excel (.xlsx)",
42
- csv: "CSV",
43
- asShown: "Zoals getoond",
44
- rawValues: "Ruwe waarden",
45
- shownHint: "Labels, datums en getallen zoals de lijst ze toont.",
46
- rawHint: "Waarden zoals ze zijn opgeslagen, zoals sleutels en codes.",
47
- counting: "Rijen tellen…",
48
- moreThan: "meer dan 10.000 rijen",
49
- columns: "Kolommen",
50
- moveUp: (label) => `${label} omhoog`,
51
- moveDown: (label) => `${label} omlaag`,
52
- selectedRows: (count, rows) => `${count} geselecteerde ${rows === 1 ? "rij" : "rijen"}`,
53
- rowsInList: "Rijen in de lijst",
54
- selected: (count) => `Geselecteerd (${count})`,
55
- exportPlural: (plural) => `${plural} exporteren`,
56
- cancel: "Annuleren",
57
- export: "Exporteren",
58
- format: "Formaat",
59
- rows: "Rijen",
60
- listHint: "Met de filters, zoekopdracht en sortering van de lijst.",
61
- values: "Waarden",
62
- exports: (rows) => `Exporteert ${rows}.`,
63
- overLimit: (limit) => ` Een bestand bevat hoogstens ${limit} rijen; de rest blijft weg.`,
64
- exporting: (plural) => `${plural} exporteren`,
65
- rowsExported: "Geëxporteerde rijen",
66
- doneOf: (done, total) => `${done} van ${total} rijen`,
67
- done: (done) => `${done} rijen`,
68
- exported: (count, plural) => `${count} ${plural.toLowerCase()} geëxporteerd`,
69
- truncated: (name, count) => `${name}: de eerste ${count} rijen, zoveel als een bestand bevat.`,
70
- couldNotExport: (plural) => `Kon ${plural.toLowerCase()} niet exporteren`,
71
- cancelled: "De export is geannuleerd",
72
- couldNotBuild: (message) => `De export kon niet worden gemaakt: ${message}`,
73
- workbook: "Excel-werkmap",
74
- csvFile: "CSV-bestand"
75
- }
76
- });
3
+ const text = messages("app/export");
77
4
  //#endregion
78
5
  export { text };
@@ -91,15 +91,21 @@ const useExportFlow = ({ model, view, resources, views, plural, filter, orderBy,
91
91
  });
92
92
  toast.show({
93
93
  state: "success",
94
- title: text("exported", formatInt(result.rows), plural),
95
- description: result.truncated ? text("truncated", name, formatInt(result.rows)) : name
94
+ title: text("exported", {
95
+ count: formatInt(result.rows),
96
+ plural
97
+ }),
98
+ description: result.truncated ? text("truncated", {
99
+ name,
100
+ count: formatInt(result.rows)
101
+ }) : name
96
102
  });
97
103
  } catch (error) {
98
104
  if (error instanceof DOMException && error.name === "AbortError") return;
99
105
  if (!isApiError(error)) throw error;
100
106
  toast.show({
101
107
  state: "error",
102
- title: text("couldNotExport", plural),
108
+ title: text("couldNotExport", { plural }),
103
109
  description: error.message
104
110
  });
105
111
  } finally {
@@ -7,9 +7,9 @@ import { displayValue, valueTitle } from "../live/display-value.js";
7
7
  import { text } from "./messages.js";
8
8
  import { AppLink } from "./use-app-address.js";
9
9
  import { useFieldControl } from "../primitives/field-control.js";
10
- import { Input } from "../primitives/input.js";
11
10
  import { fromDraft, isEditable, toFieldDraft } from "../live/field-values.js";
12
11
  import { Switch } from "../primitives/switch.js";
12
+ import { Input } from "../primitives/input.js";
13
13
  import { Textarea } from "../primitives/textarea.js";
14
14
  import { RelationPicker } from "./relation-picker.js";
15
15
  import { SensitiveField } from "./sensitive-field.js";
@@ -66,7 +66,7 @@ const BuiltInEditor = ({ field, hints, value, stored, relationLabel, relationTo,
66
66
  children: picker
67
67
  }), /* @__PURE__ */ jsx(AppLink, {
68
68
  to: relationTo,
69
- "aria-label": text("openLabel", relationLabel ?? String(value)),
69
+ "aria-label": text("openLabel", { label: relationLabel ?? String(value) }),
70
70
  title: text("open"),
71
71
  className: cn(buttonClass({ variant: "ghost" }), "w-8 px-0"),
72
72
  children: /* @__PURE__ */ jsx(ArrowUpRight, { className: "size-4" })
@@ -6,14 +6,22 @@ const numberIn = (params, key) => typeof params?.[key] === "number" ? params[key
6
6
  const textMessage = (label, params) => {
7
7
  const min = numberIn(params, "min");
8
8
  const max = numberIn(params, "max");
9
- if (min !== void 0) return text("atLeastCharacters", label, formatInt(min), min);
10
- if (max !== void 0) return text("atMostCharacters", label, formatInt(max), max);
9
+ if (min !== void 0) return text("atLeastCharacters", {
10
+ label,
11
+ count: formatInt(min),
12
+ n: min
13
+ });
14
+ if (max !== void 0) return text("atMostCharacters", {
15
+ label,
16
+ count: formatInt(max),
17
+ n: max
18
+ });
11
19
  };
12
20
  const wholeNumber = (params) => {
13
21
  const min = numberIn(params, "min");
14
22
  const max = numberIn(params, "max");
15
- if (min !== void 0) return text("wholeNumberAtLeast", formatInt(min));
16
- if (max !== void 0) return text("wholeNumberAtMost", formatInt(max));
23
+ if (min !== void 0) return text("wholeNumberAtLeast", { min: formatInt(min) });
24
+ if (max !== void 0) return text("wholeNumberAtMost", { max: formatInt(max) });
17
25
  return text("wholeNumber");
18
26
  };
19
27
  const decimalMessage = (params) => {
@@ -21,7 +29,10 @@ const decimalMessage = (params) => {
21
29
  const scale = numberIn(params, "scale");
22
30
  if (precision === void 0 || scale === void 0) return text("number");
23
31
  const below = formatInt(10 ** (precision - scale));
24
- return scale === 0 ? text("wholeNumberBelow", below) : text("decimalsBelow", scale, below);
32
+ return scale === 0 ? text("wholeNumberBelow", { below }) : text("decimalsBelow", {
33
+ scale,
34
+ below
35
+ });
25
36
  };
26
37
  /** What to say about a value of each field type the server turned down; without an entry, the server's message shows. */
27
38
  const invalidValue = {
@@ -44,7 +55,7 @@ const invalidValue = {
44
55
  * server words them.
45
56
  */
46
57
  const fieldMessage = (field, label, error) => {
47
- if (error.code === "required") return text("required", label);
58
+ if (error.code === "required") return text("required", { label });
48
59
  if (error.code !== "invalid-value" || !field) return error.message;
49
60
  return invalidValue[field.type]?.(label, error.params) ?? error.message;
50
61
  };
@@ -64,7 +75,7 @@ const saveFailureDescription = (error) => {
64
75
  const fields = new Set(error.errors.flatMap((entry) => entry.field && entry.field !== "_record" ? [entry.field] : []));
65
76
  const record = error.errors.flatMap((entry) => entry.field === "_record" ? [entry.message] : []);
66
77
  if (fields.size === 0 && record.length === 0) return error.message;
67
- return [...fields.size === 0 ? [] : [fields.size === 1 ? text("checkField") : text("checkFields", fields.size)], ...record].join(" ");
78
+ return [...fields.size === 0 ? [] : [fields.size === 1 ? text("checkField") : text("checkFields", { count: fields.size })], ...record].join(" ");
68
79
  };
69
80
  //#endregion
70
81
  export { fieldErrors, fieldMessage, saveFailureDescription };