/wagoe:wagoe-i18nfrom wagoe
Externalises user-visible strings in Wagoe projects into translation catalogues using `[:t :key]` markers. Covers adding strings, running `bb i18n:scan`, and maintaining en/nl locale parity.
Ships in wagoe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Translation keys live as [:t :key] data markers inside Hiccup. A
shell-layer postwalk resolves them just before HTML is emitted, so core/
stays pure and never needs a locale (ADR-013).
[:t :user/sign-in] ; lookup
[:t :user/greeting {:name "Alice"}] ; interpolation — {name} in the value
[:t :user/items {:n 3} 3] ; plural, 4th arg is the count
bb i18n:scan # CI gate — exits 1 on unexternalised literals
bb i18n:missing # keys in en.edn absent from another locale
bb i18n:unused # catalogue keys nothing references
bb i18n:find "Sign in" # search catalogue and source together
Catalogues: libs/i18n/resources/wagoe/i18n/translations/{en,nl}.edn.
en.edn first, then nl.edn. bb i18n:missing compares
the others against en.edn, so a key added only to nl.edn is invisible
to it.[:t :key] in the Hiccup instead of the literal.bb i18n:scan — must exit 0.bb i18n:missing — must report no gaps.Namespace the key by module: :common/* for anything shared, otherwise
:user/*, :admin/*, :search/*, :calendar/*, :workflow/*.
Including places that do not look like markup. All of these resolve, because the renderer walks the whole tree:
[:nav {:aria-label [:t :common/aria-breadcrumb]} …] ; attribute value
[:title [:t :user/detail-page-title {:name n}]] ; page title
(ui/select-field :role [[:admin [:t :common/role-admin]] …] v) ; option labels
(ui/badge [:t :search/badge-weight {:weight w}] opts) ; component argument
The test is not "is this Hiccup" but "does this value end up inside the tree
the shell renders". If a helper puts its argument into a vector, a marker
works; if it calls str on it, it does not — you would render the literal
text [:t :some/key] into the page.
Markers nest. Parameters resolve before the sentence that uses them, which is how word order can change between languages:
[:t :user/session-device {:browser [:t :user/browser-chrome]
:device [:t :user/device-desktop]}]
;; en: "Chrome on Desktop" nl: "Chrome op Desktop"
This is the right shape for a pure core/ function that would otherwise return
an English sentence: return the marker, let the shell resolve it.
bb i18n:scan does not seeTreat a clean scan as one check passed, not as proof the UI is translated.
**/core/ui.clj. Hiccup in shell/web_handlers.clj, admin views or
anywhere else is never looked at.^[A-Z][A-Za-z ]{3,}. (str n " hours ago") is
unexternalised English and is not reported, because matching lowercase turns
every map key and option name into a finding. When you touch a file, read it
for lowercase fragments yourself..js, .css, onclick handlers or confirm(...) strings. Inline
JavaScript in an attribute is a string to the scanner.It is a required CI job, and for a long time it could not fail: its docstring
filter was (not (str/includes? line "\"")), which no line holding a string
literal satisfies. Fixed, with tests that plant a violation.
A second false negative came from the same habit of reasoning per line rather than per literal — a line with a marker on it had all its other literals suppressed, which hid five real cases of
(ui/submit-button [:t :user/button-update] {:loading-text "Updating..."})
Both are now decided from the enclosing form. If the scan reports OK on a file
you know has literals, check it is under core/ui.clj and that the string is
capitalised prose before assuming the gate is broken again.
bb i18n:unused is a question, not an instructionIt reports keys nothing references. That has two causes and they need opposite responses:
:user/browser-* and :user/device-* keys sat "unused" for months while
parse-user-agent returned the string "Chrome on Desktop". The fix was to
use the keys, not to delete them.Before deleting, bb i18n:find the key and read the code that should have
used it. A key whose English value appears verbatim in a source file is the
second case.
Keys built at runtime ((keyword "user" (str "browser-" x))) would also read
as unused. Nothing in this repository does that today, but a dynamic lookup is
worth grepping for before a bulk delete.
bb i18n:scan and bb i18n:missing first — know the starting point.en.edn, then nl.edn, then replace the
literal with [:t :key].str in a core/ function, move the
sentence into the catalogue and pass the parts as parameters — do not
concatenate translated fragments, word order is not universal.bb i18n:scan — exits 0.bb i18n:missing — no gaps.core/ now produces.bb check before committing.Locale selection, middleware wiring and the plural rules live in
libs/i18n/AGENTS.md. Nothing here changes which locale a request gets — that
comes from the user's :language preference via the i18n middleware.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub wagoebv/wagoe --plugin wagoe10 skills in this plugin
/wagoeWagoe framework (Clojure FC/IS) toolkit. Use when the user wants to add a module, entity, or feature ("add a product module with name and price"), add a field/endpoint/adapter to a module, wire a module into the app, explain a Clojure/Wagoe error or stacktrace, generate tests, write SQL from a description, configure the project, or diagnose setup issues. ALWAYS scaffold new modules with `bb scaffold` instead of hand-writing them./wagoe-debugDiagnose a failure in a Wagoe app — a 500, an exception, a stack trace, a nil where a value was expected, a field that reads back empty, or a test that fails for no obvious reason. Use when something in a Wagoe project is broken and the cause is not yet known. Works from the innermost layer outward, checks the framework's known pitfalls first, and can call bb ai explain on a stack trace./wagoe-deployPackage and deploy a Wagoe app — uberjar, Docker image, Kubernetes, systemd or a cloud manifest. Use when asked to build a release, containerise the app, deploy to an environment, or check a project is ready to ship. Covers the pre-deploy checks that actually catch things, the server/worker split, and the health endpoints to probe./wagoe-doctorDiagnose and fix a Wagoe project's configuration and development environment. Use when a Wagoe app will not start, when config.edn changes are not taking effect, before running dev commands on an unfamiliar machine, when JWT_SECRET or database settings look wrong, or when the user asks whether their setup is correct. Runs bb doctor and bb doctor:env, explains each failure, and applies the fix it names./wagoe-gen-testsGenerate a Kaocha test namespace for a Wagoe source file with `bb ai gen-tests`, put it in the right place, and run it. Use when asked to write tests for an existing namespace, to cover a function that has none, or to bootstrap a test file for freshly scaffolded code. Covers the test-type metadata Kaocha selects on, where the file belongs, and how to triage the failures a generated draft always has./wagoe-migrateCreate, apply, verify and roll back database migrations in a Wagoe project. Use when adding or changing a database column or table, when a migration seems not to have run, when `bb migrate status` disagrees with the schema, or when adding a field to an entity — which needs a migration plus two other changes to stay consistent. Covers bb migrate create/up/status/rollback and the three-way schema sync.Other plugins' skills for the same job