Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

i18ni18n 测试

Agent Skill

i18n 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,482

周安装

63

GitHub Stars

22,792

下载量

519
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:i18n(i18n 测试)
来源仓库:https://github.com/iofficeai/aionui
仓库路径:skills/i18n
安装命令:
npx skills add https://github.com/iofficeai/aionui --skill i18n
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/iofficeai/aionui --skill i18n

简介

用于查找、检索和筛选相关信息。

  • 适合根据关键词或任务场景快速定位候选结果。
  • 可结合来源仓库和 README 核验具体用法。
  • 安装命令:npx skills add https://github.com/iofficeai/aionui --skill i18n。
  • 建议确认权限范围、维护状态及是否触发联网或文件读写。

SKILL.md

i18n Skill

Standards and workflow for internationalization. All user-visible text must use i18n.

Announce at start: "I'm using i18n skill to ensure proper internationalization."

IMPORTANT: Read Config First

Before doing any i18n work, always read src/common/config/i18n-config.json to get the current list of supported languages and modules. Never assume a fixed number — languages and modules may have been added or removed since this skill was written.

cat src/common/config/i18n-config.json

This file is the single source of truth. All scripts, runtime code, and this workflow depend on it.

File Structure

src/common/config/i18n-config.json              # Single source of truth: languages, modules
src/renderer/i18n/
├── index.ts                             # i18next configuration
├── i18n-keys.d.ts                       # AUTO-GENERATED — do not edit manually
└── locales/
    ├── <lang>/                          # One directory per language in i18n-config.json
    │   ├── index.ts                     # Barrel import for all modules
    │   ├── common.json                  # One JSON per module in i18n-config.json
    │   ├── conversation.json
    │   └── ...
    └── ...

Key Facts

  • Reference language: defined by referenceLanguage in i18n-config.json (currently en-US)
  • Supported languages: defined by supportedLanguages array — read the file to get the current list
  • Modules: defined by modules array — read the file to get the current list

Key Structure

Keys use namespaced dot notation in code: t('module.key') or t('module.nested.key').

Inside each module JSON file, keys can be flat or nested:

// common.json — flat keys
{
  "send": "Send",
  "cancel": "Cancel",
  "copySuccess": "Copied"
}

// cron.json — nested keys
{
  "scheduledTasks": "Scheduled Tasks",
  "status": {
    "active": "Active",
    "paused": "Paused"
  }
}

In code:

t('common.send'); // flat key in common.json
t('cron.status.active'); // nested key in cron.json

Key Naming Rules

  • Use camelCase for key names: copySuccess, scheduledTasks
  • Group related keys with nesting: status.active, actions.pause
  • Reusable text goes in common.json: save, cancel, delete, confirm, etc.
  • Feature-specific text goes in the corresponding module

Common Suffixes

SuffixUsage
titleSection/page titles
placeholderInput placeholders
labelForm labels
success / errorStatus messages
confirmConfirmation dialogs
emptyEmpty state messages
tooltipTooltip text

Adding New Text — Workflow

Step 1: Read src/common/config/i18n-config.json

Get the current language list and module list. Do not skip this step.

Step 2: Check Existing Keys

Before adding a new key, search for similar existing keys:

grep -r "keyword" src/renderer/i18n/locales/en-US/

Reuse common.* keys when possible.

Step 3: Choose the Right Module

Match the module to the feature area. If no module fits, consider whether a new module is needed (see "Adding a New Module" below).

Step 4: Add to ALL Locale Directories

CRITICAL: Every new key must be added to every locale in supportedLanguages. Use this checklist for each key:

  • en-US/<module>.json — reference language (added in Step 3)
  • zh-CN/<module>.json — added
  • zh-TW/<module>.json — added
  • Any other language listed in src/common/config/i18n-config.jsonsupportedLanguages — added

A key missing from even one locale will cause node scripts/check-i18n.js to fail in CI.

Step 5: Use in Component

import { useTranslation } from 'react-i18next';

function MyComponent() {
  const { t } = useTranslation();
  return <button>{t('common.save')}</button>;
}

Step 6: Regenerate Types and Validate

Run these two commands in order — both must pass before committing:

bun run i18n:types          # Step A: regenerate i18n-keys.d.ts from reference locale
node scripts/check-i18n.js  # Step B: validate structure, keys, and type sync
  • i18n:types must be run before check-i18n.js — the check validates the generated file
  • If check-i18n.js exits with errors (❌), fix them before proceeding
  • If check-i18n.js exits with warnings only (⚠️), review but may proceed
  • Never commit with a stale i18n-keys.d.ts

Adding a New Module

  1. Add module name to src/common/config/i18n-config.jsonmodules array
  2. Create <module>.json in every locale directory (read supportedLanguages to know which)
  3. Add import + export in each locale's index.ts
  4. Run bun run i18n:types to regenerate type definitions
  5. Run node scripts/check-i18n.js to validate

Hardcoded String Detection

Prohibited Patterns

Never use hardcoded Chinese/English text in JSX:

// Bad
<span>重命名</span>
<span>Delete</span>
{name || '新对话'}

// Good
<span>{t('common.rename')}</span>
<span>{t('common.delete')}</span>
{name || t('conversation.newConversation')}

Exceptions

  • Code comments (any language OK)
  • console.log() / debug output
  • Internal string constants not shown to users

Interpolation

Variables

{
  "taskCount": "{{count}} task(s)",
  "greeting": "Hello, {{name}}!"
}
t('cron.taskCount', { count: 5 });

HTML in Translations

Use Trans component for complex markup:

import { Trans } from 'react-i18next';

<Trans i18nKey='cron.countdown'>
  Task <strong>{{ taskName }}</strong> in <span>{{ countdown }}</span>
</Trans>;

zh-TW Maintenance

Most terms can be auto-converted from zh-CN, but some need manual review:

zh-CNzh-TWNotes
视频影片Different term
软件軟體Different term
信息訊息Different term
默认預設Different term

Quick Checklist

Before submitting code with new text:

  • Read src/common/config/i18n-config.json to get current languages and modules
  • All user-visible text uses t() function
  • New keys added to every locale directory in supportedLanguages
  • No hardcoded Chinese/English in JSX
  • zh-TW reviewed for term differences
  • bun run i18n:types ran first (regenerates i18n-keys.d.ts)
  • node scripts/check-i18n.js passed after types regenerated (no errors)

Common Mistakes

MistakeCorrect
Assuming a fixed number of languagesAlways read i18n-config.json first
Adding key to only some localesAdd to every locale in supportedLanguages
Editing i18n-keys.d.ts manuallyRun bun run i18n:types to generate
Using t("New Chat")Define key: t("conversation.newChat")
Not updating i18n-config.json for new moduleUpdate config first, then create files
Adding module JSON but not updating index.tsMust add import + export in each locale's index.ts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.76%
按下载量换算175

Claude

30.68%
按下载量换算159

Cursor

18.01%
按下载量换算93

Gemini CLI

10.15%
按下载量换算53

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills