GeezerVison is showing github.com — chore: updated locale glossaries and docs sync workflow · mathstuf/opencode@dbf2c45
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/docs-locale-sync.yml +53-6Lines changed: 53 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,13 +12,14 @@ jobs: | 12 | 12 | if: github.actor != 'opencode-agent[bot]' | 13 | 13 | runs-on: blacksmith-4vcpu-ubuntu-2404 | 14 | 14 | permissions: | 15 | | - id-token: write | 16 | 15 | contents: write | 17 | 16 | steps: | 18 | 17 | - name: Checkout repository | 19 | 18 | uses: actions/checkout@v4 | 20 | 19 | with: | | 20 | + persist-credentials: false | 21 | 21 | fetch-depth: 0 | | 22 | + ref: ${{ github.ref_name }} | 22 | 23 |
| 23 | 24 | - name: Setup Bun | 24 | 25 | uses: ./.github/actions/setup-bun | | 51 | 52 | uses: sst/opencode/github@latest | 52 | 53 | env: | 53 | 54 | OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} | | 55 | + GITHUB_TOKEN: ${{ steps.committer.outputs.token }} | | 56 | + OPENCODE_CONFIG_CONTENT: | | | 57 | + { | | 58 | + "permission": { | | 59 | + "*": "deny", | | 60 | + "read": { | | 61 | + "*": "deny", | | 62 | + "packages/web/src/content/docs": "allow", | | 63 | + "packages/web/src/content/docs/*": "allow", | | 64 | + "packages/web/src/content/docs/*.mdx": "allow", | | 65 | + "packages/web/src/content/docs/*/*.mdx": "allow", | | 66 | + ".opencode": "allow", | | 67 | + ".opencode/agent": "allow", | | 68 | + ".opencode/agent/glossary": "allow", | | 69 | + ".opencode/agent/translator.md": "allow", | | 70 | + ".opencode/agent/glossary/*.md": "allow" | | 71 | + }, | | 72 | + "edit": { | | 73 | + "*": "deny", | | 74 | + "packages/web/src/content/docs/*/*.mdx": "allow" | | 75 | + }, | | 76 | + "glob": { | | 77 | + "*": "deny", | | 78 | + "packages/web/src/content/docs*": "allow", | | 79 | + ".opencode/agent/glossary*": "allow" | | 80 | + }, | | 81 | + "task": { | | 82 | + "*": "deny", | | 83 | + "translator": "allow" | | 84 | + } | | 85 | + }, | | 86 | + "agent": { | | 87 | + "translator": { | | 88 | + "permission": { | | 89 | + "*": "deny", | | 90 | + "read": { | | 91 | + "*": "deny", | | 92 | + ".opencode/agent/translator.md": "allow", | | 93 | + ".opencode/agent/glossary/*.md": "allow" | | 94 | + } | | 95 | + } | | 96 | + } | | 97 | + } | | 98 | + } | 54 | 99 | with: | 55 | | - model: opencode/gpt-5.2 | | 100 | + model: opencode/gpt-5.3-codex | 56 | 101 | agent: docs | | 102 | + use_github_token: true | 57 | 103 | prompt: | | 58 | 104 | Update localized docs to match the latest English docs changes. | 59 | 105 |
| @@ -67,10 +113,11 @@ jobs: | 67 | 113 | 2. You MUST use the Task tool for translation work and launch subagents with subagent_type `translator` (defined in .opencode/agent/translator.md). | 68 | 114 | 3. Do not translate directly in the primary agent. Use translator subagent output as the source for locale text updates. | 69 | 115 | 4. Run translator subagent Task calls in parallel whenever file/locale translation work is independent. | 70 | | - 5. Preserve frontmatter keys, internal links, code blocks, and existing locale-specific metadata unless the English change requires an update. | 71 | | - 6. Keep locale docs structure aligned with their corresponding English pages. | 72 | | - 7. Do not modify English source docs in packages/web/src/content/docs/*.mdx. | 73 | | - 8. If no locale updates are needed, make no changes. | | 116 | + 5. Use only the minimum tools needed for this task (read/glob, file edits, and translator Task). Do not use shell, web, search, or GitHub tools for translation work. | | 117 | + 6. Preserve frontmatter keys, internal links, code blocks, and existing locale-specific metadata unless the English change requires an update. | | 118 | + 7. Keep locale docs structure aligned with their corresponding English pages. | | 119 | + 8. Do not modify English source docs in packages/web/src/content/docs/*.mdx. | | 120 | + 9. If no locale updates are needed, make no changes. | 74 | 121 |
| 75 | 122 | - name: Commit and push locale docs updates | 76 | 123 | if: steps.changes.outputs.has_changes == 'true' | |
Collapse file Copy file name to clipboardExpand all lines: .opencode/agent/glossary/README.md +3Lines changed: 3 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,6 +9,7 @@ The global glossary in `translator.md` remains the source of truth for shared do | 9 | 9 | - One file per locale | 10 | 10 | - Use lowercase locale slugs that match docs locales when possible (for example, `zh-cn.md`, `zh-tw.md`) | 11 | 11 | - If only language-level guidance exists, use the language code (for example, `fr.md`) | | 12 | +- Some repo locale slugs may be aliases/non-BCP47 for consistency (for example, `br` for Brazilian Portuguese / `pt-BR`) | 12 | 13 |
| 13 | 14 | ## What To Put In A Locale File | 14 | 15 |
| @@ -17,6 +18,7 @@ The global glossary in `translator.md` remains the source of truth for shared do | 17 | 18 | - **Preferred Terms**: recurring UI/docs words with preferred translations | 18 | 19 | - **Guidance**: tone, style, and consistency notes | 19 | 20 | - **Avoid** (optional): common literal translations or wording we should avoid | | 21 | +- If the repo uses a locale alias slug, document the alias in **Guidance** (for example, prose may mention `pt-BR` while config/examples use `br`) | 20 | 22 |
| 21 | 23 | Prefer guidance that is: | 22 | 24 |
| @@ -58,3 +60,4 @@ Prefer guidance that is: | 58 | 60 | - Mark entries as preferred when they may evolve | 59 | 61 | - Keep examples short | 60 | 62 | - Add or update the `Sources` section whenever you add a new rule | | 63 | +- Prefer PR-backed guidance over invented term mappings; start with general guidance if no term-level corrections exist yet |
Collapse file Copy file name to clipboard +28Lines changed: 28 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# ar Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #9947: https://github.com/anomalyco/opencode/pull/9947 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +No PR-backed term mappings yet. Add entries here when review PRs introduce repeated wording corrections. | | 17 | + | | 18 | +## Guidance | | 19 | + | | 20 | +- Prefer natural Arabic phrasing over literal translation | | 21 | +- Keep tone clear and direct in UI labels and docs prose | | 22 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 23 | +- For RTL text, treat code, commands, and paths as LTR artifacts and keep their character order unchanged | | 24 | + | | 25 | +## Avoid | | 26 | + | | 27 | +- Avoid translating product and protocol names that are fixed identifiers | | 28 | +- Avoid mixing multiple Arabic terms for the same recurring UI action once a preferred term is established |
Collapse file Copy file name to clipboard +34Lines changed: 34 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# br Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #10086: https://github.com/anomalyco/opencode/pull/10086 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Locale code `br` in repo config, code, and paths (repo alias for Brazilian Portuguese) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +These are PR-backed locale naming preferences and may evolve. | | 17 | + | | 18 | +| English / Context | Preferred | Notes | | | 19 | +| ---------------------------------------- | ------------------------------ | ------------------------------------------------------------- | | | 20 | +| Brazilian Portuguese (prose locale name) | `pt-BR` | Use standard locale naming in prose when helpful | | | 21 | +| Repo locale slug (code/config) | `br` | PR #10086 uses `br` for consistency/simplicity | | | 22 | +| Browser locale detection | `pt`, `pt-br`, `pt-BR` -> `br` | Preserve this mapping in docs/examples about locale detection | | | 23 | + | | 24 | +## Guidance | | 25 | + | | 26 | +- This file covers Brazilian Portuguese (`pt-BR`), but the repo locale code is `br` | | 27 | +- Use natural Brazilian Portuguese phrasing over literal translation | | 28 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 29 | +- Keep repo locale identifiers as implemented in code/config (`br`) even when prose mentions `pt-BR` | | 30 | + | | 31 | +## Avoid | | 32 | + | | 33 | +- Avoid changing repo locale code references from `br` to `pt-br` in code snippets, paths, or config examples | | 34 | +- Avoid mixing Portuguese variants when a Brazilian Portuguese form is established |
Collapse file Copy file name to clipboard +33Lines changed: 33 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# bs Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #12283: https://github.com/anomalyco/opencode/pull/12283 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +These are PR-backed locale naming preferences and may evolve. | | 17 | + | | 18 | +| English / Context | Preferred | Notes | | | 19 | +| ---------------------------------- | ---------- | ------------------------------------------------- | | | 20 | +| Bosnian language label (UI) | `Bosanski` | PR #12283 tested switching language to `Bosanski` | | | 21 | +| Repo locale slug (code/config) | `bs` | Preserve in code, config, paths, and examples | | | 22 | +| Browser locale detection (Bosnian) | `bs` | PR #12283 added `bs` locale auto-detection | | | 23 | + | | 24 | +## Guidance | | 25 | + | | 26 | +- Use natural Bosnian phrasing over literal translation | | 27 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 28 | +- Keep repo locale references as `bs` in code/config, and use `Bosanski` for the user-facing language name when applicable | | 29 | + | | 30 | +## Avoid | | 31 | + | | 32 | +- Avoid changing repo locale references from `bs` to another slug in code snippets or config examples | | 33 | +- Avoid translating product and protocol names that are fixed identifiers |
Collapse file Copy file name to clipboard +27Lines changed: 27 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# da Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #9821: https://github.com/anomalyco/opencode/pull/9821 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +No PR-backed term mappings yet. Add entries here when review PRs introduce repeated wording corrections. | | 17 | + | | 18 | +## Guidance | | 19 | + | | 20 | +- Prefer natural Danish phrasing over literal translation | | 21 | +- Keep tone clear and direct in UI labels and docs prose | | 22 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 23 | + | | 24 | +## Avoid | | 25 | + | | 26 | +- Avoid translating product and protocol names that are fixed identifiers | | 27 | +- Avoid mixing multiple Danish terms for the same recurring UI action once a preferred term is established |
Collapse file Copy file name to clipboard +27Lines changed: 27 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# de Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #9817: https://github.com/anomalyco/opencode/pull/9817 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +No PR-backed term mappings yet. Add entries here when review PRs introduce repeated wording corrections. | | 17 | + | | 18 | +## Guidance | | 19 | + | | 20 | +- Prefer natural German phrasing over literal translation | | 21 | +- Keep tone clear and direct in UI labels and docs prose | | 22 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 23 | + | | 24 | +## Avoid | | 25 | + | | 26 | +- Avoid translating product and protocol names that are fixed identifiers | | 27 | +- Avoid mixing multiple German terms for the same recurring UI action once a preferred term is established |
Collapse file Copy file name to clipboard +27Lines changed: 27 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# es Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #9817: https://github.com/anomalyco/opencode/pull/9817 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +No PR-backed term mappings yet. Add entries here when review PRs introduce repeated wording corrections. | | 17 | + | | 18 | +## Guidance | | 19 | + | | 20 | +- Prefer natural Spanish phrasing over literal translation | | 21 | +- Keep tone clear and direct in UI labels and docs prose | | 22 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 23 | + | | 24 | +## Avoid | | 25 | + | | 26 | +- Avoid translating product and protocol names that are fixed identifiers | | 27 | +- Avoid mixing multiple Spanish terms for the same recurring UI action once a preferred term is established |
Collapse file Copy file name to clipboard +27Lines changed: 27 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# fr Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #9821: https://github.com/anomalyco/opencode/pull/9821 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 10 | +- `OpenCode CLI` | | 11 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 12 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 13 | + | | 14 | +## Preferred Terms | | 15 | + | | 16 | +No PR-backed term mappings yet. Add entries here when review PRs introduce repeated wording corrections. | | 17 | + | | 18 | +## Guidance | | 19 | + | | 20 | +- Prefer natural French phrasing over literal translation | | 21 | +- Keep tone clear and direct in UI labels and docs prose | | 22 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 23 | + | | 24 | +## Avoid | | 25 | + | | 26 | +- Avoid translating product and protocol names that are fixed identifiers | | 27 | +- Avoid mixing multiple French terms for the same recurring UI action once a preferred term is established |
Collapse file Copy file name to clipboard +33Lines changed: 33 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# ja Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #9821: https://github.com/anomalyco/opencode/pull/9821 | | 6 | +- PR #13160: https://github.com/anomalyco/opencode/pull/13160 | | 7 | + | | 8 | +## Do Not Translate (Locale Additions) | | 9 | + | | 10 | +- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code) | | 11 | +- `OpenCode CLI` | | 12 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 13 | +- Commands, flags, file paths, and code literals (keep exactly as written) | | 14 | + | | 15 | +## Preferred Terms | | 16 | + | | 17 | +These are PR-backed wording preferences and may evolve. | | 18 | + | | 19 | +| English / Context | Preferred | Notes | | | 20 | +| --------------------------- | ----------------------- | ------------------------------------- | | | 21 | +| WSL integration (UI label) | `WSL連携` | PR #13160 prefers this over `WSL統合` | | | 22 | +| WSL integration description | `WindowsのWSL環境で...` | PR #13160 improved phrasing naturally | | | 23 | + | | 24 | +## Guidance | | 25 | + | | 26 | +- Prefer natural Japanese phrasing over literal translation | | 27 | +- Preserve technical artifacts exactly: commands, flags, code, URLs, model IDs, and file paths | | 28 | +- In WSL integration text, follow PR #13160 wording direction for more natural Japanese phrasing | | 29 | + | | 30 | +## Avoid | | 31 | + | | 32 | +- Avoid `WSL統合` in the WSL integration UI context where `WSL連携` is the reviewed wording | | 33 | +- Avoid translating product and protocol names that are fixed identifiers |
|