translations
Skill18 starsChanged 9 days agoMITView on GitHub
Add or update translations for pages and components in the Waniwani app. Use when the user wants to add translations, create translation files, internationalize a page, make text translatable, or update existing translations. Also use proactively when creating new pages or components with user-facing text.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- wikilayer/skillstheir own version, first seen Nov 13, 2026
- craftcms/cmstheir own version, first seen Nov 9, 2026
- simonmichael/hledgertheir own version, first seen Oct 17, 2026
- zapek/Xerestheir own version, first seen Oct 8, 2026
- hass-energy/haeotheir own version, first seen Oct 8, 2026
- jtenniswood/espcontroltheir own version, first seen Oct 8, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- simonmichael/hledger★ 4.8ksame name
- HiEventsDev/Hi.Events★ 4.2ksame name
- craftcms/cms★ 3.6ksame name
- jtenniswood/espcontrol★ 1.2ksame name
- zapek/Xeres★ 224same name
- hass-energy/haeo★ 81same name
- wikilayer/skills★ 2same name
- MovGP0/Skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- copySkill
- deploy-prodSkill
- linear-oneshotSkill
- project-planningSkill
- project-updateSkill
- pull-requestSkill
- wani-code-reviewSkill
- create-flow-appSkill
- frontend-designSkill
- knowledge-baseSkill
- release-migrationSkill
- transfer-to-kitSkill
- visualize-flowSkill
- audit-trackingSkill
- instrument-trackingSkill
- migrate-waniwani-sdk-0.15-to-0.16Skill
- migrate-waniwani-sdk-0.16-to-0.17Skill
- migrate-waniwani-sdk-0.17-to-0.18Skill
- migrate-waniwani-sdk-0.18-to-0.19Skill
- migrate-waniwani-sdk-0.19-to-0.20Skill
- migrate-waniwani-sdk-0.22-to-0.23Skill
- migrate-waniwani-sdk-0.23-to-0.24Skill
- migrate-waniwani-sdk-0.24-to-0.25Skill
- migrate-waniwani-sdk-0.25-to-1.0Skill
- waniwani-sdkSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Only use a different location if the user explicitly requests it.
- Distinctive: line 80
Static text (never changes): Use plain strings
- Distinctive: line 85
Dynamic text (includes variables): Use functions with object parameters
- Distinctive: line 116
When creating or updating translations:
- Distinctive: line 161
All 2 languages have identical structure
- Distinctive: line 162
No missing keys in any language
- Distinctive: line 163
No extra keys in any language
- Distinctive: line 170
Use descriptive, camelCase names that match the feature:
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Waniwani Translation System
Automatically create and manage translations for pages and components using the Waniwani translation system.
📚 For real-world examples, see examples.md in this directory.
When to Use This Skill
Apply this skill when:
- Creating new pages or components with user-facing text
- Adding translations to existing pages
- Updating translation files
- Internationalizing hardcoded text
- The user mentions "translations", "translate", "i18n", "internationalization", or language support
Translation File Location
CRITICAL: Co-locate @translations.ts with page.tsx by default
src/app/(app)/settings/teams/
├── page.tsx # The page component
├── @translations.ts # Translations file (place HERE)
└── loading.tsxOnly use a different location if the user explicitly requests it.
Mandatory Requirements
🚨 ALL pages and components MUST support all 2 languages:
- English (en)
- French (fr)
No exceptions. TypeScript will enforce structural equality across all languages.
Translation File Structure
import { defineTranslations } from "@/lib/translations/types";
export const descriptiveName = defineTranslations({
en: {
// Static text - plain strings
title: "Page Title",
// Dynamic text - functions with object parameters
greeting: ({ name }: { name: string }) => `Hello ${name}!`,
// Nested structure for organization
actions: {
save: "Save",
cancel: "Cancel",
},
},
fr: {
// Must match "en" structure exactly
title: "Titre de la page",
greeting: ({ name }: { name: string }) => `Bonjour ${name} !`,
actions: {
save: "Enregistrer",
cancel: "Annuler",
},
},
});See examples.md for comprehensive real-world examples.
Static vs Dynamic Content
Static text (never changes): Use plain strings
title: "Settings"Dynamic text (includes variables): Use functions with object parameters
greeting: ({ name }: { name: string }) => `Hello ${name}!`❌ Never use:
- Template placeholders:
"Hello {name}!" - Direct parameters:
(name) => ...
Using Translations in Components
"use client";
import { useTranslation } from "@/lib/translations/hooks";
export function MyComponent() {
const t = useTranslation("descriptiveName");
return (
<div>
<h1>{t.title}</h1> {/* Static */}
<p>{t.greeting({ name: "World" })}</p> {/* Dynamic */}
</div>
);
}See examples.md for complete component examples with forms, tables, and validation.
Required Workflow
When creating or updating translations:
- Create
@translations.tsnext topage.tsxwith all 2 languages (en, fr) - 🚨 CRITICAL: Run rebuild script immediately after creating/modifying translations:
This regenerates the translation index and makes translations available. YOU MUST RUN THIS after any translation file changes!bun translations:build - Import and use
useTranslation()in components - Verify by checking TypeScript errors (missing keys will error immediately)
Translation Coverage Checklist
Translate ALL user-facing text:
- ✅ Page titles and descriptions
- ✅ Button labels and action text
- ✅ Form labels and placeholders
- ✅ Error messages and validation text
- ✅ Table headers and column names
- ✅ Dialog/modal titles and content
- ✅ Toast notification messages
- ✅ Empty state messages
- ✅ Loading and status text
- ✅ Help text and tooltips
- ✅ Navigation items
Common Mistakes to Avoid
❌ Hardcoded strings: <h1>Settings</h1>
✅ Use translations: <h1>{t.title}</h1>
❌ Template placeholders: greeting: "Hello {name}!"
✅ Use functions: greeting: ({ name }) => ...
❌ Missing languages: Only defining en without fr ✅ All languages: TypeScript enforces both en and fr
❌ Forgetting rebuild: Creating files without running bun translations:build
✅ Always rebuild: Run bun translations:build after changes
Type Safety Benefits
TypeScript enforces:
- All 2 languages have identical structure
- No missing keys in any language
- No extra keys in any language
- Correct parameter types for dynamic functions
If structures don't match, you'll get immediate TypeScript errors before runtime.
Export Naming Convention
Use descriptive, camelCase names that match the feature:
- ✅
settings- for settings page - ✅
userProfile- for user profile - ✅
dashboardHome- for dashboard home - ✅
teamMembers- for team members page
Additional Resources
- 📚 Examples: See
examples.mdin this skill directory for comprehensive real-world examples - Translation types:
src/lib/translations/types.ts - Translation hooks:
src/lib/translations/hooks.ts - Locale context:
src/lib/translations/locale-context.tsx - Auto-generated index:
src/lib/translations/index.ts(DO NOT EDIT) - Example files: Search for existing
@translations.tsfiles in the codebase
Proactive Application
Apply this skill automatically when:
- Creating new pages or components
- Modifying existing pages to add new text
- User asks to "add a page" or "create a component"
- Any task involving user-facing text
Don't wait for the user to explicitly request translations—apply them proactively!
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.

