AGENT SKILL

i18n

Locale JSON structure, key discipline, and Intl formatting without hardcoded strings. Use when adding copy, languages, or user-facing text.

License 许可
MIT
最近更新
2026-10-20
Stars
★ 0
Forks
0

01 前言 Front Matter

name
i18n
license
MIT
description
Locale JSON structure, key discipline, and Intl formatting without hardcoded strings. Use when adding copy, languages, or user-facing text.
compatibility
opencode

03 SKILL.md 正文

What I do

  • Banish hardcoded user-facing strings; every copy lives in locale files.

When to use me

Use when adding copy, new languages, or any user-facing text.

Rules

  1. No raw strings in UI: all copy keyed (checkout.pay_button), never inline literals — including errors, placeholders, aria-labels, and dates.
  2. Locale files: one JSON per locale (en.json, pl.json...), identical key trees; missing keys fail CI; fallback to the source locale is dev-only, never shipped.
  3. Intl, not hand-rolled: numbers, currencies, dates, plurals via Intl.* APIs over the locale — no string concatenation for sentences.
  4. Review gate: a diff that adds user-facing text without locale keys fails review.

04 同仓库更多 Skills