From dbfd96f4eca2b3ed1f1fa6e4351718fb9dc82232 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 5 Apr 2026 11:32:46 +0100 Subject: [PATCH] docs: move ja-JP output to publish repo --- .../docs-translate-trigger-release.yml | 13 ++ AGENTS.md | 8 +- docs/.i18n/README.md | 16 +- docs/.i18n/ja-JP.tm.jsonl | 0 docs/.i18n/ja-navigation.json | 18 ++ docs/docs.json | 18 -- docs/ja-JP/index.md | 186 ------------------ docs/ja-JP/start/getting-started.md | 125 ------------ docs/ja-JP/start/wizard.md | 77 -------- scripts/docs-sync-publish.mjs | 32 ++- 10 files changed, 70 insertions(+), 423 deletions(-) delete mode 100644 docs/.i18n/ja-JP.tm.jsonl create mode 100644 docs/.i18n/ja-navigation.json delete mode 100644 docs/ja-JP/index.md delete mode 100644 docs/ja-JP/start/getting-started.md delete mode 100644 docs/ja-JP/start/wizard.md diff --git a/.github/workflows/docs-translate-trigger-release.yml b/.github/workflows/docs-translate-trigger-release.yml index 820927666f3..67b31ed01d5 100644 --- a/.github/workflows/docs-translate-trigger-release.yml +++ b/.github/workflows/docs-translate-trigger-release.yml @@ -24,3 +24,16 @@ jobs: -f client_payload[release_tag]="${RELEASE_TAG}" \ -f client_payload[source_repository]="${GITHUB_REPOSITORY}" \ -f client_payload[source_sha]="${GITHUB_SHA}" + + - name: Trigger ja-JP translate in publish repo + env: + GH_TOKEN: ${{ secrets.OPENCLAW_DOCS_SYNC_TOKEN }} + RELEASE_TAG: ${{ github.event.release.tag_name }} + run: | + set -euo pipefail + gh api repos/openclaw/docs/dispatches \ + --method POST \ + -f event_type='translate-ja-jp-release' \ + -f client_payload[release_tag]="${RELEASE_TAG}" \ + -f client_payload[source_repository]="${GITHUB_REPOSITORY}" \ + -f client_payload[source_sha]="${GITHUB_SHA}" diff --git a/AGENTS.md b/AGENTS.md index ca7c65d8dcc..e1ffa0a33ea 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -81,13 +81,13 @@ - README (GitHub): keep absolute docs URLs (`https://docs.openclaw.ai/...`) so links work on GitHub. - Docs content must be generic: no personal device names/hostnames/paths; use placeholders like `user@gateway-host` and “gateway host”. -## Docs i18n (zh-CN) +## Docs i18n (zh-CN / ja-JP) -- Simplified Chinese publish output lives in the sibling `openclaw-docs` repo; do not add or edit `docs/zh-CN/**` here. -- Pipeline: update English docs here → adjust glossary (`docs/.i18n/glossary.zh-CN.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/**` or `docs/ja-JP/**` here. +- Pipeline: update English docs here → adjust glossary (`docs/.i18n/glossary.zh-CN.json`, `docs/.i18n/glossary.ja-JP.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: `docs/.i18n/zh-CN.tm.jsonl` (generated). +- Translation memory: `docs/.i18n/zh-CN.tm.jsonl` and `docs/.i18n/ja-JP.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 75cbaea19ab..60c54b6dc07 100644 --- a/docs/.i18n/README.md +++ b/docs/.i18n/README.md @@ -2,7 +2,7 @@ This folder stores translation config for the source docs repo. -Generated zh-CN pages and the live zh-CN translation memory live in the publish repo: +Generated locale trees and live translation memory now live in the publish repo: - repo: `openclaw/docs` - local checkout: `~/Projects/openclaw-docs` @@ -11,7 +11,7 @@ Generated zh-CN pages and the live zh-CN translation memory live in the publish - English docs are authored in `openclaw/openclaw`. - The source docs tree lives under `docs/`. -- The source repo no longer keeps committed `docs/zh-CN/**`. +- The source repo no longer keeps committed generated locale trees such as `docs/zh-CN/**` or `docs/ja-JP/**`. ## End-to-end flow @@ -20,20 +20,22 @@ Generated zh-CN pages and the live zh-CN translation memory live in the publish 3. `openclaw/openclaw/.github/workflows/docs-sync-publish.yml` mirrors the docs tree into `openclaw/docs`. 4. The sync script rewrites the publish `docs/docs.json` so `zh-Hans` navigation exists there even though it is 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/**`. ## Why the split exists -- Keep generated zh-CN output out of the main product repo. +- Keep generated locale output out of the main product repo. - Keep Mintlify on a single published docs tree. -- Preserve the built-in language switcher by letting the publish repo own `docs/zh-CN/**`. +- Preserve the built-in language switcher by letting the publish repo own generated locale trees. ## Files in this folder - `glossary..json` — preferred term mappings used as prompt guidance. +- `ja-navigation.json` — the `ja` Mintlify nav block reinserted into the publish repo during sync. - `zh-Hans-navigation.json` — the `zh-Hans` Mintlify nav block reinserted into the publish repo during sync. - `.tm.jsonl` — translation memory keyed by workflow + model + text hash. -In this repo, `docs/.i18n/zh-CN.tm.jsonl` is intentionally no longer committed. +In this repo, generated locale TM files such as `docs/.i18n/zh-CN.tm.jsonl` and `docs/.i18n/ja-JP.tm.jsonl` are intentionally no longer committed. ## Glossary format @@ -57,11 +59,11 @@ Fields: - `scripts/docs-i18n` still owns translation generation. - Doc mode writes `x-i18n.source_hash` into each translated page. -- The publish workflow precomputes a pending file list by comparing the current English source hash to the stored zh-CN `x-i18n.source_hash`. +- Each publish workflow precomputes a pending file list by comparing the current English source hash to the stored locale `x-i18n.source_hash`. - 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 a zh-CN refresh after published GitHub releases so release docs can catch up without waiting for the daily cron. +- The source repo also dispatches zh-CN and ja-JP refreshes after published GitHub releases so release docs can catch up without waiting for the daily cron. ## Operational notes diff --git a/docs/.i18n/ja-JP.tm.jsonl b/docs/.i18n/ja-JP.tm.jsonl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/.i18n/ja-navigation.json b/docs/.i18n/ja-navigation.json new file mode 100644 index 00000000000..b15a7c59a3d --- /dev/null +++ b/docs/.i18n/ja-navigation.json @@ -0,0 +1,18 @@ +{ + "language": "ja", + "tabs": [ + { + "tab": "はじめに", + "groups": [ + { + "group": "概要", + "pages": ["ja-JP/index"] + }, + { + "group": "初回セットアップ", + "pages": ["ja-JP/start/getting-started", "ja-JP/start/wizard"] + } + ] + } + ] +} diff --git a/docs/docs.json b/docs/docs.json index f1cbbfb3ddc..53fa30af168 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1594,24 +1594,6 @@ ] } ] - }, - { - "language": "ja", - "tabs": [ - { - "tab": "はじめに", - "groups": [ - { - "group": "概要", - "pages": ["ja-JP/index"] - }, - { - "group": "初回セットアップ", - "pages": ["ja-JP/start/getting-started", "ja-JP/start/wizard"] - } - ] - } - ] } ] } diff --git a/docs/ja-JP/index.md b/docs/ja-JP/index.md deleted file mode 100644 index 54211bcf8a8..00000000000 --- a/docs/ja-JP/index.md +++ /dev/null @@ -1,186 +0,0 @@ ---- -read_when: - - 新規ユーザーにOpenClawを紹介するとき -summary: OpenClawは、あらゆるOSで動作するAIエージェント向けのマルチチャネルgatewayです。 -title: OpenClaw -x-i18n: - generated_at: "2026-02-08T17:15:47Z" - model: claude-opus-4-6 - provider: pi - source_hash: fc8babf7885ef91d526795051376d928599c4cf8aff75400138a0d7d9fa3b75f - source_path: index.md - workflow: 15 ---- - -# OpenClaw 🦞 - -

- OpenClaw - -

- -> _「EXFOLIATE! EXFOLIATE!」_ — たぶん宇宙ロブスター - -

- WhatsApp、Telegram、Discord、iMessageなどに対応した、あらゆるOS向けのAIエージェントgateway。
- メッセージを送信すれば、ポケットからエージェントの応答を受け取れます。プラグインでMattermostなどを追加できます。 -

- - - - OpenClawをインストールし、数分でGatewayを起動できます。 - - - `openclaw onboard`とペアリングフローによるガイド付きセットアップ。 - - - チャット、設定、セッション用のブラウザダッシュボードを起動します。 - - - -OpenClawは、単一のGatewayプロセスを通じてチャットアプリをPiのようなコーディングエージェントに接続します。OpenClawアシスタントを駆動し、ローカルまたはリモートのセットアップをサポートします。 - -## 仕組み - -```mermaid -flowchart LR - A["チャットアプリ + プラグイン"] --> B["Gateway"] - B --> C["Piエージェント"] - B --> D["CLI"] - B --> E["Web Control UI"] - B --> F["macOSアプリ"] - B --> G["iOSおよびAndroidノード"] -``` - -Gatewayは、セッション、ルーティング、チャネル接続の信頼できる唯一の情報源です。 - -## 主な機能 - - - - 単一のGatewayプロセスでWhatsApp、Telegram、Discord、iMessageに対応。 - - - 拡張パッケージでMattermostなどを追加。 - - - エージェント、ワークスペース、送信者ごとに分離されたセッション。 - - - 画像、音声、ドキュメントの送受信。 - - - チャット、設定、セッション、ノード用のブラウザダッシュボード。 - - - Canvas対応のiOSおよびAndroidノードをペアリング。 - - - -## クイックスタート - - - - ```bash - npm install -g openclaw@latest - ``` - - - ```bash - openclaw onboard --install-daemon - ``` - - - ```bash - openclaw channels login - openclaw gateway --port 18789 - ``` - - - -完全なインストールと開発セットアップが必要ですか?[クイックスタート](/start/quickstart)をご覧ください。 - -## ダッシュボード - -Gatewayの起動後、ブラウザでControl UIを開きます。 - -- ローカルデフォルト: [http://127.0.0.1:18789/](http://127.0.0.1:18789/) -- リモートアクセス: [Webサーフェス](/web)および[Tailscale](/gateway/tailscale) - -

- OpenClaw -

- -## 設定(オプション) - -設定は`~/.openclaw/openclaw.json`にあります。 - -- **何もしなければ**、OpenClawはバンドルされたPiバイナリをRPCモードで使用し、送信者ごとのセッションを作成します。 -- 制限を設けたい場合は、`channels.whatsapp.allowFrom`と(グループの場合)メンションルールから始めてください。 - -例: - -```json5 -{ - channels: { - whatsapp: { - allowFrom: ["+15555550123"], - groups: { "*": { requireMention: true } }, - }, - }, - messages: { groupChat: { mentionPatterns: ["@openclaw"] } }, -} -``` - -## ここから始める - - - - ユースケース別に整理されたすべてのドキュメントとガイド。 - - - Gatewayのコア設定、トークン、プロバイダー設定。 - - - SSHおよびtailnetアクセスパターン。 - - - WhatsApp、Telegram、Discordなどのチャネル固有のセットアップ。 - - - ペアリングとCanvas対応のiOSおよびAndroidノード。 - - - 一般的な修正とトラブルシューティングのエントリーポイント。 - - - -## 詳細 - - - - チャネル、ルーティング、メディア機能の完全な一覧。 - - - ワークスペースの分離とエージェントごとのセッション。 - - - トークン、許可リスト、安全制御。 - - - Gatewayの診断と一般的なエラー。 - - - プロジェクトの起源、貢献者、ライセンス。 - - diff --git a/docs/ja-JP/start/getting-started.md b/docs/ja-JP/start/getting-started.md deleted file mode 100644 index 6e858bff3dd..00000000000 --- a/docs/ja-JP/start/getting-started.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -read_when: - - ゼロからの初回セットアップ - - 動作するチャットへの最短ルートを知りたい -summary: OpenClawをインストールし、数分で最初のチャットを実行しましょう。 -title: はじめに -x-i18n: - generated_at: "2026-02-08T17:15:16Z" - model: claude-opus-4-6 - provider: pi - source_hash: 27aeeb3d18c495380e94e6b011b0df3def518535c9f1eee504f04871d8a32269 - source_path: start/getting-started.md - workflow: 15 ---- - -# はじめに - -目標:ゼロから最小限のセットアップで最初の動作するチャットを実現する。 - - -最速のチャット方法:Control UIを開く(チャンネル設定は不要)。`openclaw dashboard`を実行してブラウザでチャットするか、Gatewayホストで`http://127.0.0.1:18789/`を開きます。 -ドキュメント:[Dashboard](/web/dashboard)と[Control UI](/web/control-ui)。 - - -## 前提条件 - -- Node 22以降 - - -不明な場合は`node --version`でNodeのバージョンを確認してください。 - - -## クイックセットアップ(CLI) - - - - - - ```bash - curl -fsSL https://openclaw.ai/install.sh | bash - ``` - - - ```powershell - iwr -useb https://openclaw.ai/install.ps1 | iex - ``` - - - - - その他のインストール方法と要件:[インストール](/install)。 - - - - - ```bash - openclaw onboard --install-daemon - ``` - - ウィザードは認証、Gateway設定、およびオプションのチャンネルを構成します。 - 詳細は[オンボーディングウィザード](/start/wizard)を参照してください。 - - - - サービスをインストールした場合、すでに実行されているはずです: - - ```bash - openclaw gateway status - ``` - - - - ```bash - openclaw dashboard - ``` - - - - -Control UIが読み込まれれば、Gatewayは使用可能な状態です。 - - -## オプションの確認と追加機能 - - - - クイックテストやトラブルシューティングに便利です。 - - ```bash - openclaw gateway --port 18789 - ``` - - - - 構成済みのチャンネルが必要です。 - - ```bash - openclaw message send --target +15555550123 --message "Hello from OpenClaw" - ``` - - - - -## さらに詳しく - - - - 完全なCLIウィザードリファレンスと高度なオプション。 - - - macOSアプリの初回実行フロー。 - - - -## 完了後の状態 - -- 実行中のGateway -- 構成済みの認証 -- Control UIアクセスまたは接続済みのチャンネル - -## 次のステップ - -- DMの安全性と承認:[ペアリング](/channels/pairing) -- さらにチャンネルを接続:[チャンネル](/channels) -- 高度なワークフローとソースからのビルド:[セットアップ](/start/setup) diff --git a/docs/ja-JP/start/wizard.md b/docs/ja-JP/start/wizard.md deleted file mode 100644 index baa25d8255d..00000000000 --- a/docs/ja-JP/start/wizard.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -read_when: - - オンボーディングウィザードの実行または設定時 - - 新しいマシンのセットアップ時 -sidebarTitle: Wizard (CLI) -summary: CLIオンボーディングウィザード:Gateway、ワークスペース、チャンネル、Skillsの対話式セットアップ -title: オンボーディングウィザード(CLI) -x-i18n: - generated_at: "2026-02-08T17:15:18Z" - model: claude-opus-4-6 - provider: pi - source_hash: 9a650d46044a930aa4aaec30b35f1273ca3969bf676ab67bf4e1575b5c46db4c - source_path: start/wizard.md - workflow: 15 ---- - -# オンボーディングウィザード(CLI) - -CLIオンボーディングウィザードは、macOS、Linux、Windows(WSL2経由)でOpenClawをセットアップする際の推奨パスです。ローカルGatewayまたはリモートGateway接続に加えて、ワークスペースのデフォルト設定、チャンネル、Skillsを構成します。 - -```bash -openclaw onboard -``` - - -最速で初回チャットを開始する方法:Control UI を開きます(チャンネル設定は不要)。`openclaw dashboard` を実行してブラウザでチャットできます。ドキュメント:[Dashboard](/web/dashboard)。 - - -## クイックスタート vs 詳細設定 - -ウィザードは**クイックスタート**(デフォルト設定)と**詳細設定**(完全な制御)のどちらかを選択して開始します。 - - - - - loopback上のローカルGateway - - 既存のワークスペースまたはデフォルトワークスペース - - Gatewayポート `18789` - - Gateway認証トークンは自動生成(loopback上でも生成されます) - - Tailscale公開はオフ - - TelegramとWhatsAppのDMはデフォルトで許可リスト(電話番号の入力を求められる場合があります) - - - - モード、ワークスペース、Gateway、チャンネル、デーモン、Skillsの完全なプロンプトフローを表示 - - - -## CLIオンボーディングの詳細 - - - - ローカルおよびリモートフローの完全な説明、認証とモデルマトリックス、設定出力、ウィザードRPC、signal-cliの動作。 - - - 非対話式オンボーディングのレシピと自動化された `agents add` の例。 - - - -## よく使うフォローアップコマンド - -```bash -openclaw configure -openclaw agents add -``` - - -`--json` は非対話モードを意味しません。スクリプトでは `--non-interactive` を使用してください。 - - - -推奨:エージェントが `web_search` を使用できるように、Brave Search APIキーを設定してください(`web_fetch` はキーなしで動作します)。最も簡単な方法:`openclaw configure --section web` を実行すると `plugins.entries.brave.config.webSearch.apiKey` に保存されます。旧 `tools.web.search.apiKey` パスは互換用に引き続き読み込まれますが、新しい設定では使用しないでください。ドキュメント:[Webツール](/tools/web)。 - - -## 関連ドキュメント - -- CLIコマンドリファレンス:[`openclaw onboard`](/cli/onboard) -- macOSアプリのオンボーディング:[オンボーディング](/start/onboarding) -- エージェント初回起動の手順:[エージェントブートストラップ](/start/bootstrapping) diff --git a/scripts/docs-sync-publish.mjs b/scripts/docs-sync-publish.mjs index 071dd2b6673..67b5f514331 100644 --- a/scripts/docs-sync-publish.mjs +++ b/scripts/docs-sync-publish.mjs @@ -9,6 +9,8 @@ const HERE = path.dirname(fileURLToPath(import.meta.url)); const ROOT = path.resolve(HERE, ".."); const SOURCE_DOCS_DIR = path.join(ROOT, "docs"); const SOURCE_CONFIG_PATH = path.join(SOURCE_DOCS_DIR, "docs.json"); +const JA_NAV_PATH = path.join(SOURCE_DOCS_DIR, ".i18n", "ja-navigation.json"); +const JA_TM_PATH = path.join(SOURCE_DOCS_DIR, ".i18n", "ja-JP.tm.jsonl"); const ZH_NAV_PATH = path.join(SOURCE_DOCS_DIR, ".i18n", "zh-Hans-navigation.json"); const ZH_TM_PATH = path.join(SOURCE_DOCS_DIR, ".i18n", "zh-CN.tm.jsonl"); @@ -69,6 +71,7 @@ function writeJson(filePath, value) { function composeDocsConfig() { const sourceConfig = readJson(SOURCE_CONFIG_PATH); + const jaNavigation = readJson(JA_NAV_PATH); const zhNavigation = readJson(ZH_NAV_PATH); const languages = sourceConfig?.navigation?.languages; @@ -76,19 +79,22 @@ function composeDocsConfig() { throw new Error("docs/docs.json is missing navigation.languages"); } - const withoutZh = languages.filter((entry) => entry?.language !== "zh-Hans"); - const jaIndex = withoutZh.findIndex((entry) => entry?.language === "ja"); - if (jaIndex === -1) { - withoutZh.push(zhNavigation); + const withoutGenerated = languages.filter( + (entry) => entry?.language !== "zh-Hans" && entry?.language !== "ja", + ); + const enIndex = withoutGenerated.findIndex((entry) => entry?.language === "en"); + const generated = [zhNavigation, jaNavigation]; + if (enIndex === -1) { + withoutGenerated.push(...generated); } else { - withoutZh.splice(jaIndex, 0, zhNavigation); + withoutGenerated.splice(enIndex + 1, 0, ...generated); } return { ...sourceConfig, navigation: { ...sourceConfig.navigation, - languages: withoutZh, + languages: withoutGenerated, }, }; } @@ -101,17 +107,31 @@ function syncDocsTree(targetRoot) { "-a", "--delete", "--filter", + "P ja-JP/", + "--filter", "P zh-CN/", "--filter", + "P .i18n/ja-JP.tm.jsonl", + "--filter", "P .i18n/zh-CN.tm.jsonl", "--exclude", + "ja-JP/", + "--exclude", "zh-CN/", "--exclude", + ".i18n/ja-JP.tm.jsonl", + "--exclude", ".i18n/zh-CN.tm.jsonl", `${SOURCE_DOCS_DIR}/`, `${targetDocsDir}/`, ]); + const targetJaTmPath = path.join(targetDocsDir, ".i18n", "ja-JP.tm.jsonl"); + if (!fs.existsSync(targetJaTmPath) && fs.existsSync(JA_TM_PATH)) { + ensureDir(path.dirname(targetJaTmPath)); + fs.copyFileSync(JA_TM_PATH, targetJaTmPath); + } + const targetZhTmPath = path.join(targetDocsDir, ".i18n", "zh-CN.tm.jsonl"); if (!fs.existsSync(targetZhTmPath) && fs.existsSync(ZH_TM_PATH)) { ensureDir(path.dirname(targetZhTmPath));