docs: add it tr id pl publish locales

This commit is contained in:
Peter Steinberger 2026-04-05 14:37:08 +01:00
parent 1d2d70a8fd
commit 7e29e84fa4
No known key found for this signature in database
12 changed files with 133 additions and 9 deletions

View File

@ -26,7 +26,11 @@ jobs:
translate-ko-release \
translate-de-release \
translate-fr-release \
translate-ar-release
translate-ar-release \
translate-it-release \
translate-tr-release \
translate-id-release \
translate-pl-release
do
gh api repos/openclaw/docs/dispatches \
--method POST \

View File

@ -83,11 +83,11 @@
## Docs i18n (generated publish locales)
- Generated publish output lives in the sibling `openclaw-docs` repo; do not add or edit `docs/zh-CN/**`, `docs/ja-JP/**`, `docs/es/**`, `docs/pt-BR/**`, `docs/ko/**`, `docs/de/**`, `docs/fr/**`, or `docs/ar/**` here.
- Pipeline: update English docs here → adjust glossary (`docs/.i18n/glossary.zh-CN.json`, `docs/.i18n/glossary.ja-JP.json`, `docs/.i18n/glossary.es.json`, `docs/.i18n/glossary.pt-BR.json`, `docs/.i18n/glossary.ko.json`, `docs/.i18n/glossary.de.json`, `docs/.i18n/glossary.fr.json`, `docs/.i18n/glossary.ar.json`) → let the publish-repo sync + `scripts/docs-i18n` run in `openclaw-docs` → apply targeted fixes only if instructed.
- Generated publish output lives in the sibling `openclaw-docs` repo; do not add or edit `docs/zh-CN/**`, `docs/ja-JP/**`, `docs/es/**`, `docs/pt-BR/**`, `docs/ko/**`, `docs/de/**`, `docs/fr/**`, `docs/ar/**`, `docs/it/**`, `docs/tr/**`, `docs/id/**`, or `docs/pl/**` here.
- Pipeline: update English docs here → adjust glossary (`docs/.i18n/glossary.zh-CN.json`, `docs/.i18n/glossary.ja-JP.json`, `docs/.i18n/glossary.es.json`, `docs/.i18n/glossary.pt-BR.json`, `docs/.i18n/glossary.ko.json`, `docs/.i18n/glossary.de.json`, `docs/.i18n/glossary.fr.json`, `docs/.i18n/glossary.ar.json`, `docs/.i18n/glossary.it.json`, `docs/.i18n/glossary.tr.json`, `docs/.i18n/glossary.id.json`, `docs/.i18n/glossary.pl.json`) → let the publish-repo sync + `scripts/docs-i18n` run in `openclaw-docs` → apply targeted fixes only if instructed.
- Before rerunning `scripts/docs-i18n`, add glossary entries for any new technical terms, page titles, or short nav labels that must stay in English or use a fixed translation (for example `Doctor` or `Polls`).
- `pnpm docs:check-i18n-glossary` enforces glossary coverage for changed English doc titles and short internal doc labels before translation reruns.
- Translation memory: locale TM files such as `docs/.i18n/zh-CN.tm.jsonl`, `docs/.i18n/ja-JP.tm.jsonl`, `docs/.i18n/es.tm.jsonl`, `docs/.i18n/pt-BR.tm.jsonl`, `docs/.i18n/ko.tm.jsonl`, `docs/.i18n/de.tm.jsonl`, `docs/.i18n/fr.tm.jsonl`, and `docs/.i18n/ar.tm.jsonl` (generated in the publish repo).
- Translation memory: locale TM files such as `docs/.i18n/zh-CN.tm.jsonl`, `docs/.i18n/ja-JP.tm.jsonl`, `docs/.i18n/es.tm.jsonl`, `docs/.i18n/pt-BR.tm.jsonl`, `docs/.i18n/ko.tm.jsonl`, `docs/.i18n/de.tm.jsonl`, `docs/.i18n/fr.tm.jsonl`, `docs/.i18n/ar.tm.jsonl`, `docs/.i18n/it.tm.jsonl`, `docs/.i18n/tr.tm.jsonl`, `docs/.i18n/id.tm.jsonl`, and `docs/.i18n/pl.tm.jsonl` (generated in the publish repo).
- See `docs/.i18n/README.md`.
- The pipeline can be slow/inefficient; if its dragging, ping @jospalmbier on Discord instead of hacking around it.

View File

@ -11,7 +11,7 @@ Generated locale trees and live translation memory now live in the publish repo:
- English docs are authored in `openclaw/openclaw`.
- The source docs tree lives under `docs/`.
- The source repo no longer keeps committed generated locale trees such as `docs/zh-CN/**`, `docs/ja-JP/**`, `docs/es/**`, `docs/pt-BR/**`, `docs/ko/**`, `docs/de/**`, `docs/fr/**`, or `docs/ar/**`.
- The source repo no longer keeps committed generated locale trees such as `docs/zh-CN/**`, `docs/ja-JP/**`, `docs/es/**`, `docs/pt-BR/**`, `docs/ko/**`, `docs/de/**`, `docs/fr/**`, `docs/ar/**`, `docs/it/**`, `docs/tr/**`, `docs/id/**`, or `docs/pl/**`.
## End-to-end flow
@ -21,7 +21,7 @@ Generated locale trees and live translation memory now live in the publish repo:
4. The sync script rewrites the publish `docs/docs.json` so the generated locale picker blocks exist there even though they are no longer committed in the source repo.
5. `openclaw/docs/.github/workflows/translate-zh-cn.yml` refreshes `docs/zh-CN/**` once a day, on demand, and after source-repo release dispatches.
6. `openclaw/docs/.github/workflows/translate-ja-jp.yml` does the same for `docs/ja-JP/**`.
7. `openclaw/docs/.github/workflows/translate-es.yml`, `translate-pt-br.yml`, `translate-ko.yml`, `translate-de.yml`, `translate-fr.yml`, and `translate-ar.yml` do the same for `docs/es/**`, `docs/pt-BR/**`, `docs/ko/**`, `docs/de/**`, `docs/fr/**`, and `docs/ar/**`.
7. `openclaw/docs/.github/workflows/translate-es.yml`, `translate-pt-br.yml`, `translate-ko.yml`, `translate-de.yml`, `translate-fr.yml`, `translate-ar.yml`, `translate-it.yml`, `translate-tr.yml`, `translate-id.yml`, and `translate-pl.yml` do the same for `docs/es/**`, `docs/pt-BR/**`, `docs/ko/**`, `docs/de/**`, `docs/fr/**`, `docs/ar/**`, `docs/it/**`, `docs/tr/**`, `docs/id/**`, and `docs/pl/**`.
## Why the split exists
@ -33,10 +33,10 @@ Generated locale trees and live translation memory now live in the publish repo:
- `glossary.<lang>.json` — preferred term mappings used as prompt guidance.
- `zh-Hans-navigation.json` — curated zh-Hans Mintlify locale navigation reinserted into the publish repo during sync.
- `ar-navigation.json`, `de-navigation.json`, `es-navigation.json`, `fr-navigation.json`, `ja-navigation.json`, `ko-navigation.json`, `pt-BR-navigation.json` — starter locale metadata kept alongside the source repo, but the publish sync now clones the full English nav tree for these locales so translated pages are visible in Mintlify without hand-maintaining per-locale nav JSON.
- `ar-navigation.json`, `de-navigation.json`, `es-navigation.json`, `fr-navigation.json`, `id-navigation.json`, `it-navigation.json`, `ja-navigation.json`, `ko-navigation.json`, `pl-navigation.json`, `pt-BR-navigation.json`, `tr-navigation.json` — starter locale metadata kept alongside the source repo, but the publish sync now clones the full English nav tree for these locales so translated pages are visible in Mintlify without hand-maintaining per-locale nav JSON.
- `<lang>.tm.jsonl` — translation memory keyed by workflow + model + text hash.
In this repo, generated locale TM files such as `docs/.i18n/zh-CN.tm.jsonl`, `docs/.i18n/ja-JP.tm.jsonl`, `docs/.i18n/es.tm.jsonl`, `docs/.i18n/pt-BR.tm.jsonl`, `docs/.i18n/ko.tm.jsonl`, `docs/.i18n/de.tm.jsonl`, `docs/.i18n/fr.tm.jsonl`, and `docs/.i18n/ar.tm.jsonl` are intentionally no longer committed.
In this repo, generated locale TM files such as `docs/.i18n/zh-CN.tm.jsonl`, `docs/.i18n/ja-JP.tm.jsonl`, `docs/.i18n/es.tm.jsonl`, `docs/.i18n/pt-BR.tm.jsonl`, `docs/.i18n/ko.tm.jsonl`, `docs/.i18n/de.tm.jsonl`, `docs/.i18n/fr.tm.jsonl`, `docs/.i18n/ar.tm.jsonl`, `docs/.i18n/it.tm.jsonl`, `docs/.i18n/tr.tm.jsonl`, `docs/.i18n/id.tm.jsonl`, and `docs/.i18n/pl.tm.jsonl` are intentionally no longer committed.
## Glossary format
@ -62,7 +62,7 @@ Fields:
- If the pending count is `0`, the expensive translation step is skipped entirely.
- If there are pending files, the workflow translates only those files.
- The publish workflow retries transient model-format failures, but unchanged files stay skipped because the same hash check runs on each retry.
- The source repo also dispatches zh-CN, ja-JP, es, pt-BR, ko, de, fr, and ar refreshes after published GitHub releases so release docs can catch up without waiting for the daily cron.
- The source repo also dispatches zh-CN, ja-JP, es, pt-BR, ko, de, fr, ar, it, tr, id, and pl refreshes after published GitHub releases so release docs can catch up without waiting for the daily cron.
## Operational notes

View File

@ -0,0 +1,5 @@
[
{ "source": "CLI", "target": "CLI" },
{ "source": "Mintlify", "target": "Mintlify" },
{ "source": "OpenClaw", "target": "OpenClaw" }
]

View File

@ -0,0 +1,5 @@
[
{ "source": "CLI", "target": "CLI" },
{ "source": "Mintlify", "target": "Mintlify" },
{ "source": "OpenClaw", "target": "OpenClaw" }
]

View File

@ -0,0 +1,5 @@
[
{ "source": "CLI", "target": "CLI" },
{ "source": "Mintlify", "target": "Mintlify" },
{ "source": "OpenClaw", "target": "OpenClaw" }
]

View File

@ -0,0 +1,5 @@
[
{ "source": "CLI", "target": "CLI" },
{ "source": "Mintlify", "target": "Mintlify" },
{ "source": "OpenClaw", "target": "OpenClaw" }
]

View File

@ -0,0 +1,18 @@
{
"language": "id",
"tabs": [
{
"tab": "Mulai",
"groups": [
{
"group": "Ringkasan",
"pages": ["id/index"]
},
{
"group": "Langkah pertama",
"pages": ["id/start/getting-started", "id/start/wizard"]
}
]
}
]
}

View File

@ -0,0 +1,18 @@
{
"language": "it",
"tabs": [
{
"tab": "Inizia",
"groups": [
{
"group": "Panoramica",
"pages": ["it/index"]
},
{
"group": "Primi passi",
"pages": ["it/start/getting-started", "it/start/wizard"]
}
]
}
]
}

View File

@ -0,0 +1,18 @@
{
"language": "pl",
"tabs": [
{
"tab": "Start",
"groups": [
{
"group": "Przeglad",
"pages": ["pl/index"]
},
{
"group": "Pierwsze kroki",
"pages": ["pl/start/getting-started", "pl/start/wizard"]
}
]
}
]
}

View File

@ -0,0 +1,18 @@
{
"language": "tr",
"tabs": [
{
"tab": "Baslangic",
"groups": [
{
"group": "Genel bakis",
"pages": ["tr/index"]
},
{
"group": "Ilk adimlar",
"pages": ["tr/start/getting-started", "tr/start/wizard"]
}
]
}
]
}

View File

@ -66,6 +66,34 @@ const GENERATED_LOCALES = [
tmFile: "ar.tm.jsonl",
navMode: "clone-en",
},
{
language: "it",
dir: "it",
navFile: "it-navigation.json",
tmFile: "it.tm.jsonl",
navMode: "clone-en",
},
{
language: "tr",
dir: "tr",
navFile: "tr-navigation.json",
tmFile: "tr.tm.jsonl",
navMode: "clone-en",
},
{
language: "id",
dir: "id",
navFile: "id-navigation.json",
tmFile: "id.tm.jsonl",
navMode: "clone-en",
},
{
language: "pl",
dir: "pl",
navFile: "pl-navigation.json",
tmFile: "pl.tm.jsonl",
navMode: "clone-en",
},
];
function parseArgs(argv) {