# General Translation Changelog: gt-sanity 2.0.0: Zero-config translate dialogue
URL: https://generaltranslation.com/en-GB/blog/gt-sanity_v2_0_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Brian Lou
Published: 2026-04-01

## Overview

`gt-sanity` v2 is a major release that upgrades the plugin to support Sanity v5 and React 19, simplifies set-up with a zero-config translate dialog, and adds new options for controlling which fields appear on translated documents.

***

## What’s new

### Simpler set-up: Translate dialog

The biggest change in v2 is how developers interact with the translation UI. Previously, you had to configure `structureTool` with a custom `defaultDocumentNode` to add a Translations tab to your documents. Now, the plugin automatically adds a **Translate** action to every document — clicking it opens a dialog with the full translation UI.

This means the minimal set-up is just two steps: install the plugin and add it to your config.

```typescript title="sanity.config.ts"
import { defineConfig } from 'sanity';
import { gtPlugin } from 'gt-sanity';

export default defineConfig({
  plugins: [
    gtPlugin({
      sourceLocale: 'en',
      locales: ['es', 'zh', 'ja'],
    }),
  ],
});
```

The `TranslationsTab` component is still exported for users who prefer a dedicated tab view, but it&#39;s now optional.


### `defaultLocale` config option

If you already have a `gt.config.json` from using `gt-next` or `gt-react`, you can now spread it directly into the plugin config. The `defaultLocale` field is accepted as an alias for `sourceLocale`:

```typescript
import gtConfig from './gt.config.json';

gtPlugin({
  ...gtConfig, // { defaultLocale: 'en', locales: ['es', 'zh', 'ja'] }
});
```

If both `sourceLocale` and `defaultLocale` are specified, `sourceLocale` takes precedence.


### `skipFields` option

A new `skipFields` config option removes matched fields entirely from translated documents. This is different from `ignoreFields`, which copies the source document&#39;s value to the translation — `skipFields` ensures the field doesn&#39;t appear in the translated document at all.

Use `skipFields` for fields such as unique document slugs, SEO canonical URLs, or source-only metadata that shouldn&#39;t be carried over to translations:

```typescript
gtPlugin({
  sourceLocale: 'en',
  locales: ['es', 'zh', 'ja'],
  skipFields: [
    { fields: [{ property: '$.slug', type: 'slug' }] },
    { fields: [{ property: '$.canonicalUrl' }] },
  ],
});
```

By contrast, `ignoreFields` is for fields you don&#39;t want translated but still want copied from the source — such as categories, tags, or internal metadata that should have the same value across all languages.

Like `ignoreFields`, you can scope skip rules to specific documents using `documentId`, and use [JSONPath](https://goessner.net/articles/JsonPath/) expressions for `property`.


### Improved `ignoreFields` behaviour

In v1, ignored fields were only restored from the source document *after* translation — the content was still sent to the translation API. In v2, ignored fields are now stripped from the document **before** serialisation, so ignored content is never sent to the API.

***

## Breaking changes

### Sanity v5 and React 19

`gt-sanity` v2 requires Sanity v5+ and React 19+. If you&#39;re still on Sanity v3 or v4, continue using `gt-sanity` v1.

### Translations tab no longer registered automatically

The plugin no longer registers a Translations tab view automatically. The Translate dialog now serves as the default interaction model. If you still want a dedicated tab, you can add it manually — see the [quickstart](/docs/integrations/sanity/quickstart).

***

## Links

* [Quickstart](/docs/integrations/sanity/quickstart)
* [Configuration Guide](/docs/integrations/sanity/guides/configuring-sanity)
* [API Reference](/docs/integrations/sanity/reference/plugin-configuration)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
