clamui-gettext
Skill372 starsChanged 12 days agoMITView on GitHub
Maintain ClamUI gettext messages, catalogs, plural forms, translator notes, or extraction across Rust/Tauri and TypeScript.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- rust-best-practicesSkill
- vercel-react-best-practicesSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read the repository-root website/src/content/docs/docs/contributing/translating.md for catalog-editing guidance.
- Very specific: line 16
Use the existing plural API for a new count-dependent message: Rust i18n::translate_plural/the local trn or trnf wrapper, or frontend …
- Very specific: line 26
Run only the repository contracts appropriate to the change: ./scripts/update-pot.sh --check checks template freshness.
- Distinctive: line 34
Every changed source call has extractable literal IDs, correct post-lookup interpolation, and real plural handling where required.
- Very specific: line 36
If the template or a catalog changed, po/clamui.pot, all nine active catalogs, and po/LINGUAS retain consistent msgids, contexts, plural …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scope
Use this skill when changing user-visible gettext source messages, po/ catalogs, plural behavior, translator comments, or an extraction failure. Production extraction covers Rust in crates/ and desktop/src-tauri/, plus TypeScript/TSX in desktop/src/; it has no Python runtime or build dependency. Extend this existing gettext path rather than adding a translation framework.
Read the repository-root website/src/content/docs/docs/contributing/translating.md for catalog-editing guidance. Treat po/LINGUAS as the active-locale authority: de, en, es, fr, hu, it, nb, pt_BR, and zh_CN.
Source-message rules
- Give every gettext helper a direct static string literal (a static no-substitution TypeScript template literal is also supported). Keep the existing message ID, context, placeholders, and singular/plural pair unless the requested wording changes them.
- Put each conditional branch around its own translated literal—for example,
condition ? _("literal A") : _("literal B")—rather than selecting a message ID first. Never pass a variable orif/matchexpression as a gettext message ID. Interpolate runtime values only after lookup or plural selection with the existing formatting helper or values argument. - Use the existing plural API for a new count-dependent message: Rust
i18n::translate_plural/the localtrnortrnfwrapper, or frontendngettext. Keep every plural form meaningful; do not introduce a pseudo-plural or select a translated branch manually. - Place a
// Translators:comment immediately above the relevant literal argument when a dash, range, quotes, markup, or protected package, command, file, or UI literal needs handling guidance. Say exactly whether a protected literal remains unchanged or a quoted UI label must match its translation elsewhere. Keep source Unicode—,–, and…unchanged unless the translator note specifies target-language treatment. - Preserve unknown catalog data and unrelated entries. Do not casually churn existing msgids, plural semantics, headers, or generated output.
The extractor recognizes the Rust helpers in scripts/update-pot.sh and the frontend _/ngettext calls in scripts/extract-typescript-gettext.ts; model a new call on the nearest existing callsite. desktop/src/i18n.ts defines the frontend formatting and plural contract.
Workflow
- Change the source literal(s) and any precise translator note first. If this is a catalog-only translation, preserve placeholders, markup, whitespace, and all required
msgstr[N]entries. - For source-message changes, use GNU gettext and the frozen desktop dependencies:
(cd desktop && bun install --frozen-lockfile), then run./scripts/update-pot.sh. Merge the resulting template into every active catalog, translate the affected entries, and keeppo/LINGUASaligned with its nine catalogs. - Run only the repository contracts appropriate to the change:
./scripts/update-pot.sh --checkchecks template freshness;./scripts/check-potfiles.shchecks Rust/Tauri and TypeScript discovery;./scripts/check-translations.shvalidates the active catalogs and compiled source identities. Do not invoke the internal catalog checker directly; its flags are owned bycheck-translations.sh.
CLI help branch
Apply this only when changing crates/clamui-core/src/cli.rs root help or command summaries. Preserve the seven command-name contracts—scan, quarantine, profile, status, history, install-privileged-helper, and help—and leave command names, flags, command syntax, package names, and paths literal where the existing translator notes require it. The human-readable summaries remain translatable.
Completion
- Every changed source call has extractable literal IDs, correct post-lookup interpolation, and real plural handling where required.
- Translator notes sit directly above only the literal they explain; protected literals and Unicode punctuation follow the specified treatment.
- If the template or a catalog changed,
po/clamui.pot, all nine active catalogs, andpo/LINGUASretain consistent msgids, contexts, plural forms, and placeholders; no generated.moor build output is added. - The applicable repository scripts above succeed after the change.
Source pointers
website/src/content/docs/docs/contributing/translating.md— public translator workflow and language-specific rules.scripts/update-pot.shandscripts/extract-typescript-gettext.ts— supported extraction shapes and--checkbehavior.scripts/check-translations.sh,scripts/check-potfiles.sh, and.github/workflows/i18n.yml— validation and CI contracts.crates/clamui-core/src/i18n.rs,desktop/src/i18n.ts, andcrates/clamui-core/src/cli.rs— runtime, plural, and CLI-help implementations.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

