Fantasia i18n

From vishiri/fantasia-archive · View interactive version

Fantasia i18n is an AI agent skill from the GitHub repository vishiri/fantasia-archive. Manages vue-i18n messages and locale structure for Fantasia Archive. Use when adding or changing user-facing strings, locale files under repo-root i18n/, or markdown-backed documents wired into i18n.

How to use this skill

Skill file

Fantasia Archive — i18n

Setup

Folder structure (`i18n/en-US/`)

i18n/
  index.ts
  externalFileLoader.ts
  specialCharactersFixer.ts
  _tests/
  en-US/
    index.ts
    documents/                          — .md via ?raw + specialCharacterFixer
    components/<bucket>/<ComponentName>/
    dialogs/
    floatingWindows/
    pages/
    globalFunctionality/

No locale files elsewhere. Unmatched → globalFunctionality/.

Naming: locale files L_ prefix; types elsewhere use T_.

Key naming rules

English (`en-US`) capitalization

index.ts rules

Using strings in code

Tests tied to copy changes

Key changes affecting toHaveText, aria-label, L_* in Playwright → grep + run matching Vitest/Playwright; rebuild Electron when bundle matters — fantasia-testing.

Adding new strings

  1. Pick folder (components/, dialogs/, pages/, globalFunctionality/)
  2. Create/edit L_<name>.ts
  3. Import in index.ts → new camelCase top-level key
  4. Use full dot-path in $t / i18n.global.t
  5. Mirror in other locales when maintained

Storybook integration

Related

Types

Shared types → types/. See types-folder.mdc.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.