diff --git a/.github/workflows/docs-translate-trigger-release.yml b/.github/workflows/docs-translate-trigger-release.yml index c8ce379a4c0..acb5634074d 100644 --- a/.github/workflows/docs-translate-trigger-release.yml +++ b/.github/workflows/docs-translate-trigger-release.yml @@ -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 \ diff --git a/AGENTS.md b/AGENTS.md index 360f6a6b8a7..d617fac571c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 it’s dragging, ping @jospalmbier on Discord instead of hacking around it. diff --git a/docs/.i18n/README.md b/docs/.i18n/README.md index 7e165972ddc..262af939997 100644 --- a/docs/.i18n/README.md +++ b/docs/.i18n/README.md @@ -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..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. - `.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 diff --git a/docs/.i18n/glossary.id.json b/docs/.i18n/glossary.id.json new file mode 100644 index 00000000000..461226c5a1f --- /dev/null +++ b/docs/.i18n/glossary.id.json @@ -0,0 +1,5 @@ +[ + { "source": "CLI", "target": "CLI" }, + { "source": "Mintlify", "target": "Mintlify" }, + { "source": "OpenClaw", "target": "OpenClaw" } +] diff --git a/docs/.i18n/glossary.it.json b/docs/.i18n/glossary.it.json new file mode 100644 index 00000000000..461226c5a1f --- /dev/null +++ b/docs/.i18n/glossary.it.json @@ -0,0 +1,5 @@ +[ + { "source": "CLI", "target": "CLI" }, + { "source": "Mintlify", "target": "Mintlify" }, + { "source": "OpenClaw", "target": "OpenClaw" } +] diff --git a/docs/.i18n/glossary.pl.json b/docs/.i18n/glossary.pl.json new file mode 100644 index 00000000000..461226c5a1f --- /dev/null +++ b/docs/.i18n/glossary.pl.json @@ -0,0 +1,5 @@ +[ + { "source": "CLI", "target": "CLI" }, + { "source": "Mintlify", "target": "Mintlify" }, + { "source": "OpenClaw", "target": "OpenClaw" } +] diff --git a/docs/.i18n/glossary.tr.json b/docs/.i18n/glossary.tr.json new file mode 100644 index 00000000000..461226c5a1f --- /dev/null +++ b/docs/.i18n/glossary.tr.json @@ -0,0 +1,5 @@ +[ + { "source": "CLI", "target": "CLI" }, + { "source": "Mintlify", "target": "Mintlify" }, + { "source": "OpenClaw", "target": "OpenClaw" } +] diff --git a/docs/.i18n/id-navigation.json b/docs/.i18n/id-navigation.json new file mode 100644 index 00000000000..353e0d7d7d9 --- /dev/null +++ b/docs/.i18n/id-navigation.json @@ -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"] + } + ] + } + ] +} diff --git a/docs/.i18n/it-navigation.json b/docs/.i18n/it-navigation.json new file mode 100644 index 00000000000..135a75346d2 --- /dev/null +++ b/docs/.i18n/it-navigation.json @@ -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"] + } + ] + } + ] +} diff --git a/docs/.i18n/pl-navigation.json b/docs/.i18n/pl-navigation.json new file mode 100644 index 00000000000..313d72396f5 --- /dev/null +++ b/docs/.i18n/pl-navigation.json @@ -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"] + } + ] + } + ] +} diff --git a/docs/.i18n/tr-navigation.json b/docs/.i18n/tr-navigation.json new file mode 100644 index 00000000000..55e8b9a159b --- /dev/null +++ b/docs/.i18n/tr-navigation.json @@ -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"] + } + ] + } + ] +} diff --git a/scripts/docs-sync-publish.mjs b/scripts/docs-sync-publish.mjs index d322f1eafa0..e8eef0d8018 100644 --- a/scripts/docs-sync-publish.mjs +++ b/scripts/docs-sync-publish.mjs @@ -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) {