Skip to content

Commit fb99269

Browse files
committed
Merge branch 'localization' into develop
# Conflicts: # package-lock.json # src/components/Header.astro # src/content/docs/android/adapty-cursor-android.mdx # src/content/docs/capacitor/adapty-cursor-capacitor.mdx # src/content/docs/developer-cli/developer-cli-authentication.mdx # src/content/docs/developer-cli/developer-cli-quickstart.mdx # src/content/docs/developer-cli/developer-cli-reference.mdx # src/content/docs/developer-cli/developer-cli.mdx # src/content/docs/flutter/adapty-cursor-flutter.mdx # src/content/docs/ios/adapty-cursor.mdx # src/content/docs/kmp/adapty-cursor-kmp.mdx # src/content/docs/react-native/adapty-cursor-react-native.mdx # src/content/docs/unity/adapty-cursor-unity.mdx
2 parents c9983a5 + d591d62 commit fb99269

402 files changed

Lines changed: 6197 additions & 2501 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/editor/SKILL.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ See `references/simplified-technical-english.md` → Voice Guidelines + Verb Ten
115115

116116
Check for: non-parallel heading structure at same level, inconsistent list punctuation, dashes instead of colons after bold labels (`**Label**:` not `**Label** -`), inline lists where bullet lists would be clearer.
117117

118+
**Exception — UI/product names**: If a heading uses the exact name of a product feature or UI element, do not flag it for breaking parallelism. Feature names take precedence over grammatical consistency. Example: `## Sharing paid access between user accounts` is the name of the feature in the UI — do not rewrite it to fix parallel structure.
119+
118120
See `references/article-structure.md` → Parallel Heading Structure + List Formatting
119121

120122
### 7. Instruction Pattern (Location → Action)
@@ -124,6 +126,8 @@ Instructions must follow: Goal → Location → Action
124126
✅ "To create a paywall, in the Paywalls section, click **Create paywall**"
125127
❌ "Click **Create paywall** to create a paywall in the Paywalls section"
126128

129+
**Do not over-granularize**: A short inline instruction (2–3 steps expressible in one clear sentence) should stay inline. Breaking it into a numbered list introduces unnecessary friction. Use numbered steps only when: (a) the sequence has 4+ distinct actions, (b) each step requires separate verification, or (c) the sentence becomes unreadably long. Conciseness takes priority — do not flag a clear one-sentence instruction as a problem.
130+
127131
See `references/simplified-technical-english.md` → Instruction Pattern
128132

129133
### 8. Article Structure
@@ -134,9 +138,21 @@ See `references/article-structure.md`
134138

135139
### 9. Links and Images
136140

137-
**Diff reviews** (check only added items): existing pages, correct relative paths, anchor slugs lowercase-hyphenated, image files exist, `@assets/` not `@asset/`, descriptive alt text.
141+
Run the link checker in diff mode to validate links automatically:
142+
143+
```bash
144+
npm run check-links-diff
145+
```
146+
147+
This checks outgoing links from changed files AND incoming links to changed files (catches breakage from renamed files or removed headings). Reports are written to `_temp/link-report.md` and `_temp/link-report.html`.
138148

139-
**Full article reviews**: validate ALL links and images.
149+
After the script finishes, read `_temp/link-report.md` and include a summary in your review output. Report only **broken links** (errors) and **stale links** (warnings) — skip the "manual check" category. If issues were found, tell the user they can open the full HTML report:
150+
151+
```
152+
open _temp/link-report.html
153+
```
154+
155+
Additionally check images manually: image files exist, `@assets/` not `@asset/`, descriptive alt text.
140156

141157
See `references/astro-patterns.md`
142158

@@ -168,6 +184,24 @@ For each issue: quote the text (with line number) → explain why → provide sp
168184

169185
See `references/output-templates.md` for annotated feedback example.
170186

187+
### Interactive Review Flow
188+
189+
After completing all checks, follow this flow:
190+
191+
1. **Number every finding** sequentially across all categories (Critical, Important, Suggestions). Assign a single global number to each, not per-category numbers.
192+
193+
2. **Present the full numbered list** as a concise "whole picture" — one line per finding, format: `**N.** [article if multiple] brief description → proposed fix`
194+
195+
3. **Ask before proceeding**: *"Here are all [N] findings. Would you like to go through them interactively, deciding which to accept?"* — wait for the answer.
196+
197+
4. **If yes — use `AskUserQuestion`**, 4 suggestions at a time:
198+
- Question label (header, max 12 chars): `#N Topic`
199+
- Question text: `#N — filename line X: [quoted text] → [proposed rewrite]`
200+
- Options: **Accept** (describe what changes), **Skip** (leave as-is). "Other" is always available for custom comments.
201+
- Handle user comments: if the user types a custom note, incorporate it before applying the fix.
202+
203+
5. **Apply only accepted changes** after all answers are collected. Do not edit anything until the full quiz is complete.
204+
171205
## Special Considerations
172206

173207
### Diff Reviews

.claude/skills/product-manager/SKILL.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,24 @@ Start every review with **Persona Usage Analysis**, then:
146146

147147
See [`feedback-example.md`](references/feedback-example.md) for a complete annotated example.
148148

149+
### Interactive Review Flow
150+
151+
When both editor and product-manager reviews are combined in one session, a single shared numbered list is produced. When used alone, follow the same flow:
152+
153+
1. **Number every actionable finding** sequentially across all categories. Each finding gets one global number.
154+
155+
2. **Present the full numbered list** as a concise "whole picture" — one line per finding, format: `**N.** [article if multiple] brief description → proposed fix`
156+
157+
3. **Ask before proceeding**: *"Here are all [N] findings. Would you like to go through them interactively, deciding which to accept?"* — wait for the answer.
158+
159+
4. **If yes — use `AskUserQuestion`**, 4 suggestions at a time:
160+
- Question label (header, max 12 chars): `#N Topic`
161+
- Question text: `#N — filename: [quoted text] → [proposed fix or action]`
162+
- Options: **Accept** (describe what changes), **Skip** (leave as-is). "Other" is always available for custom comments.
163+
- Handle user comments: if the user types a custom note, incorporate it before applying.
164+
165+
5. **Apply only accepted changes** after all answers are collected. Do not edit anything until the full quiz is complete.
166+
149167
## Feedback Guidelines
150168

151169
- Quote the problematic section

.github/workflows/check-links.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
11
name: Check documentation links
22

33
on:
4-
push:
5-
branches: [main, develop]
64
pull_request:
7-
branches: [main, develop]
5+
branches: [main]
6+
workflow_dispatch:
7+
inputs:
8+
check-type:
9+
description: 'Which links to check'
10+
required: true
11+
default: 'all'
12+
type: choice
13+
options:
14+
- all
15+
- internal-only
16+
- external-only
817

918
jobs:
1019
internal-links:
1120
name: Check internal links
1221
runs-on: ubuntu-latest
22+
if: >-
23+
github.event_name != 'workflow_dispatch' ||
24+
github.event.inputs.check-type == 'all' ||
25+
github.event.inputs.check-type == 'internal-only'
1326
steps:
1427
- uses: actions/checkout@v4
1528
- uses: actions/setup-node@v4
1629
with:
1730
node-version: 20
31+
- run: npm install github-slugger puppeteer
1832
- run: node scripts/check-links/index.mjs --internal-only
1933

2034
external-links:
2135
name: Check external links
2236
runs-on: ubuntu-latest
23-
if: github.ref == 'refs/heads/main'
37+
if: >-
38+
github.event_name == 'workflow_dispatch' &&
39+
(github.event.inputs.check-type == 'all' ||
40+
github.event.inputs.check-type == 'external-only')
2441
continue-on-error: true
2542
steps:
2643
- uses: actions/checkout@v4
2744
- uses: actions/setup-node@v4
2845
with:
2946
node-version: 20
47+
- run: npm install github-slugger puppeteer
3048
- run: node scripts/check-links/index.mjs --external-only

.github/workflows/s3-deploy-development.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ on:
44
branches:
55
- develop
66
jobs:
7-
run:
7+
check-internal-links:
8+
name: Check internal links
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
- run: npm install github-slugger
16+
- run: node scripts/check-links/index.mjs --internal-only
17+
18+
deploy:
19+
needs: check-internal-links
820
runs-on: ubuntu-latest
921
environment: development
1022
env:
@@ -30,4 +42,4 @@ jobs:
3042
delete-removed: true
3143
# no-cache: true
3244
private: true
33-
# files-to-include: '{.*/**,**}'Add comment
45+
# files-to-include: '{.*/**,**}'

.github/workflows/s3-deploy-production.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ on:
44
branches:
55
- main
66
jobs:
7-
run:
7+
check-internal-links:
8+
name: Check internal links
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
- run: npm install github-slugger
16+
- run: node scripts/check-links/index.mjs --internal-only
17+
18+
deploy:
19+
needs: check-internal-links
820
runs-on: ubuntu-latest
921
environment: production
1022
env:

.github/workflows/translate.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20+
with:
21+
# Need parent commit to compute the diff
22+
fetch-depth: 2
2023

2124
# Hashes are gitignored but must persist between runs so --incremental
22-
# only re-translates files that actually changed since the last run.
25+
# only re-translates sections that actually changed within a file.
2326
# The key includes the commit SHA so each push creates a new entry;
2427
# restore-keys fetches the most recent previous entry as a fallback.
2528
- name: Restore translation hash cache
@@ -37,10 +40,46 @@ jobs:
3740
- name: Install dependencies
3841
run: npm ci
3942

43+
# Split the diff into added/modified files (to translate) and deleted files (to clean up).
44+
- name: Get changed translatable files
45+
id: diff
46+
run: |
47+
CHANGED=$(git diff --name-only --diff-filter=AMR HEAD^1 HEAD \
48+
| grep -E '^(src/content/docs/.+\.mdx|src/data/sidebars/.+\.json|src/api-reference/specs/[^./]+\.yaml)$' \
49+
| tr '\n' ',' | sed 's/,$//')
50+
DELETED=$(git diff --name-only --diff-filter=D HEAD^1 HEAD \
51+
| grep -E '^(src/content/docs/.+\.mdx|src/api-reference/specs/[^./]+\.yaml)$' \
52+
| tr '\n' ',' | sed 's/,$//')
53+
echo "files=$CHANGED" >> $GITHUB_OUTPUT
54+
echo "deleted=$DELETED" >> $GITHUB_OUTPUT
55+
4056
- name: Translate changed files
57+
if: steps.diff.outputs.files != ''
4158
env:
4259
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
43-
run: node scripts/translate.mjs --incremental
60+
run: node scripts/translate.mjs --incremental --only-files "${{ steps.diff.outputs.files }}"
61+
62+
# Remove translated files and hash caches for deleted source content.
63+
# Sidebars are intentionally excluded: deleting a sidebar JSON is rare and
64+
# rebuildSidebarLabels will naturally omit it on the next sidebar update.
65+
- name: Clean up deleted translations
66+
if: steps.diff.outputs.deleted != ''
67+
run: |
68+
for SRC_PATH in $(echo "${{ steps.diff.outputs.deleted }}" | tr ',' '\n'); do
69+
BASENAME=$(basename "$SRC_PATH")
70+
EXT="${BASENAME##*.}"
71+
NAME="${BASENAME%.*}"
72+
for LOCALE_DIR in src/locales/*/; do
73+
if [ "$EXT" = "mdx" ]; then
74+
rm -f "${LOCALE_DIR}${NAME}.mdx"
75+
rm -f "${LOCALE_DIR}.hashes/${NAME}.json"
76+
elif [ "$EXT" = "yaml" ]; then
77+
# Remove all localized variants: adapty-api.zh.yaml, etc.
78+
rm -f src/api-reference/specs/${NAME}.*.yaml
79+
rm -f "${LOCALE_DIR}.hashes/api-specs/${NAME}.json"
80+
fi
81+
done
82+
done
4483
4584
# Commit any new or updated locale files back to main.
4685
# This push triggers s3-deploy-production.yml, so the deploy that follows

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ yarn-error.log*
2424
/.idea
2525
/static/*
2626
!/static/api/
27+
/.claude/projects
2728

2829
/_temp
30+
/docs/superpowers
31+
/.superpowers
32+
.impeccable.md
2933

3034
# Translation
3135
.translate-batch-id
@@ -227,3 +231,4 @@ src/locales/zh/.hashes/
227231
/versioned_docs/version-3.0/sdk-installation-capacitor.md
228232

229233
.worktrees/
234+
_temp/

CLAUDE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,27 @@ These are layout/interactive components in `src/components/`, not imported by ar
164164
## Reference
165165

166166
Comprehensive component examples and writing guidelines: `TECH_WRITERS_README.md`
167+
168+
## Design Context
169+
170+
### Users
171+
Mobile developers (iOS, Android, React Native, Flutter, Unity, KMP, Capacitor) integrating Adapty's in-app purchase and subscription SDK. Technical, time-conscious, task-focused — they arrive to find an answer and get unblocked.
172+
173+
### Brand Personality
174+
**Reliable, clean, developer-first.** Direct and precise. No marketing fluff. Trust is earned by making the right answer obvious and getting out of the developer's way.
175+
176+
### Emotional Goals
177+
Developers should feel **confident** (know exactly what to do), **fast** (find things without hunting), and **welcomed** (smooth onboarding, low barrier to entry).
178+
179+
### Reference
180+
**Stripe Docs** — authoritative, information-dense but scannable, strong typographic hierarchy, no decoration for decoration's sake.
181+
182+
### Anti-References
183+
No heavy animations, neon gradients, or glassmorphism. No generic corporate feel. No cluttered sidebars or competing CTAs. No playful/toy-like UI — this is a technical reference.
184+
185+
### Design Principles
186+
1. **Clarity over cleverness** — every decision serves comprehension, nothing else
187+
2. **Scannability first** — headers, code blocks, callouts, and step numbers are navigation anchors
188+
3. **Trust through restraint** — one brand color (`#6720ff`), subtle shadows, consistent spacing
189+
4. **Code is first-class** — code blocks, syntax highlighting, copy buttons must be beautiful in both themes
190+
5. **Dark mode is equal, not secondary** — full design target, no contrast or legibility compromises

TECH_WRITERS_README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,17 @@ Display images with click-to-zoom functionality. Automatically resolves images f
116116
- `width` (optional): Image width, default: "700px"
117117
- `alt` (optional): Alt text, defaults to filename
118118
- `className` (optional): Additional CSS classes
119+
- `href` (optional): URL to link the image to. Disables zoom — the image becomes a clickable link instead.
119120

120121
**Usage:**
121122

122123
```mdx
123124
import ZoomImage from '@site/src/components/ZoomImage.astro';
124125

125126
<ZoomImage id="screenshot.png" width="700px" alt="Dashboard screenshot" />
127+
128+
{/* Image as a link (no zoom) */}
129+
<ZoomImage id="banner.webp" href="https://example.com" alt="Click to visit" />
126130
```
127131

128132
**Image resolution:**

astro.config.mjs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,20 @@ export default defineConfig({
2727
inlineStylesheets: 'never',
2828
},
2929
vite: {
30-
plugins: [tailwindcss()],
30+
plugins: [
31+
tailwindcss(),
32+
],
33+
server: {
34+
watch: {
35+
ignored: [
36+
'**/.DS_Store',
37+
'**/.Spotlight-V100/**',
38+
'**/.DocumentRevisions-V100/**',
39+
'**/.astro/content-modules.mjs',
40+
'**/src/assets/**',
41+
],
42+
},
43+
},
3144
define: {
3245
global: 'window',
3346
'process.env': '{}',

0 commit comments

Comments
 (0)