Skip to content

Commit 01d668e

Browse files
committed
Fix
1 parent 23c5894 commit 01d668e

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

.claude/skills/localize/SKILL.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ description: Use when adding support for a new locale/language to the Adapty doc
99

1010
Adding a locale touches ~8 files plus new content/sitemap files. Miss any one and the locale will partially break (no search, broken auto-redirect, missing from sitemap, etc.). Follow this checklist in order.
1111

12-
**Active locales:** `zh` (Chinese), `tr` (Turkish). All examples use `{LOCALE}` as placeholder — replace with the actual code (e.g. `ja`, `ko`, `de`).
12+
**Active locales:** `zh` (Chinese), `tr` (Turkish), `ru` (Russian). All examples use `{LOCALE}` as placeholder — replace with the actual code (e.g. `ja`, `ko`, `de`).
1313

1414
---
1515

1616
## Step 1 — Register the locale in source code
1717

18-
Edit these 6 files before running any translation:
18+
Edit these files before running any translation:
1919

2020
### 1a. `src/data/locales.ts`
2121

@@ -159,6 +159,16 @@ Add auto-redirect logic to the inline script (around lines 87-95):
159159
}
160160
```
161161

162+
### 1i. `src/content.config.ts`
163+
164+
Add the locale to `SUPPORTED_LOCALES` inside the content config. This is what scopes the `locales` collection glob per CI matrix job — omitting this means every locale build loads every locale's MDX, which OOMs the runner as content grows.
165+
166+
```ts
167+
const SUPPORTED_LOCALES = ['zh', 'tr', 'ru', '{LOCALE}'] as const;
168+
```
169+
170+
The glob itself is derived from `BUILD_LOCALES` and doesn't need editing — only the tuple of allowed locales does.
171+
162172
---
163173

164174
## Step 2 — Add env vars
@@ -374,6 +384,7 @@ strategy:
374384
| 1f | Add locale key to `T` object (~20 strings) | `src/components/Homepage.tsx` |
375385
| 1g | Add to `LOCALE_NAMES_CLIENT` + `UI_STRINGS_CLIENT` | `src/components/Header.astro` |
376386
| 1h | Add auto-redirect block | `src/layouts/DocsLayout.astro` |
387+
| 1i | Add to `SUPPORTED_LOCALES` (scopes the locales collection glob per CI job) | `src/content.config.ts` |
377388
| 2 | Add env vars | `.env` + deployment config |
378389
| 3 | Create sitemap files + update astro.config.mjs | `src/pages/sitemap-{LOCALE}*.xml.ts`, `astro.config.mjs` |
379390
| 4 | Add npm scripts (optional) | `package.json` |
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
no_index: true
33
---
4+
import Callout from '../../../components/Callout.astro';
45

56
<Callout type="info">
67
Установка SDK — это шаг 5 настройки Adapty. Прежде чем покупки заработают в вашем приложении, вам также нужно подключить приложение к сторам, а затем создать продукты, пейвол и плейсмент в дашборде Adapty. [Гайд по быстрому старту](quickstart) описывает все необходимые шаги.
7-
</Callout>
8+
</Callout>

0 commit comments

Comments
 (0)