Skip to content
Closed
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/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
10 changes: 5 additions & 5 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 All @@ -195,7 +195,7 @@ A good i18n library will do two things:
2. Locate the translation in the right language which corresponds to that form

**If you already have an internationalization library,
check their docs for information on plural formatting.**
check its docs for information on plural formatting.**
Almost all libraries have dedicated documentation on rendering plurals.

### Full example: plurals in a multilingual React app
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 @@ -48,7 +48,7 @@ export default async function Home() {

### The `locale` parameter requirement

Cached components use their parameters as cache keys, any cached component that contains translatable content must accept a `locale` parameter if they are to update when a user's locale changes. For example, `CachedContent` must accept a `locale` parameter to create separate cache entries for each locale. Without this parameter, the component would serve the same cached content regardless of the user's locale.
Cached components use their parameters as cache keys, any cached component that contains translatable content must accept a `locale` parameter if it is to update when a user's locale changes. For example, `CachedContent` must accept a `locale` parameter to create separate cache entries for each locale. Without this parameter, the component would serve the same cached content regardless of the user's locale.

### Configuration notes

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()` 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: 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()` 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: 1 addition & 1 deletion docs/en-US/core/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ In order to translate a file, you need to follow these four steps:
### 1. Upload the file

Uploading files returns a list of file references with the [`uploadSourceFiles`](/docs/core/class/methods/translation/upload-source-files) method.
This allows you to later check the enqueue the file for translation, check the status of the file, and download the translated file.
This allows you to later enqueue the file for translation, check the status of the file, and download the translated file.

```typescript title="src/index.ts"
import fs from 'fs';
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/key-concepts/dynamic-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ By wrapping private information in a `<Var>` component, you can ensure that the
<Callout>
**Exceptions**

The exceptions to the statement above are (1) in the case of a nested `<T>` component used inside of a `<Var>` component (ie, the children of the nested `<T>` component will be translated)
The exceptions to the statement above are (1) in the case of a nested `<T>` component used inside of a `<Var>` component (i.e., the children of the nested `<T>` component will be translated)
or (2) when data is passed intentionally to our API via some other means within a child of the `<Var>` component (i.e., a fetch call).
However, this is not the intended use of the `<Var>` component nor the General Translation API and doing so can harm load times and performance.

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/locadex/auto-merge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Click the rule blocking auto-merge, then:
1. Click "Add Bypass"
2. Select "Locadex Agent" from the dropdown

![Add Bypass button with "Locadex Agent selected"](https://assets.gtx.dev/locadex-screenshots/auto-merge/add-bypass.png)
![Add Bypass button with "Locadex Agent" selected](https://assets.gtx.dev/locadex-screenshots/auto-merge/add-bypass.png)

### Step 4: Save changes

Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/next/api/components/tx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ This means translation will be performed live.

`<Tx>` translates jsx at runtime.
This means that translations are performed live, so you can translate content that is only known at runtime.
The trade off is that there is a delay while waiting for an on-demand translation to load is significantly slower.
The trade off is that there is a delay while waiting for an on-demand translation to load, which is significantly slower.

While loading, `<Tx>` will return undefined unless languages are similar (en-US vs en-GB), though this behavior can be customized with render settings.
If an error occurs, `<Tx>` will return the original content.

Our advice is to translate everything you can at build time using [`<T>`](/docs/next/api/components/t), [`getGT`](/docs/next/api/strings/use-gt), or [`useGT`](/docs/next/api/strings/use-gt),
Our advice is to translate everything you can at build time using [`<T>`](/docs/next/api/components/t), [`getGT`](/docs/next/api/strings/get-gt), or [`useGT`](/docs/next/api/strings/use-gt),
and only use on-demand translations, like `<Tx>` and [`tx`](/docs/next/api/strings/tx) when necessary.

Make sure to follow the [deployment guide here](/docs/next/tutorials/quickdeploy).
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/next/api/config/with-gt-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ If the translation is cached, response time is too low to justify loading behavi
Timeouts only apply to runtime translations, or translations that need to be performed on demand as they have not been cached.

Timeouts are set to 8 seconds by default.
This design decision is to facilitate vercel users who have a default 10-second timeout for serverless functions on the free plan.
This design decision is to facilitate Vercel users who have a default 10-second timeout for serverless functions on the free plan.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/next/api/strings/get-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default async function TranslateGreeting() {

## Notes
* The `getMessages` function is a server-side function that translates encoded strings from `msg`.
* Translations strings with `getMessages` happen before runtime, during the build process (unless in development).
* Translation strings with `getMessages` happen before runtime, during the build process (unless in development).

## Next steps
* See [`useMessages`](/docs/next/api/strings/use-messages) for client-side string translations from encoded strings at buildtime.
Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/next/api/strings/tx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ A promise that resolves to a string containing the translated content, or the or

The `tx` function translates strings at runtime.
This means that translations are performed live, so you can translate content that is only known at runtime.
The trade off is that there is a delay while waiting for an on-demand translation to load is significantly slower.
The trade off is that there is a delay while waiting for an on-demand translation to load, which is significantly slower.

Our advice is to translate everything you can at build time using [`getGT`](/docs/next/api/strings/use-gt), [`useGT`](/docs/next/api/strings/use-gt), or [`<T>`](/docs/next/api/components/t),
Our advice is to translate everything you can at build time using [`getGT`](/docs/next/api/strings/get-gt), [`useGT`](/docs/next/api/strings/use-gt), or [`<T>`](/docs/next/api/components/t),
and only use on-demand translations, like `tx` and [`<Tx>`](/docs/next/api/components/tx), when necessary.

Make sure to follow the [deployment guide here](/docs/next/tutorials/quickdeploy).
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/next/guides/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You'll never have to wait for translations again.

1. Fully migrate your entire project to `gt-next`, and remove the old i18n library.
2. Fully migrate your project, but keep using dictionaries from the old i18n library.
2. Keep using the old i18n library for now, and only migrate part of your project to `gt-next`.
3. Keep using the old i18n library for now, and only migrate part of your project to `gt-next`.

For more details on each option, see the [migration strategies](#strategies) section.
</Step>
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/react-core-linter/rules/static-string.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Ensures that translation functions like [`gt`](/docs/react/api/strings/use-gt) a

### staticStringRequired

Registration functions can only accept static strings.
Translation functions can only accept static strings.

#### ❌ Incorrect

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/react-native/concepts/stand-alone.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Standalone i18n
description: How to use gt-react as a standalone i18n library
description: How to use gt-react-native as a standalone i18n library
---
{/* AUTO-GENERATED: Do not edit directly. Edit the template in content/docs-templates/ instead. */}
Loading