Compare commits

..

2 Commits

Author SHA1 Message Date
ViditOstwal
a18c373ac5 docs: add fence language tags in DOCS_TRANSLATIONS.md
Mark the checklist and example output blocks with markdown and text
identifiers for correct rendering.
2026-08-07 00:29:16 +05:30
ViditOstwal
140fdd045c docs: add DOCS_TRANSLATIONS workflow for locale sync
Document how to git-detect English MDX changes and sync ar, ko, and pt-BR
translations, and reference it from AGENTS.md.
2026-08-07 00:20:01 +05:30
2 changed files with 83 additions and 0 deletions

View File

@@ -24,3 +24,5 @@ Follow these guidelines when contributing:
may reference them.
4. If you want to preview your changes locally, use `cd docs && mintlify dev`.
To check for broken links, run `cd docs && mintlify broken-links`.
5. After editing English docs, sync translations to `ar`, `ko`, and `pt-BR`
before finishing the task. Follow [DOCS_TRANSLATIONS.md](DOCS_TRANSLATIONS.md).

81
DOCS_TRANSLATIONS.md Normal file
View File

@@ -0,0 +1,81 @@
# Sync Docs Translations
After English documentation changes, sync the same updates to Arabic (`ar`),
Korean (`ko`), and Brazilian Portuguese (`pt-BR`).
Supported locales: `ar`, `ko`, `pt-BR`.
## Step 1 — Find changed English files with git
From the repo root:
```bash
# Uncommitted changes (staged or unstaged)
git diff --name-only HEAD -- docs/edge/en/
# All changes on this branch vs main
git diff --name-only main...HEAD -- docs/edge/en/
# Newly added files
git status --porcelain docs/edge/en/
```
Only process `*.mdx` under `docs/edge/en/`. Do not edit `docs/v*/` snapshots.
## Step 2 — Map each file to locale targets
For `docs/edge/en/<path>.mdx`, update or create:
- `docs/edge/ar/<path>.mdx`
- `docs/edge/ko/<path>.mdx`
- `docs/edge/pt-BR/<path>.mdx`
If English is a **new page**, also add matching entries in `docs/docs.json`
navigation for each locale.
## Step 3 — Translate
Use the updated English file as source of truth. When locale files already
exist, apply the same semantic change — do not rewrite unrelated sections.
Rules:
- Translate prose and frontmatter values (`title`, `description`, `sidebarTitle`)
- Keep MDX/JSX tags, code blocks, URLs, and identifiers unchanged
- Keep terms like Agent, Crew, Task, Flow, LLM, API, CLI, MCP in English where
appropriate
- Rewrite internal links: `/en/``/{lang}/` (`/ar/`, `/ko/`, `/pt-BR/`)
- Do not add translator notes
## Step 4 — Verify (optional)
```bash
cd docs && mintlify broken-links
```
Commit English and locale files together.
## Checklist
```markdown
- [ ] Git: listed changed docs/edge/en/*.mdx files
- [ ] ar: updated/created matching files
- [ ] ko: updated/created matching files
- [ ] pt-BR: updated/created matching files
- [ ] Links use /{lang}/ prefix; code blocks unchanged
- [ ] docs/docs.json updated if new English page added
```
## Example
`git diff --name-only HEAD -- docs/edge/en/` returns:
```text
docs/edge/en/concepts/llms.mdx
```
Update:
- `docs/edge/ar/concepts/llms.mdx`
- `docs/edge/ko/concepts/llms.mdx`
- `docs/edge/pt-BR/concepts/llms.mdx`