Skip to content

feat(mosaic): add localization terms for the organization noun - #10553

Open
alexcarpenter wants to merge 5 commits into
mainfrom
carp/mosaic-localization-globals
Open

alexcarpenter wants to merge 5 commits into
mainfrom
carp/mosaic-localization-globals

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

Adds terms to Mosaic's localization catalog so an app can change the word for an organization in one place. The default stays "organization". The Clerk dashboard wants "workspace".

<MosaicProvider
  localization={{
    overrides: {
      terms: { organization: { one: 'workspace', other: 'workspaces' } },
    },
  }}
/>
  • Built-in strings use {organization}, {organizations}, {Organization} and {Organizations}, and custom strings can too. A specific key still wins over a term.
  • Terms are filled once after the catalog layers merge, so views and fill calls don't change.
  • Capitalization uppercases the first character with the locale's rules. It gets iTeam (ITeam) and Dutch ijsbeer (Ijsbeer) wrong, and those need per-key overrides.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 3, 2026 8:41pm UTC
swingset Ready Ready Preview Nov 3, 2026 8:41pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 915bc7a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/mosaic Minor
@clerk/swingset Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Mosaic now supports customizable singular and plural organization terms. Built-in messages use organization term placeholders. Localization resolution applies the terms using the resolved locale. Tests cover defaults, overrides, capitalization, interpolation, and message-key precedence. Documentation and a minor-release changeset describe the feature.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • clerk/javascript#10458: Changes the Mosaic message tree that this PR extends with messageTemplates and applyTerms.
  • clerk/javascript#10502: Adds message groups that this PR updates to use organization term placeholders.

Suggested reviewers: austincalvelage, kylemac

Merge Risk: Low · up to 915bc

Some localized screens may display incorrect singular organization wording. The issue is narrow but remains unresolved.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: adding a localization terms feature for the organization noun in Mosaic. It matches the changeset, which adds termMessages, applyTerms, and messageTemplates, a…
Description check Passed The description states that the PR adds terms to Mosaic's localization catalog so an app can change the word for an organization. It lists the supported placeholders, the precedence rule where a spe…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding a localization terms feature for the organization noun in Mosaic. It matches the changeset, which adds termMessages, applyTerms, and messageTemplates, and updates organization strings to use placeholders. The feat(mosaic) prefix follows the conventional commit style.

Full details: Description check

Explanation

The description states that the PR adds terms to Mosaic's localization catalog so an app can change the word for an organization. It lists the supported placeholders, the precedence rule where a specific key overrides a term, and the capitalization limits. All of these match the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 20 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 8d50626 and 915bc7a.

Files selected for processing: 4
  • packages/mosaic/src/features/create-organization/create-organization.messages.ts
  • packages/mosaic/src/features/organization-list/__tests__/organization-list.feature.test.tsx
  • packages/mosaic/src/features/organization-list/organization-list.messages.ts
  • packages/mosaic/src/localization/registry.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10553

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10553

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10553

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10553

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10553

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10553

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10553

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10553

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10553

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10553

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10553

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10553

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10553

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10553

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10553

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10553

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10553

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10553

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10553

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10553

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10553

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10553

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10553

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10553

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10553

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10553

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10553

commit: 915bc7a

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Matches Workspace term renames built-in UI

With the workspace term, the switcher, profile nav, section title, danger zone and delete dialog say workspace, capitalized in headings. Before, the same override changed nothing. None of the 738 resolved strings still says organization.

Merge-base

Switcher and profile

This PR 915bc7ab

Switcher and profile

Merge-base

Delete dialog

This PR 915bc7ab

Delete dialog

Whole catalog sweep

Also checked · 4 match

Matches Default still says organization
Matches Key override wins, custom strings fill
Matches Locale-aware capitalization
Matches OrganizationList and CreateOrganization use term

Proof on 915bc7ab (from 8d50626a) · Did Proof get it right? Yes · No

View full Proof report

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

This branch was successfully deployed

2 active deployments
Preview – swingset — 915bc7ab Deployed Nov 3, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 915bc7ab Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants