Contributing
April 8, 2026 ยท View on GitHub
Contributions are always welcome and there are multiple ways to join in from being a maintainer of a particular locale to submitting one-off improvement suggestions, big or small. Maintainers are tagged to help review automated pull-requests from AI and receive a token of appreciation from Sanity.
Getting started
Before contributing, please read our code of conduct.
Suggesting improvements
You can easily add suggestions to existing pull requests from AI and other contributors without checking out code, here is a quick demo:
Submitting your own PRs
Make sure you have Node.js version 18.3 or newer, as well as pnpm.
git clone git@github.com:sanity-io/locales.git
cd locales
pnpm install
pnpm run build
The strings are located in the src folder of each plugin, where the file name represents the "namespace". Send a pull request if you have suggestions for improvements, and feel free to add yourself to the contributors array in locales/registry.ts. If you want to help review new translations, add yourself to the maintainers array instead, see below for more information. After doing your changes, run pnpm run reconcile and add the changes to version control.
Adding a new locale
Hooray! We appreciate your contribution and love seeing new locales added! Initially, you probably do not want to hand-translate every single string in the studio. Instead, simply request a new locale and we will run an initial AI translation for you. Once this is done, you can contribute edits/improvments to it and optinally be its maintainer.
Here is a full walkthrough of how we use AI to help us create language plugins and keep them updated, and how maintainers and contributors help
Should you want to manually translate or otherwise work directly with the source code, here are the steps involved:
- Create a new branch for your work (
git checkout -b feat/add-locale-<locale-id>). - Edit
locales/registry.tsand add a new entry to theregistryarray- The
idproperty should be a BCP 47 language tag - Add your GitHub username to the
maintainersandcontributorsarrays.
- The
- From the root of the repository, run
pnpm run reconcile - Open up the newly created folder (matching the
idproperty of the entry you put intolocales/registry.ts) and inspect the contents.- The
srcfolder will hold all the resources (strings) that need to be translated - one file per namespace. - Properties should have an
undefinedvalue, followed by a comment that holds the English (default) value. This makes it easier to spot what is missing translations.- Searching for
: undefined,should give you a good indicator if any is missing. - You can also run
pnpm run check:missing --locale <locale>to get a list of missing translations (if running with npm, you may need to runnpm run check:missing -- --locale <locale>- note the double-dash).
- Searching for
- The
- Add and make changes to the translations! You can use the
pnpm run devcommand to start up a local studio with your changes. - Add your changes to git (
git add .) and commit (git commit -m "feat(<locale-id>): add <locale name> locale"). We use Conventional Commits for our commit messages.- Note: The reconciliation script will make changes to
pnpm-lock.yaml,apps/studioand possiblylocales/registry.ts(if not sorted correctly). This is expected, and should be commited.
- Note: The reconciliation script will make changes to
- Push your changes to a fork and send a pull request!
Maintaining a locale
Want to help maintain a plugin? Awesome! We appreciate your help! To get started, either request to be added as a maintainer, or add yourself as one by following these steps:
- Follow the Getting started instructions
- Add yourself to the
maintainersarray in thelocales/registry.tsfile for the language you have in mind. - Run
pnpm run reconcile- it should update a few files, such aspackage.jsonfor the given locale. - Add the changes to git, commit the changes and push to a fork.
- Preferably the commit message (and PR name) should be something like "chore(
): add @ as maintainer".
- Send a pull request!
Troubleshooting
If you run into build issues, you might want to try deleting node_modules folders and reinstalling dependencies with pnpm install.
Studio introduced a new locale namespace
When a PR upgrades the sanity package to a version that adds a new locale namespace, you may see test failures due to an unrecognized namespace. To fix this, do the following:
- Run the reconcile action from main.
- This action runs
pnpm reconcileand opens a PR with the locale packages updated to include the new namespace. Once this action has completed, you can find the PR here: https://github.com/sanity-io/locales/pull/actions/reconcile. - The test failures should be resolved when this PR is merged.