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
9 changes: 9 additions & 0 deletions .changeset/localization-no-default-currency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@objectstack/service-settings': minor
---

Localization: drop the hard-coded `USD` platform default for the workspace **Default currency** setting.

Previously the `localization.currency` setting defaulted to `'USD'`, and that value was applied to any `currency`-typed field that omits its own code — so every code-less amount surfaced a `$`/`US$` symbol even when nothing (field, measure, or workspace) actually named a currency. The setting now has **no platform default**: a code-less currency amount renders as a plain number unless the workspace explicitly picks a default currency (or the field declares its own).

Migration: a workspace that relied on the implicit USD default and wants to keep showing `$` should set **Settings → Localization → Default currency** to `USD` explicitly. Fields/measures that declare their own currency code are unaffected.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ describe('localizationSettingsManifest', () => {
const byKey = (k: string) => specs.find((s) => s.key === k);
expect(byKey('timezone').default).toBe('UTC');
expect(byKey('locale').default).toBe('en-US');
expect(byKey('currency').default).toBe('USD');
// No platform default currency: a code-less currency field renders as a
// plain number unless the workspace explicitly sets one (avoids surfacing
// an unwanted "$"/"US$" on every amount that omits its own code).
expect(byKey('currency').default).toBeUndefined();
expect(byKey('date_format').default).toBe('YYYY-MM-DD');
expect(byKey('first_day_of_week').default).toBe('monday');
expect(byKey('fiscal_year_start').default).toBe('january');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ export const localizationSettingsManifest: SettingsManifest = {
// ── Finance ───────────────────────────────────────────────────────────
{ type: 'group', id: 'finance', label: 'Finance', required: false },
{
type: 'select', key: 'currency', label: 'Default currency', required: false, default: 'USD',
description: 'ISO 4217 code applied when a currency field omits its own.',
type: 'select', key: 'currency', label: 'Default currency', required: false,
// No platform default: when a currency field omits its own code AND the
// workspace has not set a default here, amounts render as plain numbers
// rather than inheriting a guessed symbol (previously hard-defaulted to
// 'USD', which surfaced an unwanted "$"/"US$" on every code-less amount).
// A workspace can still pick a default to apply org-wide.
description: 'ISO 4217 code applied when a currency field omits its own. Leave unset to render code-less amounts as plain numbers.',
options: [
{ value: 'USD', label: 'USD — US Dollar' },
{ value: 'EUR', label: 'EUR — Euro' },
Expand Down