Skip to content

Replace separate sourceLocale config option with first item in locales#24

Merged
k0d13 merged 2 commits into
mainfrom
remove-source-locale
May 18, 2026
Merged

Replace separate sourceLocale config option with first item in locales#24
k0d13 merged 2 commits into
mainfrom
remove-source-locale

Conversation

@k0d13

@k0d13 k0d13 commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

Chores

  • Removed the explicit sourceLocale configuration option. The first locale in your locales array is now automatically used as the source locale.

Documentation

  • Updated all configuration examples, guides, and API documentation across all supported frameworks to reflect the simplified configuration approach and new source locale behaviour.

Review Change Stack

@changeset-bot

changeset-bot Bot commented May 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7520aa8

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

This PR includes changesets to release 6 packages
Name Type
@saykit/config Patch
@saykit/format-po Patch
babel-plugin-saykit Patch
unplugin-saykit Patch
@saykit/transform-js Patch
@saykit/transform-jsx 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

@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
saykit Ready Ready Preview, Comment May 18, 2026 6:27am

@github-actions github-actions Bot added examples Updates or additions to example apps package: config Related to @saykit/config and the CLI website Updates to the documentation website labels May 18, 2026
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@k0d13 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 14 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6dc0823f-d242-42ac-bb15-33bbf337d2e7

📥 Commits

Reviewing files that changed from the base of the PR and between 29ffbd9 and 7520aa8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • .changeset/humble-wolves-bet.md
  • lefthook.yml
  • package.json

Walkthrough

The PR removes the explicit sourceLocale configuration field from the Config schema and all associated documentation. The first element of the locales array now implicitly serves as the source locale, simplifying the configuration API across examples and documentation files.

Changes

Source Locale Configuration Simplification

Layer / File(s) Summary
Config schema and extract worker implementation
packages/config/src/shapes.ts, packages/config/src/features/workers/extract-worker.ts
The exported Config zod schema removes sourceLocale and its validation constraint that enforced sourceLocale === locales[0]. The extract worker updates its locale selection to use this.config.locales[0] instead of this.config.sourceLocale.
API reference and quickstart documentation
website/content/reference/api/config.mdx, website/content/getting-started/quickstart.mdx
The Config type definition and defineConfig examples are updated to remove sourceLocale. The locales property is documented to indicate that locales[0] is the source locale. The quickstart example and explanation now rely on the implicit source locale convention.
Core concepts and configuration documentation
website/content/core-concepts/configuration.mdx
The configuration guide is expanded to clarify that the first locales entry is the source locale, the top-level schema table is updated to remove sourceLocale and explain the source-locale-first rule, and the Locales section and warnings are adjusted to focus on the effects of reordering locales.
Example configurations and integration guides
README.md, packages/config/README.md, examples/carbon/saykit.config.ts, examples/tanstack-start/saykit.config.ts, website/content/guides/custom-transformer.mdx, website/content/integrations/carbon.mdx
Example saykit.config.ts snippets across all documentation and example projects are updated to remove the explicit sourceLocale: 'en' entry, demonstrating the simplified configuration consistently.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

package: config, website, examples

Poem

A config once held a locale with care,
But now the first entry's source everywhere.
Simplified schemas, examples all bright,
One less field to set, and docs done just right. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarises the main change: replacing the separate sourceLocale configuration option with the first item in the locales array, which is reflected across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-source-locale

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the dependencies Updates or changes related to project dependencies label May 18, 2026
@k0d13
k0d13 merged commit 7f94bc7 into main May 18, 2026
10 checks passed
@k0d13
k0d13 deleted the remove-source-locale branch May 18, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Updates or changes related to project dependencies examples Updates or additions to example apps package: config Related to @saykit/config and the CLI website Updates to the documentation website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant