Conversation
The ca locale was machine-generated in anomalyco#40992 without a locale glossary, and it is also incomplete: 498 keys in the app and ui dictionaries had no Catalan at all and silently fell back to English. The Console had no Catalan dictionary whatsoever. - Corrects mistranslations, including Called -> "Es diu" (named, not invoked), Show agent -> "Agent d'espectacles" (entertainment agent), API key -> "tecla API" (keyboard key), Terminal shell -> "Carcassa terminal", Tool Calls -> "Trucades d'eines" (phone calls) and Input Tokens -> "Fitxes d'entrada" (filing cards). - Translates the 498 missing app/ui keys, including ui.messagePart.tools.used.*, which rendered in the UI as English "Used 2 ...". - Adds packages/console/app/src/i18n/ca.ts (728 keys) and registers the locale in i18n/index.ts and lib/language.ts. DOCS maps ca to "root" because the docs site has no Catalan, so Catalan users correctly get the English docs. - Applies the Softcatala rule of singular imperative for commands and vos for messages, "S'esta ..." for progressive actions, and a noun for labels naming a completed action. - Adds .opencode/glossary/ca.md so future translation passes have the locale guidance the other 17 locales already have. Fixes anomalyco#42837
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Author
|
Same text in both PRs, only the base differs:
So this will flag every PR that targets For the record: #42837 is open, and this PR closes it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #42837
Type of change
What does this PR do?
I'm a native Catalan speaker. Catalan had three separate problems.
1. Strings that say something different from the English. The locale was machine-generated in
#40992 and never reviewed by a speaker:
ui.basicTool.called{{tool}}{{tool}}settings.general.row.showCustomAgents.titleprovider.connect.method.apiKey(×5)settings.general.row.shell.titlecontext.breakdown.toolcontext.stats.inputTokens(×6)2. 498 keys had no Catalan at all and silently fell back to English. The most visible is
ui.messagePart.tools.used.*, which renders in the timeline as EnglishUsed 2 …next totranslated tool names. Those are now translated.
3. The Console had no Catalan dictionary at all — every string English, while 17 other locales
had one. This adds
packages/console/app/src/i18n/ca.ts(728 keys).The only code changes are the three lines needed to register the locale, and they're worth a
look since the rest of the diff is strings:
i18n/index.ts— one import and one branch, matching the existing pattern.lib/language.ts—LOCALES,LABEL(Català),TAG(ca), andDOCS. All four aresatisfies Record<Locale, string>, so they have to move together.DOCSmapscato"root"— deliberately, because the docs site has no Catalan, so Catalan users correctly getthe English docs rather than a 404.
The rest is grammar. Catalan uses the singular imperative for menu and button labels and the vós
plural for messages addressed to the user (Softcatalà style guide, Formes verbals); bare gerunds
become
S'està…; and a label that names a completed action takes a noun, not an imperative — whichmatters here because those labels follow a count, so
Used 2 Escriu("used 2 write!") becomesUsed 2 Escriptura..opencode/glossary/ca.mdis the part most likely to matter beyond this PR:.opencode/command/translate.mdloads.opencode/glossary/<locale>.mdwhen present, and Catalanwas translated without one. Term choices cite segment counts from the Catalan translation memories
Softcatalà publishes (KDE, GNOME, LibreOffice, Microsoft Terminology, Chromium) plus Git's for
Git-specific vocabulary, so each row can be checked without reading Catalan.
No English string or key is touched.
This supersedes #44232, which I opened against
devbefore realising that's the v1.18.x line —these dictionaries live at different paths there, so v2 users would never have received the fix.
How did you verify your code works?
There's no i18n parity test on this branch, so I verified by script:
en.tskey now has aca.tsentry — 0 missing, 0 duplicates, acrosspackages/app/src/runtime/i18n,packages/ui/src/i18nandpackages/console/app/src/i18n.The Console dictionary matches
en.tsexactly, 728/728.{{var}}and\nmatches the English across all 2,391 keysthat have an English counterpart. The
<strong>tags inhome.growth.bodybalance 4/4.one/many/other, so all 23 plural familiescarrying
{{count}}have a.manyvariant.ca.tswithout anen.tscounterpart are the 90desktop.*entries that livein
desktop-native.ts— byte-identical to the set already onv2, so nothing new.To be precise about the limits: these are local static and import-level checks, not an end-to-end
run of the UI. Happy to attach a screenshot of the Console in Catalan if that would help review.
Screenshots / recordings
N/A — locale strings plus locale registration; no layout or component changes.
Checklist