Skip to content
Open
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 authors/archie.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ avatar: /static/avatars/archie.png
occupation: CEO
company: General Translation
email: archie@generaltranslation.com
twitter: https://x.com/archiemckenzie_/photo
twitter: https://x.com/archiemckenzie_
linkedin: https://www.linkedin.com/in/archie-mckenzie
---

Expand Down
1 change: 1 addition & 0 deletions authors/default.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Team
avatar: /static/avatars/logo.png
occupation: Team
company: General Translation
email: archie@generaltranslation.com
twitter: https://x.com/generaltxn
Expand Down
1 change: 1 addition & 0 deletions authors/jackie.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Jackie Chen
avatar: /static/avatars/jackie.png
occupation: Software Engineer
company: General Translation
email: jackie@generaltranslation.com
twitter: https://x.com/Some_Jackie
Expand Down
2 changes: 1 addition & 1 deletion blog/en-US/gt-next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags: ['guide', 'internationalization', 'nextjs', 'gt-next']

**Internationalization (i18n) sucks. We're building a Next.js library, gt-next, to make it easier.** Today we're launching it in open beta.

``` copy
```bash copy
npm i gt-next
```

Expand Down
2 changes: 0 additions & 2 deletions blog/en-US/i18n-without-translation-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ authors: [jackie]
tags: ['guide', 'internationalization', 'nextjs', 'i18n', 'gt-next', 'translation-files', 'developer-experience']
---

import Video from '@/components/Video';

Everyone who's internationalized a JavaScript app knows the workflow. You install an i18n library, create an `en.json` file, pull every user-facing string out of your components, assign each one a key, and reference the key where the string used to be. Then you duplicate that JSON file for every language you support. `es.json`, `fr.json`, `ja.json`.

At first, it's fine. Thirty strings, three languages, 90 entries.
Expand Down
4 changes: 2 additions & 2 deletions blog/en-US/multilingual-nextjs-seo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Search engines need separate, crawlable URLs to index each language version inde

This means **locale-in-the-URL** — not cookies, not query parameters, not `Accept-Language` detection alone.

```
```text
✅ generaltranslation.com/en/about
✅ generaltranslation.com/fr/about
✅ generaltranslation.com/es/about
Expand All @@ -46,7 +46,7 @@ This means **locale-in-the-URL** — not cookies, not query parameters, not `Acc

First, nest your pages under a `[locale]` dynamic segment:

```
```text
app/
└── [locale]/
├── layout.tsx
Expand Down
8 changes: 4 additions & 4 deletions blog/en-US/plurals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ layout: PostLayout

We often encounter apps that display awkward messages like:

```
```text
You have 1 new message(s)
```

Expand Down Expand Up @@ -87,7 +87,7 @@ pluralize(2, 'child', 'children') // "children"

But what if you need more complicated logic, like:

```
```text
"No one is watching"
"1 person is watching"
"2 people are watching"
Expand Down Expand Up @@ -168,7 +168,7 @@ languages like Arabic and Polish have more than just these two forms.

For example, an English-speaking user might expect:

```
```text
"No one is watching"
"1 person is watching"
"2 people are watching"
Expand All @@ -177,7 +177,7 @@ For example, an English-speaking user might expect:
Whereas an Arabic-speaking user might expect different expressions for singular,
dual (when the count is exactly two things), and small and large plural forms:

```
```text
"لا أحد يشاهد"
"1 شخص يشاهد"
"2 شخصان يشاهدان"
Expand Down
4 changes: 2 additions & 2 deletions devlog/en-US/gt-i18n_v0_1_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Though `generaltranslation` is also a runtime-agnostic library, it is—by desig

## What's Included

- **[`msg()`](#)** - String registration and variable interpolation
- **[`mFallback()`](#)** and **[`gtFallback()`](#)** - Migration helpers for incremental adoption
- **`msg()`** - String registration and variable interpolation
- **`mFallback()`** and **`gtFallback()`** - Migration helpers for incremental adoption

---

Expand Down
2 changes: 1 addition & 1 deletion devlog/en-US/gt-next_v6_3_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function Page() {

To support interpolation, the [`msg()`](/docs/react/reference/functions/msg) function returns an encoded message instead of a plain string. The format looks like this:

```
```text
<interpolated content>:<base64 encoded string>
```

Expand Down
2 changes: 0 additions & 2 deletions devlog/en-US/gt-react_v10_15_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ authors: [ernest]
tags: ['gt-react', 'derive', 'tagged-template', 'i18n']
---

import Video from '@/components/Video';

## The `declareStatic()` → `derive()` rename

This release is the first to ship with the new [`derive()`](/docs/react/reference/functions/derive) name. Previously, this function was called `declareStatic()` and the JSX component was `<Static>`. In [PR #1062](https://github.com/generaltranslation/gt/pull/1062), both were renamed to [`derive()`](/docs/react/reference/functions/derive) and [`<Derive>`](/docs/react/reference/components/derive) for clarity.
Expand Down
2 changes: 1 addition & 1 deletion devlog/en-US/gt-react_v10_18_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function StatusMessage({ isMasculine }) {

At build time, the CLI sees the [`derive()`](/docs/react/reference/functions/derive) call and registers two separate source entries, each producing its own translation:

```
```text
"I am tired" ($context: "inflect as masculine") → "Estoy cansado"
"I am tired" ($context: "inflect as feminine") → "Estoy cansada"
```
Expand Down
2 changes: 0 additions & 2 deletions devlog/en-US/gt-react_v10_19_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ authors: [ernest]
tags: ['gt-react', 'browser', 'hot-reload', 'dev-experience', 'i18n']
---

import Video from '@/components/Video';

<Video src='https://assets.gtx.dev/devlogs/gt-react-browser-tx-hot-reload.mp4' />

## Overview
Expand Down
2 changes: 0 additions & 2 deletions devlog/en-US/react-core-linter_v0_1_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ tags: ['react-core-linter', '0.1.0', 'eslint', 'linting', 'static-validation']

This plugin catches common implementation errors that we have seen in the wild.

import Video from '@/components/Video';

<Video src='https://assets.gtx.dev/docs/react-core-linter/web-0.1.0.mp4' />

## Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This means:
- Your existing story structure and slugs are unchanged.
- Writes are drafts, so translations are visible in Storyblok's editor once you switch languages, and go live only when you publish the story.

*Note: General Translation stores the localized value on a per-field, per-language key derived from the field name and the target language. Confirm the exact key format against the serialization code before relying on it directly; when reading through Storyblok's delivery API you do not need to know it.*
*Note: General Translation stores the localized value on a per-field, per-language key derived from the field name and the target language. When reading through Storyblok's delivery API you do not need to know it.*

## Fetch translated content [#fetch-content]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/core/guides/translating-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ related:

---

The `generaltranslation` library can translate full source files. This page explains how to upload, enqueue, status, and download workflows for files.
The `generaltranslation` library can translate full source files. This page explains the upload, enqueue, status, and download workflows for files.

## Before you start [#before-start]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/core/reference/types/content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: Supported content formats for translation. API reference for Conten
type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage;
```

*Note:* the string members (`IcuMessage`, `StringMessage`, `I18nextMessage`) are all aliases for `string`; in the source they are grouped as `StringContent`, so `Content` is equivalently `JsxChildren | StringContent`.
*Note: the string members (`IcuMessage`, `StringMessage`, `I18nextMessage`) are all aliases for `string`; in the source they are grouped as `StringContent`, so `Content` is equivalently `JsxChildren | StringContent`.*

## Members [#members]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type GTConstructorParams = {
};
```

*Note:* the older docs typed this as an `interface`; the current source defines it as a `type` alias.
*Note: the older docs typed this as an `interface`; the current source defines it as a `type` alias.*

## Properties [#properties]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/core/reference/types/jsx-element.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The HTML attribute keys map short GT keys to their HTML attributes:
| `arb` | `aria-labelledby` |
| `ard` | `aria-describedby` |

*Note:* transformations are only read on the server side when `t` is `'p'` (plural) or `'b'` (branch).
*Note: transformations are only read on the server side when `t` is `'p'` (plural) or `'b'` (branch).*

### `c` [#children]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type LocaleProperties = {
};
```

*Note:* the older docs typed this as an `interface`; the current source defines it as a `type` alias.
*Note: the older docs typed this as an `interface`; the current source defines it as a `type` alias.*

## Properties [#properties]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/core/reference/types/variable.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type VariableType = 'v' | 'n' | 'd' | 'c' | 'rt';
| `'c'` | Currency formatting. |
| `'rt'` | Relative time formatting. |

*Note:* the older docs omitted `'rt'`; it is present in the current source.
*Note: the older docs omitted `'rt'`; it is present in the current source.*

## Example [#example]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/dashboard/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ If you do not see a page, check that you are in the right Organization or Projec

**How do I update existing translations after changing the Glossary?** Select relevant terms and use Apply Glossary to update existing translations that contain selected Glossary terms. See [Define translation context](/docs/platform/dashboard/guides/adding-translation-context).

**How do I regenerate translations?** For code and uploaded translation files, use the CLI or Locadex to run a new translation pass; the Dashboard's **Translations** page does not run full-file retranslation. Linked Google Drive files can be regenerated with **Force retranslation** from the [Google Drive integration](/docs/integrations/google-drive/guides/managing-translations#force).
**How do I regenerate translations?** For code and uploaded translation files, use the CLI or Locadex to run a new translation pass; the Dashboard's **Translations** page does not run full-file retranslation. Linked Google Drive files can be regenerated with **Force retranslate** from the [Google Drive integration](/docs/integrations/google-drive/guides/managing-translations#force).

**How do I sync Dashboard edits back to GitHub?** Use Locadex to create pull requests for Dashboard changes, such as manual translation edits or Apply Glossary updates.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ When you create a Context Group from a Project, it is still created at the Organ

In most cases, you should directly assign or reassign Projects to Context Groups.

However, for major changes, you can also use **Export** to download a group's Glossary and Directives. Then use **Import** to fill an empty Glossary and Directives from a supported file.
However, for major changes, you can also use **Export** to download a group's Glossary and Directives. Then use **Import** to fill empty Glossary and Directives fields from a supported file.

## Set priority when groups overlap [#priority]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Each Project in the Dashboard has its own settings, separate from Organization-w
- Update the Project **display name**. This changes how the Project appears in the Dashboard.
- Update the Project **source locale**. This changes the language your content is authored in, but does not update existing translations.
- Enable the **CDN setting** to serve translations from a global CDN for faster load times.
- Enable **AI Context**, which uses contextual information to improve AI translation quality
- Enable **AI Context**, which uses contextual information to improve AI translation quality.

## Project ID [#project-id]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ These sections cover the Dashboard, the core `generaltranslation` library, Locad
Learn how to use Locadex, the AI agent which connects your codebase, translations, and content sources.
</Card>
<Card title="Core" href="/docs/platform/core/quickstart">
Learn what the `generaltranslation` core library does, when to use it, and how to translate your first string.
Learn what the `generaltranslation` Core library does, when to use it, and how to translate your first string.
</Card>
<Card title="OpenAPI" href="/docs/platform/openapi/overview">
Learn how to use the public General Translation API endpoints and the OpenAPI spec.
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/openapi/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Use the correct key type:

- **Project (development)** with prefix `gtx-dev-`: for local and preview use, rejected by production-only endpoints
- **Project (production)** with prefix `gtx-api-`: bound to one Project
- **Organization** with prefix `gtx-org-`: works across Projects. When using an Organization key on Project-scoped endpoints, must send `x-gt-project-id`.
- **Organization** with prefix `gtx-org-`: works across Projects. When using an Organization key on Project-scoped endpoints, you must send `x-gt-project-id`.

See [API keys](/docs/platform/dashboard/reference/api-keys) for how to create and scope API keys.

Expand Down
6 changes: 3 additions & 3 deletions docs/en-US/react/nextjs-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,12 @@ That's it — your app is now multilingual. 🎉
This is expected. In development, translations happen on-demand (your content is translated in real time via the API). This delay **does not exist in production** — all translations are pre-generated by [`npx gt translate`](/docs/cli/reference/commands/translate).
</Accordion>
<Accordion title="Some translations are inaccurate">
Ambiguous text can lead to inaccurate translations. For example, "apple" could mean the fruit or the company. Add a `context` prop to help:
Ambiguous text can lead to inaccurate translations. For example, "apple" could mean the fruit or the company. Add a `$context` prop to help:

```jsx
<T context="the technology company">Apple</T>
<T $context="the technology company">Apple</T>
```

Both [`<T>`](/docs/react/reference/components/t), [`useGT()`](/docs/react/reference/hooks/use-gt), and [`getGT()`](/docs/react/nextjs/reference/functions/get-gt) support the `context` option.
[`<T>`](/docs/react/reference/components/t), [`useGT()`](/docs/react/reference/hooks/use-gt), and [`getGT()`](/docs/react/nextjs/reference/functions/get-gt) all support the `$context` option.
</Accordion>
</Accordions>
Loading