diff --git a/.changeset/25495-org-default-currency.md b/.changeset/25495-org-default-currency.md index 27e24af2ecb..5646a54cd6d 100644 --- a/.changeset/25495-org-default-currency.md +++ b/.changeset/25495-org-default-currency.md @@ -2,11 +2,11 @@ '@objectstack/plugin-auth': patch --- +A new organization now gets its default currency from its creator's language or region. When an organization is created through `POST /api/v1/auth/organization/create`, the server reads the creator's stored language (`sys_user.locale`), or else the creating request's `Accept-Language`. It writes that region's ISO 4217 currency as the organization's `localization.currency`: `zh-CN` gives `CNY`, `ja` gives `JPY`, `en-GB` gives `GBP`. The value is an ordinary tenant setting, so Setup → Localization shows it and can change it. Amounts in `currencyMode: 'dynamic'` fields then show that currency instead of a plain number. + Clause-②: no Metadata-protocol: none -A new organization now gets its default currency from its creator's language or region. When an organization is created through `POST /api/v1/auth/organization/create`, the server reads the creator's stored language (`sys_user.locale`), or else the creating request's `Accept-Language`. It writes that region's ISO 4217 currency as the organization's `localization.currency`: `zh-CN` gives `CNY`, `ja` gives `JPY`, `en-GB` gives `GBP`. The value is an ordinary tenant setting, so Setup → Localization shows it and can change it. Amounts in `currencyMode: 'dynamic'` fields then show that currency instead of a plain number. - When there is nothing to derive from (no stored language, no `Accept-Language`, or a tag with no country such as `es-419`), nothing is written and the setting stays unset, as before. There is no fallback to the `default_country` or `locale` platform defaults. A value already set on any rung (the organization's own, a global row, or an `OS_LOCALIZATION_CURRENCY` override) is never overwritten. A host's own `onOrganizationCreated` callback still runs, before this step. The `os dev` seed does the same for its admin's workspace from the host's POSIX locale (`LC_ALL`, then `LC_MONETARY`, then `LANG`), beside its time-zone seeding. `C`, `POSIX`, and a host with no locale set write nothing. diff --git a/.changeset/25576-admin-rescue-comment-i18n.md b/.changeset/25576-admin-rescue-comment-i18n.md index 5501a169484..63d09a726bc 100644 --- a/.changeset/25576-admin-rescue-comment-i18n.md +++ b/.changeset/25576-admin-rescue-comment-i18n.md @@ -2,9 +2,9 @@ "@objectstack/plugin-approvals": patch --- +The note an `admin_rescue` approval request writes on its own timeline ("Routed to this organization's administrators because the approver slate named no one: …") is now read in the reader's language. The request's node-config snapshot stores the note as a code and its parameters (`__adminRescueNote`: the timeline row it explains, the abandoned approver slots, and why a declared `fallback` did not help), and `listActions` (`GET /api/v1/approvals/requests/:id/actions`) renders that row's `comment` through the plugin's `messages` catalog at the caller's locale, the way the approvals door already localizes a request's flow, step and object labels. The sentence and its clauses ship in `en`, `zh-CN`, `ja-JP` and `es-ES`. + Clause-②: no Metadata-protocol: none -The note an `admin_rescue` approval request writes on its own timeline ("Routed to this organization's administrators because the approver slate named no one: …") is now read in the reader's language. The request's node-config snapshot stores the note as a code and its parameters (`__adminRescueNote`: the timeline row it explains, the abandoned approver slots, and why a declared `fallback` did not help), and `listActions` (`GET /api/v1/approvals/requests/:id/actions`) renders that row's `comment` through the plugin's `messages` catalog at the caller's locale, the way the approvals door already localizes a request's flow, step and object labels. The sentence and its clauses ship in `en`, `zh-CN`, `ja-JP` and `es-ES`. - The stored `comment` is unchanged: it is still the English sentence, which a reader with no locale, an `en` reader, the generic data door and the action-history list views are served as before. Requests opened before this release carry no snapshot entry, so their note keeps showing its stored English; no migration is needed. diff --git a/.changeset/25611-inline-transform-null-sentinel.md b/.changeset/25611-inline-transform-null-sentinel.md index 3b3d6e79f3b..0f837999692 100644 --- a/.changeset/25611-inline-transform-null-sentinel.md +++ b/.changeset/25611-inline-transform-null-sentinel.md @@ -2,7 +2,7 @@ '@objectstack/rest': patch --- +`POST /api/v1/data/:object/import`: a cell the request declares null through `nullValues` now stays blank whatever case `transform` its inline mapping entry declares. The blank test reads the raw cell and a blank cell is not transformed, so an `uppercase` or `lowercase` entry no longer rewrites a sentinel such as `n/a` into a stored value (`N/A`): the cell is stored unset, takes the entry's `defaultValue`, or is refused by `required` as blank. A non-blank cell is transformed as before. + Clause-②: no Metadata-protocol: none - -`POST /api/v1/data/:object/import`: a cell the request declares null through `nullValues` now stays blank whatever case `transform` its inline mapping entry declares. The blank test reads the raw cell and a blank cell is not transformed, so an `uppercase` or `lowercase` entry no longer rewrites a sentinel such as `n/a` into a stored value (`N/A`): the cell is stored unset, takes the entry's `defaultValue`, or is refused by `required` as blank. A non-blank cell is transformed as before. diff --git a/.changeset/25639-lockstep-exact-internal-deps.md b/.changeset/25639-lockstep-exact-internal-deps.md index 44a5496495f..c9c35aa59d5 100644 --- a/.changeset/25639-lockstep-exact-internal-deps.md +++ b/.changeset/25639-lockstep-exact-internal-deps.md @@ -4,11 +4,11 @@ '@objectstack/plugin-dev': patch --- +`@objectstack/cli`, `@objectstack/hono` and `@objectstack/plugin-dev` now depend on the other `@objectstack/*` packages at exactly their own release version, not at a caret range. Twenty-one dependencies were published as `^`: eight of the CLI's (`core`, `driver-memory`, `driver-mongodb`, `driver-sql`, `driver-sqlite-wasm`, `objectql`, `observability`, `runtime`), the Hono adapter's `runtime`, and twelve of `plugin-dev`'s (`account`, `driver-memory`, `objectql`, `plugin-auth`, `plugin-hono-server`, `plugin-security`, `rest`, `runtime`, `service-i18n`, `service-realtime`, `service-storage`, `setup`). + Clause-②: no Metadata-protocol: none -`@objectstack/cli`, `@objectstack/hono` and `@objectstack/plugin-dev` now depend on the other `@objectstack/*` packages at exactly their own release version, not at a caret range. Twenty-one dependencies were published as `^`: eight of the CLI's (`core`, `driver-memory`, `driver-mongodb`, `driver-sql`, `driver-sqlite-wasm`, `objectql`, `observability`, `runtime`), the Hono adapter's `runtime`, and twelve of `plugin-dev`'s (`account`, `driver-memory`, `objectql`, `plugin-auth`, `plugin-hono-server`, `plugin-security`, `rest`, `runtime`, `service-i18n`, `service-realtime`, `service-storage`, `setup`). - Every `@objectstack/*` package is released together on one version, so the range bought nothing. What it did was let an app that pins exact `@objectstack/*` versions still install a newer release of these packages, and of everything they depend on, through the CLI, which mixes two releases in one tree. They are now published exact, like the other `@objectstack/*` dependencies of these three packages. If you pinned exact versions and added `overrides` to hold these packages at your version, you can remove those overrides once you are on this release. Peer dependencies keep their caret ranges. diff --git a/.changeset/default-org-owner-currency.md b/.changeset/default-org-owner-currency.md index 94855ba51b7..7f5ea0bf318 100644 --- a/.changeset/default-org-owner-currency.md +++ b/.changeset/default-org-owner-currency.md @@ -2,7 +2,7 @@ '@objectstack/plugin-auth': patch --- +The single posture's Default Organization now takes its first owner's default currency. That organization is created at boot with no creator, so it never passed through organization creation, and a new self-hosted install showed code-less amounts as plain numbers until an administrator set Setup → Localization → Default currency by hand. When the default-organization bootstrap first binds (or promotes) its owner, the organization gets `localization.currency` by the same rule a new organization's creator gets: the owner's stored `sys_user.locale`, else the binding request's `Accept-Language` (on a first sign-up, the sign-up request), mapped through the CLDR region table. Nothing derivable means nothing is written, and a value already set on any rung is never overwritten. `EnsureDefaultOrganizationResult` gains an optional `ownerUserId`, set when the call bound or promoted the owner. + Clause-②: no Metadata-protocol: none - -The single posture's Default Organization now takes its first owner's default currency. That organization is created at boot with no creator, so it never passed through organization creation, and a new self-hosted install showed code-less amounts as plain numbers until an administrator set Setup → Localization → Default currency by hand. When the default-organization bootstrap first binds (or promotes) its owner, the organization gets `localization.currency` by the same rule a new organization's creator gets: the owner's stored `sys_user.locale`, else the binding request's `Accept-Language` (on a first sign-up, the sign-up request), mapped through the CLDR region table. Nothing derivable means nothing is written, and a value already set on any rung is never overwritten. `EnsureDefaultOrganizationResult` gains an optional `ownerUserId`, set when the call bound or promoted the owner. diff --git a/.changeset/spec-form-object-name-shared.md b/.changeset/spec-form-object-name-shared.md index f088c737ce4..baa6f9bf053 100644 --- a/.changeset/spec-form-object-name-shared.md +++ b/.changeset/spec-form-object-name-shared.md @@ -4,7 +4,7 @@ '@objectstack/lint': patch --- +`@objectstack/spec/ui` now exports `anonymousFormObjectName`, the object an open anonymous form candidate submits into (the form's `data.object`, else the view's `list.data.object`, `form.data.object`, `object`). `@objectstack/metadata-core` re-exports the same function, and the public-form file-field lint rule in `@objectstack/lint` resolves the object through it instead of a retyped copy, so the doors and the lint cannot disagree. + Clause-②: yes (widening) Metadata-protocol: none - -`@objectstack/spec/ui` now exports `anonymousFormObjectName`, the object an open anonymous form candidate submits into (the form's `data.object`, else the view's `list.data.object`, `form.data.object`, `object`). `@objectstack/metadata-core` re-exports the same function, and the public-form file-field lint rule in `@objectstack/lint` resolves the object through it instead of a retyped copy, so the doors and the lint cannot disagree.