agentleFS
haxsdhaxsd/haxsd-byok/.agents/skills/i18n/SKILL.md

i18n

Skill33 starsChanged 35 days agoMITView on GitHub

Implement and review Cursor BYOK desktop localization, including t() usage, locale catalogs, system-language selection, translation completeness, and language settings under apps/desktop.

50 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oss-pr, pr-automation and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • volovelySkill

    pr-fix

    This skill should be used when the user asks to "fix PR comments", "address PR feedback", "resolve PR comments", provides a GitHub PR URL with intent to fix, or says "pr-fix". It reads all review comments on a PR, decides which need code fixes vs. replies, makes the fixes, and posts replies — all with explicit user approval before any GitHub action.

    Also in 3 projects that use this

  • GitHubSkill

    state-management

    CoreAI Sandbox's TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.

    Also in 4 projects that use this

  • xfstudioSkill

    graphql

    GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.

    Also in 3 projects that use this

  • MicrosoftSkill

    bump-version

    Bump the VoxelPic version to a user-specified value. USE FOR: setting or updating the project version across all files that embed it. Applies to requests like 'bump version to X.Y.Z', 'set version', or 'update version'.

    Also in 4 projects that use this

  • +2 more from CES-Ltd

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Keep localization organized as:

    line 8
  2. Very specific:

    Use the global t() function with a static Simplified Chinese string literal: t("保存").

    line 25
  3. Very specific:

    Do not import or locally declare t.

    line 26
  4. Distinctive:

    Keep calls inside render paths when the result must update after a language change.

    line 27
  5. Very specific:

    Use named placeholders with a static object: t("第 {page} 页", { page }).

    line 28
  6. Very specific:

    Run npm run i18n:scan after adding or changing t() sources.

    line 43
  7. Very specific:

    Never edit src/i18n/generated/catalog.json or zh-CN.json manually.

    line 45
  8. Very specific:

    Run npm run check. A normal build must fail on a missing translation or mismatched placeholder.

    line 46
  9. Distinctive:

    When adding another locale, add it to the plugin's supported locales, runtime locale type and messages, locale resolver, settings options, …

    line 48

“Common” is measured: kept by at least 6 in 10 of the 40 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Desktop i18n

Keep localization organized as:

apps/desktop/
├── plugins/static-i18n-plugin.ts
└── src/i18n/
    ├── I18nRoot.tsx
    ├── runtime.ts
    ├── store.ts
    ├── generated/catalog.json
    └── locales/
        ├── zh-CN.json
        └── en-US.json

Author messages

  • Use the global t() function with a static Simplified Chinese string literal: t("保存").
  • Do not import or locally declare t.
  • Keep calls inside render paths when the result must update after a language change. Do not translate module-level UI constants.
  • Use named placeholders with a static object: t("第 {page} 页", { page }).
  • Preserve every placeholder name exactly in all translations.
  • Wrap all user-visible labels, descriptions, tooltips, empty states, validation messages, and accessibility labels. Do not wrap protocol tokens, model IDs, URLs, or product names that should remain unchanged.

Locale behavior

  • system is the default preference.
  • Resolve supported operating-system languages to their locale and fall back to en-US for every unsupported language.
  • Persist only explicit locale selections. Removing the preference restores system-language behavior.
  • Apply changes immediately and update the document lang attribute.

Update catalogs

From apps/desktop:

  1. Run npm run i18n:scan after adding or changing t() sources.
  2. Translate every empty entry in src/i18n/locales/en-US.json.
  3. Never edit src/i18n/generated/catalog.json or zh-CN.json manually; scanning owns them.
  4. Run npm run check. A normal build must fail on a missing translation or mismatched placeholder.

When adding another locale, add it to the plugin's supported locales, runtime locale type and messages, locale resolver, settings options, and provide a complete locale JSON file.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.