GeezerVison is showing github.com — chore: locale specific glossaries · ayaz/opencode@c45ab71
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 clipboard +60Lines changed: 60 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Locale Glossaries | | 2 | + | | 3 | +Use this folder for locale-specific translation guidance that supplements `.opencode/agent/translator.md`. | | 4 | + | | 5 | +The global glossary in `translator.md` remains the source of truth for shared do-not-translate terms (commands, code, paths, product names, etc.). These locale files capture community learnings about phrasing and terminology preferences. | | 6 | + | | 7 | +## File Naming | | 8 | + | | 9 | +- One file per locale | | 10 | +- Use lowercase locale slugs that match docs locales when possible (for example, `zh-cn.md`, `zh-tw.md`) | | 11 | +- If only language-level guidance exists, use the language code (for example, `fr.md`) | | 12 | + | | 13 | +## What To Put In A Locale File | | 14 | + | | 15 | +- **Sources**: PRs/issues/discussions that motivated the guidance | | 16 | +- **Do Not Translate (Locale Additions)**: locale-specific terms or casing decisions | | 17 | +- **Preferred Terms**: recurring UI/docs words with preferred translations | | 18 | +- **Guidance**: tone, style, and consistency notes | | 19 | +- **Avoid** (optional): common literal translations or wording we should avoid | | 20 | + | | 21 | +Prefer guidance that is: | | 22 | + | | 23 | +- Repeated across multiple docs/screens | | 24 | +- Easy to apply consistently | | 25 | +- Backed by a community contribution or review discussion | | 26 | + | | 27 | +## Template | | 28 | + | | 29 | +```md | | 30 | +# <locale> Glossary | | 31 | + | | 32 | +## Sources | | 33 | + | | 34 | +- PR #12345: https://github.com/anomalyco/opencode/pull/12345 | | 35 | + | | 36 | +## Do Not Translate (Locale Additions) | | 37 | + | | 38 | +- `OpenCode` (preserve casing) | | 39 | + | | 40 | +## Preferred Terms | | 41 | + | | 42 | +| English | Preferred | Notes | | | 43 | +| ------- | --------- | --------- | | | 44 | +| prompt | ... | preferred | | | 45 | +| session | ... | preferred | | | 46 | + | | 47 | +## Guidance | | 48 | + | | 49 | +- Prefer natural phrasing over literal translation | | 50 | + | | 51 | +## Avoid | | 52 | + | | 53 | +- Avoid ... when ... | | 54 | +``` | | 55 | + | | 56 | +## Contribution Notes | | 57 | + | | 58 | +- Mark entries as preferred when they may evolve | | 59 | +- Keep examples short | | 60 | +- Add or update the `Sources` section whenever you add a new rule |
Collapse file Copy file name to clipboard +42Lines changed: 42 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# zh-cn Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #13942: https://github.com/anomalyco/opencode/pull/13942 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only when it is part of commands, package names, paths, or code) | | 10 | +- `OpenCode Zen` | | 11 | +- `OpenCode CLI` | | 12 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 13 | +- `Model Context Protocol` (prefer the English expansion when introducing `MCP`) | | 14 | + | | 15 | +## Preferred Terms | | 16 | + | | 17 | +These are preferred terms for docs/UI prose and may evolve. | | 18 | + | | 19 | +| English | Preferred | Notes | | | 20 | +| ----------------------- | --------- | ------------------------------------------- | | | 21 | +| prompt | 提示词 | Keep `--prompt` unchanged in flags/code | | | 22 | +| session | 会话 | | | | 23 | +| provider | 提供商 | | | | 24 | +| share link / shared URL | 分享链接 | Prefer `分享` for user-facing share actions | | | 25 | +| headless (server) | 无界面 | Docs wording | | | 26 | +| authentication | 认证 | Prefer in auth/OAuth contexts | | | 27 | +| cache | 缓存 | | | | 28 | +| keybind / shortcut | 快捷键 | User-facing docs wording | | | 29 | +| workflow | 工作流 | e.g. GitHub Actions workflow | | | 30 | + | | 31 | +## Guidance | | 32 | + | | 33 | +- Prefer natural, concise phrasing over literal translation | | 34 | +- Keep the tone direct and friendly (PR #13942 consistently moved wording in this direction) | | 35 | +- Preserve technical artifacts exactly: commands, flags, code, inline code, URLs, file paths, model IDs | | 36 | +- Keep enum-like values in English when they are literals (for example, `default`, `json`) | | 37 | +- Prefer consistent terminology across pages once a term is chosen (`会话`, `提供商`, `提示词`, etc.) | | 38 | + | | 39 | +## Avoid | | 40 | + | | 41 | +- Avoid `opencode` in prose when referring to the product name; use `OpenCode` | | 42 | +- Avoid mixing alternative terms for the same concept across docs when a preferred term is already established |
Collapse file Copy file name to clipboard +42Lines changed: 42 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# zh-tw Glossary | | 2 | + | | 3 | +## Sources | | 4 | + | | 5 | +- PR #13942: https://github.com/anomalyco/opencode/pull/13942 | | 6 | + | | 7 | +## Do Not Translate (Locale Additions) | | 8 | + | | 9 | +- `OpenCode` (preserve casing in prose; keep `opencode` only when it is part of commands, package names, paths, or code) | | 10 | +- `OpenCode Zen` | | 11 | +- `OpenCode CLI` | | 12 | +- `CLI`, `TUI`, `MCP`, `OAuth` | | 13 | +- `Model Context Protocol` (prefer the English expansion when introducing `MCP`) | | 14 | + | | 15 | +## Preferred Terms | | 16 | + | | 17 | +These are preferred terms for docs/UI prose and may evolve. | | 18 | + | | 19 | +| English | Preferred | Notes | | | 20 | +| ----------------------- | --------- | ------------------------------------------- | | | 21 | +| prompt | 提示詞 | Keep `--prompt` unchanged in flags/code | | | 22 | +| session | 工作階段 | | | | 23 | +| provider | 供應商 | | | | 24 | +| share link / shared URL | 分享連結 | Prefer `分享` for user-facing share actions | | | 25 | +| headless (server) | 無介面 | Docs wording | | | 26 | +| authentication | 認證 | Prefer in auth/OAuth contexts | | | 27 | +| cache | 快取 | | | | 28 | +| keybind / shortcut | 快捷鍵 | User-facing docs wording | | | 29 | +| workflow | 工作流程 | e.g. GitHub Actions workflow | | | 30 | + | | 31 | +## Guidance | | 32 | + | | 33 | +- Prefer natural, concise phrasing over literal translation | | 34 | +- Keep the tone direct and friendly (PR #13942 consistently moved wording in this direction) | | 35 | +- Preserve technical artifacts exactly: commands, flags, code, inline code, URLs, file paths, model IDs | | 36 | +- Keep enum-like values in English when they are literals (for example, `default`, `json`) | | 37 | +- Prefer consistent terminology across pages once a term is chosen (`工作階段`, `供應商`, `提示詞`, etc.) | | 38 | + | | 39 | +## Avoid | | 40 | + | | 41 | +- Avoid `opencode` in prose when referring to the product name; use `OpenCode` | | 42 | +- Avoid mixing alternative terms for the same concept across docs when a preferred term is already established |
Collapse file Copy file name to clipboardExpand all lines: .opencode/agent/translator.md +14Lines changed: 14 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,10 +13,24 @@ Requirements: | 13 | 13 | - Preserve meaning, intent, tone, and formatting (including Markdown/MDX structure). | 14 | 14 | - Preserve all technical terms and artifacts exactly: product/company names, API names, identifiers, code, commands/flags, file paths, URLs, versions, error messages, config keys/values, and anything inside inline code or code blocks. | 15 | 15 | - Also preserve every term listed in the Do-Not-Translate glossary below. | | 16 | +- Also apply locale-specific guidance from `.opencode/agent/glossary/<locale>.md` when available (for example, `zh-cn.md`). | 16 | 17 | - Do not modify fenced code blocks. | 17 | 18 | - Output ONLY the translation (no commentary). | 18 | 19 |
| 19 | 20 | If the target locale is missing, ask the user to provide it. | | 21 | +If no locale-specific glossary exists, use the global glossary only. | | 22 | + | | 23 | +--- | | 24 | + | | 25 | +# Locale-Specific Glossaries | | 26 | + | | 27 | +When a locale glossary exists, use it to: | | 28 | + | | 29 | +- Apply preferred wording for recurring UI/docs terms in that locale | | 30 | +- Preserve locale-specific do-not-translate terms and casing decisions | | 31 | +- Prefer natural phrasing over literal translation when the locale file calls it out | | 32 | + | | 33 | +Locale guidance does not override code/command preservation rules or the global Do-Not-Translate glossary below. | 20 | 34 |
| 21 | 35 | --- | 22 | 36 |
| |
|