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
2 changes: 1 addition & 1 deletion DOCS-SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ Only document capabilities that actually exist, and resolve anything uncertain a
A "common workflow" section is a bulleted roundup that points readers to the main tasks or settings from a landing page (as in the Dashboard get-started **Key workflows** and **Configuration** lists). Each bullet starts with the action, then a short description, then a link:

```text
- **Define context and key terms for translation:** use Context Groups to guide terminology and style across Projects. See [Define translation context](/docs/platform/dashboard/guides/translation-context).
- **Define context and key terms for translation:** use Context Groups to guide terminology and style across Projects. See [Define translation context](/docs/platform/dashboard/guides/adding-translation-context).
```

Use common workflow sections on **Get Started pages and other overview/landing pages** to surface the primary tasks, instead of duplicating full how-tos inline. Do not use them mid-guide, where ordered steps belong.
Expand Down
2 changes: 1 addition & 1 deletion devlog/en-US/gt-next_v6_10_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Cached components use their parameters as cache keys, any cached component that

When `experimentalLocaleResolution` is enabled:
- I18n proxy must be enabled for locale resolution to work (see [I18n Proxy](/docs/react/nextjs/app-router-middleware))
- It overrides any custom `getLocale` functions (locale resolution happens from the reading the URL path)
- It overrides any custom `getLocale` functions (locale resolution reads the URL path)
- It disables `getRegion` and `getDomain` functions
- It conflicts with the deprecated `experimentalEnableSSG` configuration - only one can be enabled at a time
- You can customize the locale parameter name with `experimentalLocaleResolutionParam` (defaults to `'locale'`)
Expand Down
2 changes: 1 addition & 1 deletion devlog/en-US/react-core-linter_v0_1_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ gt('Hello {name}!', { name })
Add to your ESLint config:

```javascript copy title="eslint.config.js"
import { defineConfig } from 'eslint';
import { defineConfig } from 'eslint/config';
import gtLint from '@generaltranslation/react-core-linter';

export default defineConfig([
Expand Down
13 changes: 12 additions & 1 deletion docs/en-US/cli/guides/using-auto-jsx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,18 @@ export default withGTConfig(nextConfig, {
});
```

Run Next.js with webpack. Turbopack disables the Babel compiler, warns that automatic injection will be skipped, and leaves JSX unwrapped. See [Next.js compiler options](/docs/react/nextjs/config#compiler-options).
Run both the development server and production build with webpack:

```json title="package.json"
{
"scripts": {
"dev": "next dev --webpack",
"build": "next build --webpack"
}
}
```

Next.js 16 uses Turbopack by default. Turbopack disables the Babel compiler, warns that automatic injection will be skipped, and leaves JSX unwrapped. See [Next.js compiler options](/docs/react/nextjs/config#compiler-options).

## How it works [#how]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/cli/reference/formats/gt-jsx-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ The `gt` entry accepts a `parsingFlags` object that controls how the CLI parses
- `devHotReload` — enables runtime translation for new content during development. `true` enables string translation; use an object such as `{ "strings": true, "jsx": true }` to control string and JSX handling separately.
- `enableAutoJsxInjection` — wraps translatable JSX text in `<T>` components at build time so you do not have to add them by hand. See [Automatic JSX injection](/docs/cli/guides/using-auto-jsx).
- `includeSourceCodeContext` — includes the surrounding source code lines as extra context for each translation. Replaces the deprecated top-level `files.gt.includeSourceCodeContext` key.
- `legacyGtReactImportSource` — makes compiler-injected `gt-react` imports resolve to `gt-react/browser`, for projects that need the legacy import path.
- `legacyGtReactImportSource` — makes compiler-injected imports resolve to `gt-react/browser`. Enable it only with legacy `gt-react` versions that export this path; current versions use the root `gt-react` import.
6 changes: 6 additions & 0 deletions docs/en-US/cli/reference/formats/mdx-md-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Add an `mdx` or `md` entry under `files` with an `include` array of glob pattern

This translates every MDX file under `content/docs/en` and saves the results to `content/docs/ja`. Use the `md` key instead for Markdown files. See the [configuration reference](/docs/cli/reference/config#files) for all file keys.

## Update static data exports [#data-exports]

When an updated MDX file contains static data exports, General Translation reuses matching strings from earlier translations and translates only new or changed strings. Reuse applies to exported variables whose values contain only literals, arrays, and plain objects. Exports with spreads, identifiers, function calls, template literals, or JSX use the standard translation path.

Force retranslation and Glossary retranslation skip this incremental reuse.

## Rename translated files [#transform]

The `transform` key remaps output file names. In the example above, `*.[locale].mdx` changes the translated extension to `.ja.mdx`. Use this when your docs framework expects a locale in the file name rather than in the directory path.
Expand Down
6 changes: 6 additions & 0 deletions docs/en-US/cli/reference/formats/ts-js-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ Add a `ts` or `js` entry under `files` with an `include` array of glob patterns.
```

This translates every TypeScript file under `scripts/en` and saves the results to `scripts/fr` and `scripts/es`. Use the `js` key instead for JavaScript files. See the [configuration reference](/docs/cli/reference/config#files) for all file keys.

## Update static data exports [#data-exports]

When an updated TypeScript or JavaScript file contains static data exports, General Translation reuses matching strings from earlier translations and translates only new or changed strings. Reuse applies to exported variables whose values contain only literals, arrays, and plain objects. Exports with spreads, identifiers, function calls, template literals, or JSX use the standard translation path.

Force retranslation and Glossary retranslation skip this incremental reuse.
6 changes: 3 additions & 3 deletions docs/en-US/platform/dashboard/guides/managing-billing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ This guide covers General Translation's usage-based billing, pricing, credits, a
Start for free. Add a payment method to turn on usage-based billing:

- **Starter — $0/month.** For individuals and small teams. There is no monthly fee; you pay only for what you use. Includes unlimited users, projects, and languages, plus the [Translation Editor](/docs/platform/dashboard/guides/reviewing-translations), GitHub integration, and the [Locadex](/docs/platform/locadex/quickstart) AI agent.
- **Enterprise — custom.** For larger teams with complex localization needs. Everything in Starter, plus forward-deployed localization engineers, custom workflows for any file format or framework, shared context across every Project, and enterprise-grade security, SLAs, and support.
- **Enterprise — custom.** For larger teams with complex localization needs. Everything in Starter, plus forward-deployed localization engineers, custom workflows for any file format or framework, shared context across every Project, and enterprise-grade security, SLAs, and support.

Each free organization gets 5M free translation credits to start. You will be rate-limited until you add a payment method.
Each free Organization gets 5M free translation credits to start. You will be rate-limited until you add a payment method.

## Usage-based billing [#usage]

You pay per workflow: cost is based on number of input tokens, workflow type (buildtime, runtime, or development), file format, and any context you provide.
You pay per workflow: cost is based on the number of input tokens, workflow type (build time, runtime, or development), file format, and any context you provide.

### Base workflow rates [#base-rates]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/react/(frameworks)/nextjs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default withGTConfig(nextConfig, {
});
```

Automatic JSX injection only runs in webpack builds. Turbopack disables the Babel compiler, and `type: 'swc'` or `type: 'none'` does not support injection. In each case, `gt-next` warns that injection was skipped.
Automatic JSX injection only runs in webpack builds. Run `next dev --webpack` during development and `next build --webpack` for production. Next.js 16 uses Turbopack by default; Turbopack disables the Babel compiler, and `type: 'swc'` or `type: 'none'` does not support injection. In each case, `gt-next` warns that injection was skipped.

### `headersAndCookies` [#headers-and-cookies]

Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/react/guides/developing-spa-translations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Development translations let you preview translated content as you edit your SPA
- A development API key that starts with `gtx-dev-`

<Callout type="warn">
**CommonJS limitation:** CommonJS is not currently supported by the GT compiler. Development hot reloading requires ESM imports and does not work in applications compiled as CommonJS. Production translations still work with the CommonJS startup pattern in the [SPA Quickstart](/docs/react/react-spa-quickstart).
**CommonJS limitation:** Development hot reloading requires ESM because the compiler injects top-level `await`. It does not work in applications compiled as CommonJS. Production translations still work with the CommonJS startup pattern in the [SPA Quickstart](/docs/react/react-spa-quickstart).
</Callout>

## Setup [#setup]
Expand Down Expand Up @@ -70,7 +70,7 @@ import { defineConfig } from 'vite';
import gtConfig from './gt.config.json'; // [!code highlight]

export default defineConfig({
plugins: [gtCompiler({ ...gtConfig }), react()], // [!code highlight]
plugins: [react(), gtCompiler({ ...gtConfig })], // [!code highlight]
});
```

Expand Down
Loading