Skip to content

Commit 35c35a7

Browse files
committed
fix(i18n): correct Catalan (ca) locale and add ca glossary
The ca locale was machine-generated in #40992 without a locale glossary. This corrects mistranslations (Called -> "Es diu", Show agent -> "Agent d'espectacles", API key -> "tecla API", shell -> "closca"/"Carcassa", tool calls -> "trucades"), applies the Softcatala rule of singular imperative for commands and vos for messages, and replaces bare gerunds with "S'esta ...". Adds .opencode/glossary/ca.md so future translation passes have the locale guidance the other 16 locales already have. Fixes #42837
1 parent 4643e65 commit 35c35a7

4 files changed

Lines changed: 375 additions & 244 deletions

File tree

.opencode/glossary/ca.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# ca Glossary
2+
3+
## Sources
4+
5+
- Guia d'estil de Softcatalà: https://www.softcatala.org/guia-estil-de-softcatala/tota-la-guia/
6+
- Recull de termes de Softcatalà: https://www.softcatala.org/recull/
7+
- TERMCAT (Catalan terminology authority): https://www.termcat.cat/
8+
- Optimot (Generalitat de Catalunya language service): https://optimot.gencat.cat/
9+
10+
Term mappings below were cross-checked against the Catalan translation memories published by
11+
Softcatalà (https://www.softcatala.org/recursos/memories/): KDE (329k segments), GNOME (92k),
12+
LibreOffice (81k), Microsoft Terminology (21k), Chromium (7.7k) and Git (6.6k). Counts cited in
13+
the Notes column are occurrences of the Catalan string for that English source label.
14+
15+
For Git-specific vocabulary (`fork`, `worktree`, `branch`, `commit`), the Git translation memory
16+
is authoritative and overrides the general-purpose corpora.
17+
18+
The general-purpose corpora predate the LLM domain, so AI-specific vocabulary was checked against
19+
shipped AI interfaces instead: Firefox's `browser/browser/genai.ftl` (mozilla-l10n, human-
20+
translated) and Open WebUI's `ca-ES` locale.
21+
22+
## Do Not Translate (Locale Additions)
23+
24+
- `OpenCode` (preserve casing in prose; keep `opencode` only in commands, package names, paths, or code)
25+
- `OpenCode CLI`
26+
- `CLI`, `TUI`, `MCP`, `OAuth`, `LSP`, `API`
27+
- Tool identifiers exactly as written: `todowrite`, `bash`, `webfetch`, `doom_loop`, `external_directory`
28+
- Commands, flags, file paths, model IDs, and code literals (keep exactly as written)
29+
- Keyboard legends: `Page Up`, `Page Down`, `Esc`, `Tab`, `Enter`
30+
31+
## Preferred Terms
32+
33+
| English | Preferred | Notes |
34+
| --------------- | ------------------ | ---------------------------------------------------------------------------------------------- |
35+
| shell | intèrpret d'ordres | GNOME, KDE. Keep `Shell` only where it labels the prompt-mode toggle. Never «closca»/«carcassa» |
36+
| to search | cercar / cerca | KDE 3728:21, GNOME 1164:6, MS 124:2 against «buscar» |
37+
| to download | baixar / baixa | KDE 639:264, GNOME 120:38 against «descarregar» |
38+
| next | següent | KDE 2552:163, GNOME 545:17, LibreOffice 792:35 against «proper» |
39+
| to toggle | commuta | KDE 539:167, GNOME 273:10 against «alterna». Pick one verb and keep it |
40+
| called (a tool) | S'ha cridat | invocation, not naming. KDE uses `cridar`/`invocar`; «Es diu» appears in no corpus |
41+
| Select All | Selecciona-ho tot | unanimous: KDE 25/25, GNOME, LibreOffice, MS, Chromium |
42+
| Close | Tanca | KDE 49, LibreOffice 24. Imperative, not «Tancar» |
43+
| Send | Envia | KDE 12, LibreOffice 3, GNOME 2 |
44+
| Save / Open | Desa / Obre | KDE 44 / 33, LibreOffice 19 / 16 |
45+
| Undo / Redo/Cut | Desfés/Refés/Retalla | KDE 27 / 20 / 16. Never the infinitive |
46+
| settings | configuració | KDE 33, MS 5, GNOME, Chromium. (LibreOffice prefers «Paràmetres» — minority) |
47+
| workspace | espai de treball | KDE. MS prefers «àrea de treball»; pick one, KDE matches developer tooling better |
48+
| session | sessió | unanimous |
49+
| file / folder | fitxer / carpeta | unanimous; not «arxiu» |
50+
| tab (UI) | pestanya | «Tabulador» is the *key*, not the UI tab |
51+
| prompt | indicació | LLM sense. Open WebUI `ca-ES` 45 occurrences; Firefox `genai.ftl` (human-translated) agrees |
52+
| agent | agent | GNOME «Agent», MS «agent» (7) |
53+
| model | model | KDE 17, LibreOffice 5, GNOME 2 |
54+
| token | token | keep the English loanword — see note below |
55+
| to fork | bifurcar / bifurca | Git ca, 7 of 10 segments |
56+
| worktree | arbre de treball | Git ca, 59:25; «work tree» is 11/11 |
57+
| diff | diff (masculine) | «el diff», «un diff unificat». KDE 243:111; es/fr/de/it in this repo all keep «Diff» |
58+
| patch (noun) | pedaç | Git ca 128:0; Recull de termes «Patch → Pedaç» |
59+
| tests (software)| proves | KDE 42, GNOME 15, Git 2, LibreOffice 2; «Unit Tests» → «Proves unitàries». See **Avoid** |
60+
| to patch | apedaçar | Git ca «deixar d'apedaçar», «operació d'apedaçament»; KDE «sense apedaçar». `Patched` → «Apedaçat» |
61+
62+
Notes on the terms the general-purpose corpora did not settle:
63+
64+
- **`prompt` → «indicació»** in the LLM sense. The general corpora only have the command-line
65+
prompt or request senses («indicador», «petició», «sol·licitud») and the Recull de termes has no
66+
`prompt` entry at all, so the evidence comes from AI interfaces: Firefox's `genai.ftl` uses
67+
«indicacions», and Open WebUI's `ca-ES` uses «indicació» 45 times against 4 that keep the English,
68+
3 «sol·licitud» and 2 «petició». Note `prompt` is also a verb in the source (`Subagent sessions
69+
cannot be prompted`); rewrite rather than calque — «No es poden enviar indicacions a les sessions
70+
de subagent».
71+
- **`token` stays English.** The corpora say «testimoni» (KDE 5, GNOME 2, MS 4), but that is the
72+
authentication-token sense; it is wrong for the tokenizer unit. `AGENTS.md` permits this:
73+
*"If established practice keeps an English loanword or acronym, keep it rather than inventing a
74+
translation."*
75+
- **`fork` and `worktree` follow Git**, since both are Git terms and users meet them in `git`
76+
output first. The 3 non-«bifurcar» `fork` segments are the `--fork-point` flag and the `fork`
77+
syscall name; the 25 non-translated `worktree` segments are all command literals
78+
(`git worktree add`, `skip-worktree`). Keep the English inside literal commands, translate the
79+
prose.
80+
- **`diff` stays English**, unlike `fork` and `worktree`, because Git itself does not settle it:
81+
excluding command literals, the Git memory is 47 prose «diff» against 46 «diferència». KDE breaks
82+
the tie at 243:111 in favour of keeping the term, and every sibling locale in this repo already
83+
does (`Diff unificado`, `Diff unifié`, `Vereinheitlichter Diff`, `Diff unificato`). Treat it as
84+
masculine and inflect around it: «el diff», «Diff unificat», «Diff dividit», «Vista del diff».
85+
Where the English says *non-diff lines* rather than *diff*, a paraphrase is fine — «línies sense
86+
canvis», matching `es` and `it`.
87+
- **`agent` and `model` are spelled the same in Catalan**. Do not let that
88+
invite word-by-word treatment of the phrases they appear in: `Show agent` and `Cycle agent` are
89+
verb + noun (see **Avoid**).
90+
91+
## Guidance
92+
93+
- **Verb form depends on who is speaking.** This is the rule most often broken and it is not a
94+
matter of taste — see Softcatalà, *Formes verbals*:
95+
- **User → computer** (menu items, buttons, command-palette entries, config toggles): imperative
96+
**2nd person singular**. `Edita`, `Obre`, `Desa`, `Reinicia`, `Comprova si hi ha actualitzacions`.
97+
- **Computer → user** (dialogs, status text, questions, descriptions): imperative **2nd person
98+
plural** (*vós*). `Escriviu…`, `Trieu una carpeta`, `Voleu continuar?`
99+
- Never use the infinitive as a command. `Tancar``Tanca`; `Enviar``Envia`; `Desfer``Desfés`.
100+
- **Progressive actions use `S'està` / `S'estan` + gerund**, never a bare gerund and never a
101+
nominalisation. `Downloading``S'està baixant` (not «Baixant», not «Baixada»).
102+
- Elide `de` before a vowel: `d'OpenCode`, not «de OpenCode».
103+
- Sentence case only. Do not carry English title case into Catalan (`Última activitat`, not
104+
«Última Activitat»).
105+
- Drop `please` and `sorry` entirely; Catalan software copy does not render them.
106+
- Prefer `ser` over `estar` with adjectives and for location (`El disc és ple`).
107+
- **`web` takes the gender of the elided noun** (TERMCAT): «un web» is *un lloc web*, «una web» is
108+
*una pàgina web*. It is not a free choice. Every article-bearing `web` string in this codebase
109+
refers to the Web as a whole or to publishing a session on it — never to a single page — so all
110+
of them are **masculine**: `al web`, `el web`. Softcatalà's Recull de termes (revised by TERMCAT)
111+
has «Mapa del web»; Microsoft Terminology (56:0), Chromium (13:0) and LibreOffice agree for
112+
«on the web». KDE and GNOME often use the feminine, but that reflects common parlance rather
113+
than the rule. Attributive uses take no article and raise no question: `Cerca web`.
114+
- Prefer active voice; English passives usually become pronominal (`s'ha desat`).
115+
- Omit possessives unless ownership is genuinely ambiguous (`el fitxer`, not «el vostre fitxer»).
116+
- Use gender-neutral constructions where they exist (`Us donem la benvinguda`, `Tothom`).
117+
118+
## Avoid
119+
120+
- Avoid translating a word whose English part of speech you have not resolved. `Show agent` is
121+
verb + noun, not «Agent d'espectacles»; `Cycle agent` is verb + noun, not «Agent de cicle».
122+
- Avoid rendering one source term several ways. `shell` currently appears as `Shell`, `shell`,
123+
`intèrpret d'ordres`, `Carcassa` and `closca` across the locale.
124+
- Avoid collapsing distinct states into one string. `Resetting workspace` and `Workspace reset`
125+
must not both become «Restabliment de l'espai de treball».
126+
- Avoid mixing *tu* and *vós* within a surface once the speaker direction is fixed.
127+
- Avoid «tests» for software *tests*; use «proves». The corpora are unanimous on this
128+
(KDE 42, GNOME 15, Git 2, LibreOffice 2), including «Unit Tests» → «Proves unitàries».
129+
- Avoid merging `workspace` («espai de treball») and `worktree` («arbre de treball»). The English
130+
source uses both, occasionally in one string (`Runs after creating a new workspace (worktree)`).
131+
Keep whatever distinction the English makes.

0 commit comments

Comments
 (0)